- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 161 for IsNan (0.12 sec)
-
src/math/dim.go
if haveArchMax { return archMax(x, y) } return max(x, y) } func max(x, y float64) float64 { // special cases switch { case IsInf(x, 1) || IsInf(y, 1): return Inf(1) case IsNaN(x) || IsNaN(y): return NaN() case x == 0 && x == y: if Signbit(x) { return y } return x } if x > y { return x } return y } // Min returns the smaller of x or y. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 15 19:45:12 UTC 2023 - 1.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/StatsTest.java
assertThat(ONE_VALUE_STATS.populationVariance()).isWithin(0.0).of(0.0); assertThat(Stats.of(POSITIVE_INFINITY).populationVariance()).isNaN(); assertThat(Stats.of(NEGATIVE_INFINITY).populationVariance()).isNaN(); assertThat(Stats.of(NaN).populationVariance()).isNaN(); assertThat(TWO_VALUES_STATS.populationVariance()) .isWithin(ALLOWED_ERROR) .of(TWO_VALUES_SUM_OF_SQUARES_OF_DELTAS / 2);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 28.4K bytes - Viewed (0) -
src/math/hypot.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 850 bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/StatsAccumulatorTest.java
assertWithMessage("mean of " + values).that(mean).isNaN(); assertWithMessage("mean by addAll(Stats) of " + values).that(meanByAddAllStats).isNaN(); } else if (values.hasAnyPositiveInfinity() && values.hasAnyNegativeInfinity()) { assertWithMessage("mean of " + values).that(mean).isNaN(); assertWithMessage("mean by addAll(Stats) of " + values).that(meanByAddAllStats).isNaN(); } else if (values.hasAnyPositiveInfinity()) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 34K bytes - Viewed (0) -
src/math/cmplx/asin.go
case re == 0 && math.Abs(im) <= 1: return complex(re, math.Atanh(im)) case math.IsInf(im, 0) || math.IsInf(re, 0): if math.IsNaN(re) { return complex(math.NaN(), math.Copysign(0, im)) } return complex(math.Copysign(math.Pi/2, re), math.Copysign(0, im)) case math.IsNaN(re) || math.IsNaN(im): return NaN() } x2 := real(x) * real(x) a := 1 - x2 - imag(x)*imag(x) if a == 0 { return NaN() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 01 03:16:37 UTC 2020 - 5.9K bytes - Viewed (0) -
test/typeparam/mapsimp.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 } // 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: Mon May 24 22:17:33 UTC 2021 - 2.5K bytes - Viewed (0) -
src/math/logb.go
case IsInf(x, 0): return Inf(1) case IsNaN(x): return x } return float64(ilogb(x)) } // Ilogb returns the binary exponent of x as an integer. // // Special cases are: // // Ilogb(±Inf) = MaxInt32 // Ilogb(0) = MinInt32 // Ilogb(NaN) = MaxInt32 func Ilogb(x float64) int { // special cases switch { case x == 0: return MinInt32 case IsNaN(x): return MaxInt32 case IsInf(x, 0):
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 07 19:46:45 UTC 2022 - 1021 bytes - Viewed (0) -
src/math/remainder.go
return remainder(x, y) } func remainder(x, y float64) float64 { const ( Tiny = 4.45014771701440276618e-308 // 0x0020000000000000 HalfMax = MaxFloat64 / 2 ) // special cases switch { case IsNaN(x) || IsNaN(y) || IsInf(x, 0) || y == 0: return NaN() case IsInf(y, 0): return x } sign := false if x < 0 { x = -x sign = true } if y < 0 { y = -y } if x == y { if sign {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 2K bytes - Viewed (0) -
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)