- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for frexpBC (0.15 sec)
-
src/math/all_test.go
for i := 0; i < len(vf); i++ { if f, j := Frexp(vf[i]); !veryclose(frexp[i].f, f) || frexp[i].i != j { t.Errorf("Frexp(%g) = %g, %d, want %g, %d", vf[i], f, j, frexp[i].f, frexp[i].i) } } for i := 0; i < len(vffrexpSC); i++ { if f, j := Frexp(vffrexpSC[i]); !alike(frexpSC[i].f, f) || frexpSC[i].i != j { t.Errorf("Frexp(%g) = %g, %d, want %g, %d", vffrexpSC[i], f, j, frexpSC[i].f, frexpSC[i].i) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jul 07 17:39:26 UTC 2023 - 86.8K bytes - Viewed (0) -
src/math/frexp.go
// license that can be found in the LICENSE file. package math // Frexp breaks f into a normalized fraction // and an integral power of two. // It returns frac and exp satisfying f == frac × 2**exp, // with the absolute value of frac in the interval [½, 1). // // Special cases are: // // Frexp(±0) = ±0, 0 // Frexp(±Inf) = ±Inf, 0 // Frexp(NaN) = NaN, 0 func Frexp(f float64) (frac float64, exp int) { if haveArchFrexp {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 929 bytes - Viewed (0) -
test/fixedbugs/bug056.go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main func frexp() (a int, b float64) { return 1, 2.0 } func main() { a, b := frexp(); _, _ = a, b; } /* bug056.go:8: illegal types for operand: AS (<int32>INT32) (<int32>INT32)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:49:30 UTC 2012 - 364 bytes - Viewed (0) -
src/math/mod.go
} return mod(x, y) } func mod(x, y float64) float64 { if y == 0 || IsInf(x, 0) || IsNaN(x) || IsNaN(y) { return NaN() } y = Abs(y) yfr, yexp := Frexp(y) r := x if x < 0 { r = -x } for r >= y { rfr, rexp := Frexp(r) if rfr < yfr { rexp = rexp - 1 } r = r - Ldexp(y, rexp-yexp) } if x < 0 { r = -r } return r
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 903 bytes - Viewed (0) -
src/runtime/mkfastlog2table.go
return fastlog2Table } // log2 is a local copy of math.Log2 with an explicit float64 conversion // to disable FMA. This lets us generate the same output on all platforms. func log2(x float64) float64 { frac, exp := math.Frexp(x) // Make sure exact powers of two give an exact answer. // Don't depend on Log(0.5)*(1/Ln2)+exp being exactly exp-1. if frac == 0.5 { return float64(exp - 1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Jun 26 22:12:19 UTC 2022 - 3.1K bytes - Viewed (0) -
src/math/log10.go
// The special cases are the same as for [Log]. func Log2(x float64) float64 { if haveArchLog2 { return archLog2(x) } return log2(x) } func log2(x float64) float64 { frac, exp := Frexp(x) // Make sure exact powers of two give an exact answer. // Don't depend on Log(0.5)*(1/Ln2)+exp being exactly exp-1. if frac == 0.5 { return float64(exp - 1) } return Log(frac)*(1/Ln2) + float64(exp)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 873 bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/math_utils.cc
int32_t& quantized_fraction, int32_t& shift) { if (!std::isfinite(double_multiplier) || double_multiplier <= 0) { return failure(); } const double fraction = std::frexp(double_multiplier, &shift); quantized_fraction = static_cast<int32_t>(std::round(fraction * (1L << 15))); // Clip extreme values. These are more than enough to overflow int8, the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 08:32:43 UTC 2024 - 2.1K bytes - Viewed (0) -
src/math/ldexp.go
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package math // Ldexp is the inverse of [Frexp]. // It returns frac × 2**exp. // // Special cases are: // // Ldexp(±0, exp) = ±0 // Ldexp(±Inf, exp) = ±Inf // Ldexp(NaN, exp) = NaN func Ldexp(frac float64, exp int) float64 { if haveArchLdexp { return archLdexp(frac, exp)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 1.1K bytes - Viewed (0) -
test/codegen/condmove.go
return a } //go:noinline func frexp(f float64) (frac float64, exp int) { return 1.0, 4 } //go:noinline func ldexp(frac float64, exp int) float64 { return 1.0 } // Generate a CMOV with a floating comparison and integer move. func cmovfloatint2(x, y float64) float64 { yfr, yexp := 4.0, 5 r := x for r >= y { rfr, rexp := frexp(r) if rfr < yfr { rexp = rexp - 1 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 06 20:57:33 UTC 2023 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/numerical_utils.cc
// used. QuantizedMultiplier QuantizeMultiplier(double double_multiplier) { if (double_multiplier < 1e-6) { return {0, 0}; } int32_t shift; const double q = frexp(double_multiplier, &shift); int64_t quantized_multiplier = round(q * (1LL << 31)); assert(quantized_multiplier <= (1LL << 31)); if (quantized_multiplier == (1LL << 31)) { quantized_multiplier /= 2; ++shift;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 17 19:57:04 UTC 2023 - 3.3K bytes - Viewed (0)