Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 38 for MaxFloat64 (0.37 sec)

  1. src/math/rand/v2/rand.go

    // swap swaps the elements with indexes i and j.
    func Shuffle(n int, swap func(i, j int)) { globalRand.Shuffle(n, swap) }
    
    // NormFloat64 returns a normally distributed float64 in the range
    // [-math.MaxFloat64, +math.MaxFloat64] with
    // standard normal distribution (mean = 0, stddev = 1)
    // from the default Source.
    // To produce a different normal distribution, callers can
    // adjust the output using:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:25:49 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. src/math/rand/rand.go

    func Read(p []byte) (n int, err error) { return globalRand().Read(p) }
    
    // NormFloat64 returns a normally distributed float64 in the range
    // [-[math.MaxFloat64], +[math.MaxFloat64]] with
    // standard normal distribution (mean = 0, stddev = 1)
    // from the default [Source].
    // To produce a different normal distribution, callers can
    // adjust the output using:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  3. src/math/j1.go

    		return 0
    	}
    
    	sign := false
    	if x < 0 {
    		x = -x
    		sign = true
    	}
    	if x >= 2 {
    		s, c := Sincos(x)
    		ss := -s - c
    		cc := s - c
    
    		// make sure x+x does not overflow
    		if x < MaxFloat64/2 {
    			z := Cos(x + x)
    			if s*c > 0 {
    				cc = z / ss
    			} else {
    				ss = z / cc
    			}
    		}
    
    		// j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 13.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/roundtrip_test.go

    		},
    		{
    			name: "uint8 zero",
    			obj:  uint8(0),
    		},
    		{
    			name: "float64",
    			obj:  float64(2.71),
    		},
    		{
    			name: "float64 max",
    			obj:  float64(math.MaxFloat64),
    		},
    		{
    			name: "float64 smallest nonzero",
    			obj:  float64(math.SmallestNonzeroFloat64),
    		},
    		{
    			name: "float64 no fractional component",
    			obj:  float64(5),
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 21:48:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  5. src/math/j0.go

    	case IsInf(x, 0):
    		return 0
    	case x == 0:
    		return 1
    	}
    
    	x = Abs(x)
    	if x >= 2 {
    		s, c := Sincos(x)
    		ss := s - c
    		cc := s + c
    
    		// make sure x+x does not overflow
    		if x < MaxFloat64/2 {
    			z := -Cos(x + x)
    			if s*c < 0 {
    				cc = z / ss
    			} else {
    				ss = z / cc
    			}
    		}
    
    		// j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 13.6K bytes
    - Viewed (0)
  6. src/internal/fuzz/mutator.go

    	case uint64:
    		vals[i] = m.mutateUInt(v, maxUint)
    	case float32:
    		vals[i] = float32(m.mutateFloat(float64(v), math.MaxFloat32))
    	case float64:
    		vals[i] = m.mutateFloat(v, math.MaxFloat64)
    	case bool:
    		if m.rand(2) == 1 {
    			vals[i] = !v // 50% chance of flipping the bool
    		}
    	case rune: // int32
    		vals[i] = rune(m.mutateInt(int64(v), math.MaxInt32))
    	case byte: // uint8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 20:01:34 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  7. src/math/rand/v2/exp.go

     * (Marsaglia & Tsang, 2000)
     * https://www.jstatsoft.org/v05/i08/paper [pdf]
     */
    
    const (
    	re = 7.69711747013104972
    )
    
    // ExpFloat64 returns an exponentially distributed float64 in the range
    // (0, +math.MaxFloat64] with an exponential distribution whose rate parameter
    // (lambda) is 1 and whose mean is 1/lambda (1).
    // To produce a distribution with a different rate parameter,
    // callers can adjust the output using:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 30 17:08:47 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  8. src/math/rand/exp.go

     * (Marsaglia & Tsang, 2000)
     * https://www.jstatsoft.org/v05/i08/paper [pdf]
     */
    
    const (
    	re = 7.69711747013104972
    )
    
    // ExpFloat64 returns an exponentially distributed float64 in the range
    // (0, +[math.MaxFloat64]] with an exponential distribution whose rate parameter
    // (lambda) is 1 and whose mean is 1/lambda (1).
    // To produce a distribution with a different rate parameter,
    // callers can adjust the output using:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/celcoststability_test.go

    			},
    		},
    		{name: "numbers",
    			obj:    objs(math.MaxFloat64, math.MaxFloat64, math.MaxFloat32, math.MaxFloat32, math.MaxFloat64, math.MaxFloat64, int64(1)),
    			schema: schemas(numberType, numberType, floatType, floatType, doubleType, doubleType, doubleType),
    			expectCost: map[string]int64{
    				ValsEqualThemselvesAndDataLiteral("self.val1", "self.val2", fmt.Sprintf("%f", math.MaxFloat64)): 11,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:20:16 UTC 2024
    - 80.2K bytes
    - Viewed (0)
  10. src/internal/fuzz/encoding_test.go

    		}
    	}
    }
    
    func FuzzFloat64RoundTrip(f *testing.F) {
    	f.Add(math.Float64bits(0))
    	f.Add(math.Float64bits(math.Copysign(0, -1)))
    	f.Add(math.Float64bits(math.MaxFloat64))
    	f.Add(math.Float64bits(math.SmallestNonzeroFloat64))
    	f.Add(math.Float64bits(math.NaN()))
    	f.Add(uint64(0x7FF0000000000001)) // signaling NaN
    	f.Add(math.Float64bits(math.Inf(1)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 00:20:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
Back to top