Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 161 for IsNan (0.08 sec)

  1. 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)
  2. 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)
  3. 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)
  4. src/math/cmplx/tan.go

    	switch re, im := real(x), imag(x); {
    	case math.IsInf(im, 0):
    		switch {
    		case math.IsInf(re, 0) || math.IsNaN(re):
    			return complex(math.Copysign(0, re), math.Copysign(1, im))
    		}
    		return complex(math.Copysign(0, math.Sin(2*re)), math.Copysign(1, im))
    	case re == 0 && math.IsNaN(im):
    		return x
    	}
    	d := math.Cos(2*real(x)) + math.Cosh(2*imag(x))
    	if math.Abs(d) < 0.25 {
    		d = tanSeries(x)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 8.5K bytes
    - Viewed (0)
  5. test/typeparam/orderedmapsimp.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
    }
    
    // Ranger returns a Sender and a Receiver. The Receiver provides a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  6. src/slices/sort.go

    		} else {
    			j = h // preserves x[j] >= target
    		}
    	}
    	// i == j, x[i-1] < target, and x[j] (= x[i]) >= target  =>  answer is i.
    	return i, i < n && (x[i] == target || (isNaN(x[i]) && isNaN(target)))
    }
    
    // BinarySearchFunc works like [BinarySearch], but uses a custom comparison
    // function. The slice must be sorted in increasing order, where "increasing"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 07 23:54:41 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/PairedStatsAccumulatorTest.java

          if (values.hasAnyNonFinite()) {
            assertWithMessage("population covariance of " + values).that(populationCovariance).isNaN();
            assertWithMessage("population covariance by addAll(PairedStats) of " + values)
                .that(populationCovarianceByAddAllPartitionedPairedStats)
                .isNaN();
          } else {
            assertWithMessage("population covariance of " + values)
                .that(populationCovariance)
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 23.4K bytes
    - Viewed (0)
  8. test/typeparam/chansimp.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
    }
    
    // ReadAll reads from c until the channel is closed or the context is
    // canceled, returning all the values read.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  9. android/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)
  10. src/math/frexp.go

    		return archFrexp(f)
    	}
    	return frexp(f)
    }
    
    func frexp(f float64) (frac float64, exp int) {
    	// special cases
    	switch {
    	case f == 0:
    		return f, 0 // correctly return -0
    	case IsInf(f, 0) || IsNaN(f):
    		return f, 0
    	}
    	f, exp = normalize(f)
    	x := Float64bits(f)
    	exp += int((x>>shift)&mask) - bias + 1
    	x &^= mask << shift
    	x |= (-1 + bias) << shift
    	frac = Float64frombits(x)
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 929 bytes
    - Viewed (0)
Back to top