- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 55 for IsNaN (0.06 sec)
-
src/math/mod.go
// Mod(x, ±Inf) = x // Mod(x, NaN) = NaN func Mod(x, y float64) float64 { if haveArchMod { return archMod(x, y) } 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 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 903 bytes - Viewed (0) -
src/math/bits.go
} else { v = uvneginf } return Float64frombits(v) } // NaN returns an IEEE 754 “not-a-number” value. func NaN() float64 { return Float64frombits(uvnan) } // IsNaN reports whether f is an IEEE 754 “not-a-number” value. func IsNaN(f float64) (is bool) { // IEEE 754 says that only NaNs satisfy f != f. // To avoid the floating-point hardware, could use: // x := Float64bits(f);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 17:52:29 UTC 2022 - 1.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/integrator.go
return x == y || x != nil && y != nil && x.Duration == y.Duration && x.Min == y.Min && x.Max == y.Max && (x.Average == y.Average || math.IsNaN(x.Average) && math.IsNaN(y.Average)) && (x.Deviation == y.Deviation || math.IsNaN(x.Deviation) && math.IsNaN(y.Deviation)) } type integrator struct { name string clock clock.PassiveClock sync.Mutex lastTime time.Time x float64 moments Moments
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 17:37:20 UTC 2022 - 5K bytes - Viewed (0) -
src/runtime/minmax_test.go
t.Errorf("min(%v, %v) = %v, want %v", tt.max, tt.min, z, tt.min) } } for _, x := range all { if z := min(nan, x); !math.IsNaN(z) { t.Errorf("min(%v, %v) = %v, want %v", nan, x, z, nan) } if z := min(x, nan); !math.IsNaN(z) { t.Errorf("min(%v, %v) = %v, want %v", nan, x, z, nan) } } } func TestMaxFloat(t *testing.T) { for _, tt := range tests {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 26 01:41:50 UTC 2024 - 3.6K bytes - Viewed (0) -
src/math/atan2.go
func Atan2(y, x float64) float64 { if haveArchAtan2 { return archAtan2(y, x) } return atan2(y, x) } func atan2(y, x float64) float64 { // special cases switch { case IsNaN(y) || IsNaN(x): return NaN() case y == 0: if x >= 0 && !Signbit(x) { return Copysign(0, y) } return Copysign(Pi, y) case x == 0: return Copysign(Pi/2, y) case IsInf(x, 0): if IsInf(x, 1) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 1.5K bytes - Viewed (0) -
test/typeparam/sliceimp.dir/a.go
func Equal[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) { return false } for i, v1 := range s1 { v2 := s2[i] if v1 != v2 { isNaN := func(f Elem) bool { return f != f } if !isNaN(v1) || !isNaN(v2) { return false } } } return true } // EqualFn reports whether two slices are equal using a comparison // function on each element.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 30 01:55:58 UTC 2021 - 3.3K bytes - Viewed (0) -
src/runtime/softfloat64_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 4K bytes - Viewed (0) -
src/math/floor.go
// Floor(±0) = ±0 // Floor(±Inf) = ±Inf // Floor(NaN) = NaN func Floor(x float64) float64 { if haveArchFloor { return archFloor(x) } return floor(x) } func floor(x float64) float64 { if x == 0 || IsNaN(x) || IsInf(x, 0) { return x } if x < 0 { d, fract := Modf(-x) if fract != 0.0 { d = d + 1 } return -d } d, _ := Modf(x) return d }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 3.3K bytes - Viewed (0) -
test/typeparam/metrics.go
func _SlicesEqual[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) { return false } for i, v1 := range s1 { v2 := s2[i] if v1 != v2 { isNaN := func(f Elem) bool { return f != f } if !isNaN(v1) || !isNaN(v2) { return false } } } return true } // _Keys returns the keys of the map m. // The keys will be an indeterminate order.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 4.4K bytes - Viewed (0) -
test/typeparam/graph.go
func _SliceEqual[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) { return false } for i, v1 := range s1 { v2 := s2[i] if v1 != v2 { isNaN := func(f Elem) bool { return f != f } if !isNaN(v1) || !isNaN(v2) { return false } } } return true } // A Graph is a collection of nodes. A node may have an arbitrary number
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 5.7K bytes - Viewed (0)