Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for MaxFloat64 (0.44 sec)

  1. internal/s3select/sql/value_test.go

    		},
    		{
    			name: "max",
    			fields: fields{
    				value: []byte(strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64)),
    			},
    			want:   math.MaxFloat64,
    			wantOK: true,
    		},
    		{
    			name: "min",
    			fields: fields{
    				value: []byte(strconv.FormatFloat(-math.MaxFloat64, 'g', -1, 64)),
    			},
    			want:   -math.MaxFloat64,
    			wantOK: true,
    		},
    		{
    			name: "max-overflow",
    			fields: fields{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Mar 06 16:56:10 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  2. src/math/big/rat_test.go

    // approximation of r.
    // Returns true on success.
    func checkIsBestApprox64(t *testing.T, f float64, r *Rat) bool {
    	if math.Abs(f) >= math.MaxFloat64 {
    		// Cannot check +Inf, -Inf, nor the float next to them (MaxFloat64).
    		// But we have tests for these special cases.
    		return true
    	}
    
    	// r must be strictly between f0 and f1, the floats bracketing f.
    	f0 := math.Nextafter(f, math.Inf(-1))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 07 00:15:59 UTC 2022
    - 18.9K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  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. src/testing/quick/quick.go

    	if rand.Int()&1 == 1 {
    		f = -f
    	}
    	return float32(f)
    }
    
    // randFloat64 generates a random float taking the full range of a float64.
    func randFloat64(rand *rand.Rand) float64 {
    	f := rand.Float64() * math.MaxFloat64
    	if rand.Int()&1 == 1 {
    		f = -f
    	}
    	return f
    }
    
    // randInt64 returns a random int64.
    func randInt64(rand *rand.Rand) int64 {
    	return int64(rand.Uint64())
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:47 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  10. src/go/constant/value_test.go

    	var zero float64
    	for _, arg := range []float64{
    		-math.MaxFloat32,
    		-10,
    		-0.5,
    		-zero,
    		zero,
    		1,
    		10,
    		123456789.87654321e-23,
    		1e10,
    		math.MaxFloat64,
    	} {
    		val := MakeFloat64(arg)
    		if val.Kind() != Float {
    			t.Errorf("%v: got kind = %d; want %d", arg, val.Kind(), Float)
    		}
    
    		// -0.0 is mapped to 0.0
    		got, exact := Float64Val(val)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 15.6K bytes
    - Viewed (0)
Back to top