Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for MaxFloat64 (0.27 sec)

  1. src/internal/types/testdata/check/const1.go

    )
    
    const delta64 = maxFloat64/(1 << 52)
    
    const (
    	_ float64 = - /* ERROR "overflow" */ (maxFloat64 + delta64)
    	_ float64 = -maxFloat64
    	_ float64 = maxFloat64
    	_ float64 = maxFloat64 /* ERROR "overflow" */ + delta64
    
    	_ = float64(- /* ERROR "cannot convert" */ (maxFloat64 + delta64))
    	_ = float64(-maxFloat64)
    	_ = float64(maxFloat64)
    	_ = float64(maxFloat64 /* ERROR "cannot convert" */ + delta64)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 16:11:16 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  2. src/math/bits.go

    	// To avoid the floating-point hardware, could use:
    	//	x := Float64bits(f);
    	//	return sign >= 0 && x == uvinf || sign <= 0 && x == uvneginf;
    	return sign >= 0 && f > MaxFloat64 || sign <= 0 && f < -MaxFloat64
    }
    
    // normalize returns a normal number y and exponent exp
    // satisfying x == y × 2**exp. It assumes x is finite and non-zero.
    func normalize(x float64) (y float64, exp int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:52:29 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  3. src/math/huge_test.go

    )
    
    // Inputs to test trig_reduce
    var trigHuge = []float64{
    	1 << 28,
    	1 << 29,
    	1 << 30,
    	1 << 35,
    	1 << 120,
    	1 << 240,
    	1 << 480,
    	1234567891234567 << 180,
    	1234567891234567 << 300,
    	MaxFloat64,
    }
    
    // Results for trigHuge[i] calculated with https://github.com/robpike/ivy
    // using 4096 bits of working precision.   Values requiring less than
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 16:23:41 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/json/json_test.go

    		},
    		{
    			// Largest representable float64
    			In:   `1.797693134862315708145274237317043567981e+308`,
    			Data: float64(math.MaxFloat64),
    			Out:  strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64),
    		},
    		{
    			// Closest to zero without losing precision
    			In:   `2.2250738585072014e-308`,
    			Data: float64(2.2250738585072014e-308),
    			Out:  `2.2250738585072014e-308`,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 28 08:02:09 UTC 2022
    - 9.3K bytes
    - Viewed (0)
  5. src/math/rand/normal.go

    )
    
    func absInt32(i int32) uint32 {
    	if i < 0 {
    		return uint32(-i)
    	}
    	return uint32(i)
    }
    
    // NormFloat64 returns a normally distributed float64 in
    // the range -[math.MaxFloat64] through +[math.MaxFloat64] inclusive,
    // with standard normal distribution (mean = 0, stddev = 1).
    // To produce a different normal distribution, 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
    - 6.3K bytes
    - Viewed (0)
  6. 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)
  7. src/math/const.go

    const (
    	MaxFloat32             = 0x1p127 * (1 + (1 - 0x1p-23)) // 3.40282346638528859811704183484516925440e+38
    	SmallestNonzeroFloat32 = 0x1p-126 * 0x1p-23            // 1.401298464324817070923729583289916131280e-45
    
    	MaxFloat64             = 0x1p1023 * (1 + (1 - 0x1p-52)) // 1.79769313486231570814527423731704356798070e+308
    	SmallestNonzeroFloat64 = 0x1p-1022 * 0x1p-52            // 4.9406564584124654417656879286822137236505980e-324
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 21 14:07:39 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  8. src/math/rand/v2/normal.go

    	rn = 3.442619855899
    )
    
    func absInt32(i int32) uint32 {
    	if i < 0 {
    		return uint32(-i)
    	}
    	return uint32(i)
    }
    
    // NormFloat64 returns a normally distributed float64 in
    // the range -math.MaxFloat64 through +math.MaxFloat64 inclusive,
    // with standard normal distribution (mean = 0, stddev = 1).
    // To produce a different normal distribution, 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
    - 6.3K bytes
    - Viewed (0)
  9. src/math/remainder.go

    	if haveArchRemainder {
    		return archRemainder(x, y)
    	}
    	return remainder(x, y)
    }
    
    func remainder(x, y float64) float64 {
    	const (
    		Tiny    = 4.45014771701440276618e-308 // 0x0020000000000000
    		HalfMax = MaxFloat64 / 2
    	)
    	// special cases
    	switch {
    	case IsNaN(x) || IsNaN(y) || IsInf(x, 0) || y == 0:
    		return NaN()
    	case IsInf(y, 0):
    		return x
    	}
    	sign := false
    	if x < 0 {
    		x = -x
    		sign = true
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2K bytes
    - Viewed (0)
  10. 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)
Back to top