- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for copysignSC (0.21 sec)
-
src/math/all_test.go
{Inf(-1), NaN()}, {-Pi, Inf(-1)}, {-Pi, 0}, {-Pi, Inf(1)}, {-Pi, NaN()}, {Copysign(0, -1), Inf(-1)}, {Copysign(0, -1), -Pi}, {Copysign(0, -1), Copysign(0, -1)}, {Copysign(0, -1), 0}, {Copysign(0, -1), +Pi}, {Copysign(0, -1), Inf(1)}, {Copysign(0, -1), NaN()}, {0, Inf(-1)}, {0, -Pi}, {0, Copysign(0, -1)}, {0, 0}, {0, +Pi}, {0, Inf(1)}, {0, NaN()}, {+Pi, Inf(-1)},
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/cmplx/sin.go
func Cos(x complex128) complex128 { switch re, im := real(x), imag(x); { case im == 0 && (math.IsInf(re, 0) || math.IsNaN(re)): return complex(math.NaN(), -im*math.Copysign(0, re)) case math.IsInf(im, 0): switch { case re == 0: return complex(math.Inf(1), -re*math.Copysign(0, im)) case math.IsInf(re, 0) || math.IsNaN(re): return complex(math.Inf(1), math.NaN()) } case re == 0 && math.IsNaN(im):
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 4.8K bytes - Viewed (0) -
test/codegen/math.go
// riscv64:"FSGNJD" // arm64:"ORR", -"AND" sink64[1] = math.Copysign(c, -1) // Like math.Copysign(c, -1), but with integer operations. Useful // for platforms that have a copysign opcode to see if it's detected. // s390x:"LNDFR\t",-"MOVD\t" (no integer load/store) sink64[2] = math.Float64frombits(math.Float64bits(a) | 1<<63) // amd64:"ANDQ","ORQ" // s390x:"CPSDR\t",-"MOVD\t" (no integer load/store)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 15:24:29 UTC 2024 - 6.2K bytes - Viewed (0) -
src/runtime/float.go
// Special cases are: // // abs(±Inf) = +Inf // abs(NaN) = NaN func abs(x float64) float64 { const sign = 1 << 63 return float64frombits(float64bits(x) &^ sign) } // copysign returns a value with the magnitude // of x and the sign of y. func copysign(x, y float64) float64 { const sign = 1 << 63 return float64frombits(float64bits(x)&^sign | float64bits(y)&sign) } // float64bits returns the IEEE 754 binary representation of f.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 02:39:39 UTC 2022 - 1.4K bytes - Viewed (0) -
src/math/ldexp.go
case IsInf(frac, 0) || IsNaN(frac): return frac } frac, e := normalize(frac) exp += e x := Float64bits(frac) exp += int(x>>shift)&mask - bias if exp < -1075 { return Copysign(0, frac) // underflow } if exp > 1023 { // overflow if frac < 0 { return Inf(-1) } return Inf(1) } var m float64 = 1 if exp < -1022 { // denormal exp += 53
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 1.1K bytes - Viewed (0) -
src/runtime/minmax_test.go
// license that can be found in the LICENSE file. package runtime_test import ( "math" "strings" "testing" "unsafe" ) var ( zero = math.Copysign(0, +1) negZero = math.Copysign(0, -1) inf = math.Inf(+1) negInf = math.Inf(-1) nan = math.NaN() ) var tests = []struct{ min, max float64 }{ {1, 2}, {-2, 1}, {negZero, zero}, {zero, inf},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 26 01:41:50 UTC 2024 - 3.6K bytes - Viewed (0) -
android/guava/src/com/google/common/math/DoubleMath.java
* @since 13.0 */ public static boolean fuzzyEquals(double a, double b, double tolerance) { MathPreconditions.checkNonNegative("tolerance", tolerance); return Math.copySign(a - b, 1.0) <= tolerance // copySign(x, 1.0) is a branch-free version of abs(x), but with different NaN semantics || (a == b) // needed to ensure that infinities equal themselves || (Double.isNaN(a) && Double.isNaN(b)); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 18.9K bytes - Viewed (0) -
guava/src/com/google/common/math/DoubleMath.java
* @since 13.0 */ public static boolean fuzzyEquals(double a, double b, double tolerance) { MathPreconditions.checkNonNegative("tolerance", tolerance); return Math.copySign(a - b, 1.0) <= tolerance // copySign(x, 1.0) is a branch-free version of abs(x), but with different NaN semantics || (a == b) // needed to ensure that infinities equal themselves || (Double.isNaN(a) && Double.isNaN(b)); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 18.9K bytes - Viewed (0) -
src/cmp/cmp_test.go
// license that can be found in the LICENSE file. package cmp_test import ( "cmp" "fmt" "math" "slices" "sort" "strings" "testing" "unsafe" ) var negzero = math.Copysign(0, -1) var nonnilptr uintptr = uintptr(unsafe.Pointer(&negzero)) var nilptr uintptr = uintptr(unsafe.Pointer(nil)) var tests = []struct { x, y any compare int }{ {1, 2, -1}, {1, 1, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 23:39:07 UTC 2024 - 3.9K bytes - Viewed (0) -
src/html/template/js_test.go
{float32(1.0) / float32(256), " 0.00390625 ", false}, {float32(0), " 0 ", false}, {math.Copysign(0, -1), " -0 ", false}, {float64(1.0), " 1 ", false}, {float64(-1.0), " -1 ", false}, {float64(0.5), " 0.5 ", false}, {float64(-0.5), " -0.5 ", false}, {float64(0), " 0 ", false}, {math.Copysign(0, -1), " -0 ", false}, {"", `""`, false}, {"foo", `"foo"`, false}, // Newlines.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 02:20:11 UTC 2024 - 12.6K bytes - Viewed (0)