- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 161 for IsNan (0.03 sec)
-
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/sort/sort.go
// // x[i] < x[j] || (math.IsNaN(x[i]) && !math.IsNaN(x[j])) func (x Float64Slice) Less(i, j int) bool { return x[i] < x[j] || (isNaN(x[i]) && !isNaN(x[j])) } func (x Float64Slice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } // isNaN is a copy of math.IsNaN to avoid a dependency on the math package. func isNaN(f float64) bool { return f != f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 28 16:40:32 UTC 2023 - 10.1K bytes - Viewed (0) -
test/typeparam/setsimp.dir/a.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 Set is a set of elements of some type. type Set[Elem comparable] struct { m map[Elem]struct{} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 26 21:39:54 UTC 2021 - 2.7K bytes - Viewed (0) -
src/math/cmplx/exp.go
case math.IsInf(re, 0): switch { case re > 0 && im == 0: return x case math.IsInf(im, 0) || math.IsNaN(im): if re < 0 { return complex(0, math.Copysign(0, im)) } else { return complex(math.Inf(1.0), math.NaN()) } } case math.IsNaN(re): if im == 0 { return complex(math.NaN(), im) } } r := math.Exp(real(x)) s, c := math.Sincos(imag(x))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 01 03:16:37 UTC 2020 - 2.1K bytes - Viewed (0) -
src/math/exp_arm64.s
// This is an assembly implementation of the method used for function Exp in file exp.go. // // func Exp(x float64) float64 TEXT ·archExp(SB),$0-16 FMOVD x+0(FP), F0 // F0 = x FCMPD F0, F0 BNE isNaN // x = NaN, return NaN FMOVD $Overflow, F1 FCMPD F1, F0 BGT overflow // x > Overflow, return PosInf FMOVD $Underflow, F1 FCMPD F1, F0 BLT underflow // x < Underflow, return 0 MOVD $NearZero, R0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 15 15:48:19 UTC 2021 - 5.4K 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) -
android/guava-tests/test/com/google/common/math/PairedStatsTest.java
assertThat(createSingleStats(Double.POSITIVE_INFINITY, 1.23).populationCovariance()).isNaN(); assertThat(createSingleStats(Double.NEGATIVE_INFINITY, 1.23).populationCovariance()).isNaN(); assertThat(createSingleStats(Double.NaN, 1.23).populationCovariance()).isNaN(); assertThat(TWO_VALUES_PAIRED_STATS.populationCovariance()) .isWithin(ALLOWED_ERROR)
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 14K 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)