- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 161 for IsNan (0.05 sec)
-
test/typeparam/orderedmap.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 } // Ranger returns a Sender and a Receiver. The Receiver provides a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 7.1K bytes - Viewed (0) -
src/math/ldexp.go
} return ldexp(frac, exp) } func ldexp(frac float64, exp int) float64 { // special cases switch { case frac == 0: return frac // correctly return -0 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 }
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/maps/maps_test.go
func equal[T comparable](v1, v2 T) bool { return v1 == v2 } // equalNaN is like == except that all NaNs are equal. func equalNaN[T comparable](v1, v2 T) bool { isNaN := func(f T) bool { return f != f } return v1 == v2 || (isNaN(v1) && isNaN(v2)) } // equalStr compares ints and strings. func equalIntStr(v1 int, v2 string) bool { return strconv.Itoa(v1) == v2 } func TestEqualFunc(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 17:05:56 UTC 2023 - 5.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
public void testLog2NaNInfinity() { assertEquals(Double.POSITIVE_INFINITY, DoubleMath.log2(Double.POSITIVE_INFINITY)); assertTrue(Double.isNaN(DoubleMath.log2(Double.NEGATIVE_INFINITY))); assertTrue(Double.isNaN(DoubleMath.log2(Double.NaN))); } @GwtIncompatible // StrictMath private strictfp double trueLog2(double d) { double trueLog2 = StrictMath.log(d) / StrictMath.log(2); // increment until it's >= the true value
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 28.1K bytes - Viewed (0) -
src/math/pow.go
if haveArchPow { return archPow(x, y) } return pow(x, y) } func pow(x, y float64) float64 { switch { case y == 0 || x == 1: return 1 case y == 1: return x case IsNaN(x) || IsNaN(y): return NaN() case x == 0: switch { case y < 0: if Signbit(x) && isOddInt(y) { return Inf(-1) } return Inf(1) case y > 0: if Signbit(x) && isOddInt(y) { return x
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 24 19:10:58 UTC 2023 - 3.6K bytes - Viewed (0) -
src/math/exp.go
Log2e = 1.44269504088896338700e+00 Overflow = 7.09782712893383973096e+02 Underflow = -7.45133219101941108420e+02 NearZero = 1.0 / (1 << 28) // 2**-28 ) // special cases switch { case IsNaN(x) || IsInf(x, 1): return x case IsInf(x, -1): return 0 case x > Overflow: return Inf(1) case x < Underflow: return 0 case -NearZero < x && x < NearZero: return 1 + x }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 5.4K bytes - Viewed (0) -
test/typeparam/maps.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: Tue Mar 01 19:45:34 UTC 2022 - 5.9K bytes - Viewed (0) -
test/typeparam/sets.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: Tue Mar 01 19:45:34 UTC 2022 - 5.7K bytes - Viewed (0) -
android/guava/src/com/google/common/math/PairedStatsAccumulator.java
package com.google.common.math; import static com.google.common.base.Preconditions.checkState; import static com.google.common.primitives.Doubles.isFinite; import static java.lang.Double.NaN; import static java.lang.Double.isNaN; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; import com.google.common.primitives.Doubles; /**
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri May 12 17:02:53 UTC 2023 - 10.3K bytes - Viewed (0) -
guava/src/com/google/common/math/DoubleUtils.java
import static java.lang.Double.MAX_EXPONENT; import static java.lang.Double.MIN_EXPONENT; import static java.lang.Double.POSITIVE_INFINITY; import static java.lang.Double.doubleToRawLongBits; import static java.lang.Double.isNaN; import static java.lang.Double.longBitsToDouble; import static java.lang.Math.getExponent; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.VisibleForTesting;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Apr 28 15:37:52 UTC 2021 - 5.1K bytes - Viewed (0)