Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 72 for IsNan (0.05 sec)

  1. src/math/cbrt.go

    		G              = 3.57142857142857150787e-01  // 5/14      = 0x3FD6DB6DB6DB6DB7
    		SmallestNormal = 2.22507385850720138309e-308 // 2**-1022  = 0x0010000000000000
    	)
    	// special cases
    	switch {
    	case x == 0 || IsNaN(x) || IsInf(x, 0):
    		return x
    	}
    
    	sign := false
    	if x < 0 {
    		x = -x
    		sign = true
    	}
    
    	// rough cbrt to 5 bits
    	t := Float64frombits(Float64bits(x)/3 + B1<<32)
    	if x < SmallestNormal {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  2. src/strconv/atoc_test.go

    		}
    		got, err := ParseComplex(test.in, 128)
    		if !reflect.DeepEqual(err, test.err) {
    			t.Fatalf("ParseComplex(%q, 128) = %v, %v; want %v, %v", test.in, got, err, test.out, test.err)
    		}
    		if !(cmplx.IsNaN(test.out) && cmplx.IsNaN(got)) && got != test.out {
    			t.Fatalf("ParseComplex(%q, 128) = %v, %v; want %v, %v", test.in, got, err, test.out, test.err)
    		}
    
    		if complex128(complex64(test.out)) == test.out {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 03 23:05:51 UTC 2020
    - 6.8K bytes
    - Viewed (0)
  3. pkg/test/loadbalancersim/timeseries/data.go

    	}
    
    	return s[0]
    }
    
    func (s sorted) max() float64 {
    	if len(s) == 0 {
    		return infinity
    	}
    
    	return s[len(s)-1]
    }
    
    func (s sorted) quantile(phi float64) float64 {
    	if len(s) == 0 || math.IsNaN(phi) {
    		return nan
    	}
    	if phi <= 0 {
    		return s.min()
    	}
    	if phi >= 1 {
    		return s.max()
    	}
    	idx := uint(phi*float64(len(s)-1) + 0.5)
    	if idx >= uint(len(s)) {
    		idx = uint(len(s) - 1)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 03 18:19:25 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  4. src/runtime/mkfastlog2table.go

    		L6    = 1.531383769920937332e-01   /* 3FC39A09 D078C69F */
    		L7    = 1.479819860511658591e-01   /* 3FC2F112 DF3E5244 */
    	)
    
    	// special cases
    	switch {
    	case math.IsNaN(x) || math.IsInf(x, 1):
    		return x
    	case x < 0:
    		return math.NaN()
    	case x == 0:
    		return math.Inf(-1)
    	}
    
    	// reduce
    	f1, ki := math.Frexp(x)
    	if f1 < math.Sqrt2/2 {
    		f1 *= 2
    		ki--
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Jun 26 22:12:19 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  5. src/math/sin.go

    		PI4B = 3.77489470793079817668e-8  // 0x3e64442d00000000,
    		PI4C = 2.69515142907905952645e-15 // 0x3ce8469898cc5170,
    	)
    	// special cases
    	switch {
    	case IsNaN(x) || IsInf(x, 0):
    		return NaN()
    	}
    
    	// make argument positive
    	sign := false
    	x = Abs(x)
    
    	var j uint64
    	var y, z float64
    	if x >= reduceThreshold {
    		j, z = trigReduce(x)
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  6. samples/bookinfo/src/ratings/ratings.js

      }
    }
    
    dispatcher.onPost(/^\/ratings\/[0-9]*/, function (req, res) {
      var productIdStr = req.url.split('/').pop()
      var productId = parseInt(productIdStr)
      var ratings = {}
    
      if (Number.isNaN(productId)) {
        res.writeHead(400, {'Content-type': 'application/json'})
        res.end(JSON.stringify({error: 'please provide numeric product ID'}))
        return
      }
    
      try {
        ratings = JSON.parse(req.body)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Sep 02 00:29:57 UTC 2022
    - 8.8K bytes
    - Viewed (0)
  7. src/math/cmplx/pow.go

    //
    //	Pow(0, ±0) returns 1+0i
    //	Pow(0, c) for real(c)<0 returns Inf+0i if imag(c) is zero, otherwise Inf+Inf i.
    func Pow(x, y complex128) complex128 {
    	if x == 0 { // Guaranteed also true for x == -0.
    		if IsNaN(y) {
    			return NaN()
    		}
    		r, i := real(y), imag(y)
    		switch {
    		case r == 0:
    			return 1
    		case r < 0:
    			if i == 0 {
    				return complex(math.Inf(1), 0)
    			}
    			return Inf()
    		case r > 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. src/math/jn.go

    //	Jn(n, NaN) = NaN
    func Jn(n int, x float64) float64 {
    	const (
    		TwoM29 = 1.0 / (1 << 29) // 2**-29 0x3e10000000000000
    		Two302 = 1 << 302        // 2**302 0x52D0000000000000
    	)
    	// special cases
    	switch {
    	case IsNaN(x):
    		return x
    	case IsInf(x, 0):
    		return 0
    	}
    	// J(-n, x) = (-1)**n * J(n, x), J(n, -x) = (-1)**n * J(n, x)
    	// Thus, J(-n, x) = J(n, -x)
    
    	if n == 0 {
    		return J0(x)
    	}
    	if x == 0 {
    		return 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  9. src/math/tan.go

    		PI4B = 3.77489470793079817668e-8  // 0x3e64442d00000000,
    		PI4C = 2.69515142907905952645e-15 // 0x3ce8469898cc5170,
    	)
    	// special cases
    	switch {
    	case x == 0 || IsNaN(x):
    		return x // return ±0 || NaN()
    	case IsInf(x, 0):
    		return NaN()
    	}
    
    	// make argument positive but save the sign
    	sign := false
    	if x < 0 {
    		x = -x
    		sign = true
    	}
    	var j uint64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 08 17:27:54 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  10. src/math/log.go

    		L6    = 1.531383769920937332e-01   /* 3FC39A09 D078C69F */
    		L7    = 1.479819860511658591e-01   /* 3FC2F112 DF3E5244 */
    	)
    
    	// special cases
    	switch {
    	case IsNaN(x) || IsInf(x, 1):
    		return x
    	case x < 0:
    		return NaN()
    	case x == 0:
    		return Inf(-1)
    	}
    
    	// reduce
    	f1, ki := Frexp(x)
    	if f1 < Sqrt2/2 {
    		f1 *= 2
    		ki--
    	}
    	f := f1 - 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 3.9K bytes
    - Viewed (0)
Back to top