Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 2,057 for float2 (0.1 sec)

  1. src/math/big/float_test.go

    		opname        rune
    		op            func(z, x, y *Float) *Float
    	}{
    		{0, 0, 0, 0, '+', (*Float).Add},
    		{0, 1, 2, 3, '+', (*Float).Add},
    		{1, 2, 0, 2, '+', (*Float).Add},
    		{2, 0, 1, 1, '+', (*Float).Add},
    
    		{0, 0, 0, 0, '-', (*Float).Sub},
    		{0, 1, 2, -1, '-', (*Float).Sub},
    		{1, 2, 0, 2, '-', (*Float).Sub},
    		{2, 0, 1, -1, '-', (*Float).Sub},
    
    		{0, 0, 0, 0, '*', (*Float).Mul},
    		{0, 1, 2, 2, '*', (*Float).Mul},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 51.9K bytes
    - Viewed (0)
  2. guava-gwt/src-super/com/google/common/primitives/super/com/google/common/primitives/FloatsMethodsForWeb.java

    import jsinterop.annotations.JsPackage;
    
    /** Web specializations for {@link Floats} methods. */
    public abstract class FloatsMethodsForWeb {
    
      @JsMethod(name = "Math.min", namespace = JsPackage.GLOBAL)
      public static native float min(float... array);
    
      @JsMethod(name = "Math.max", namespace = JsPackage.GLOBAL)
      public static native float max(float... array);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Oct 26 00:50:12 UTC 2023
    - 1K bytes
    - Viewed (0)
  3. test/fixedbugs/bug470.go

    import "fmt"
    
    const (
        F32 = 0.00999999977648258209228515625
        F64 = 0.01000000000000000020816681711721685132943093776702880859375
    )
    
    var F = float64(float32(0.01))
    
    func main() {
    	// 0.01 rounded to float32 then to float64 is F32.
    	// 0.01 represented directly in float64 is F64.
    	if F != F32 {
    		panic(fmt.Sprintf("F=%.1000g, want %.1000g", F, F32))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 608 bytes
    - Viewed (0)
  4. src/runtime/float_test.go

    		0x8234508000000001, // from issue48807
    		1<<56 + 1<<32 + 1,
    	} {
    		got := float32(i)
    		dontwant := float32(float64(i))
    		if got == dontwant {
    			// The test cases above should be uint64s such that
    			// this equality doesn't hold. These examples trigger
    			// the case where using an intermediate float64 doesn't work.
    			t.Errorf("direct float32 conversion doesn't work: arg=%x got=%x dontwant=%x", i, got, dontwant)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 07 18:34:24 UTC 2021
    - 699 bytes
    - Viewed (0)
  5. src/math/rand/v2/rand_test.go

    		ve float64 = 3.9496598225815571993e-3
    	)
    
    	testKe = make([]uint32, 256)
    	testWe = make([]float32, 256)
    	testFe = make([]float32, 256)
    
    	q := ve / math.Exp(-de)
    	testKe[0] = uint32((de / q) * m2)
    	testKe[1] = 0
    	testWe[0] = float32(q / m2)
    	testWe[255] = float32(de / m2)
    	testFe[0] = 1.0
    	testFe[255] = float32(math.Exp(-de))
    	for i := 254; i >= 1; i-- {
    		de = -math.Log(ve/de + math.Exp(-de))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  6. test/nilptr5_wasm.go

    // license that can be found in the LICENSE file.
    
    // Test that nil checks are removed.
    // Optimization is enabled.
    
    package p
    
    func f5(p *float32, q *float64, r *float32, s *float64) float64 {
    	x := float64(*p) // ERROR "generated nil check"
    	y := *q          // ERROR "generated nil check"
    	*r = 7           // ERROR "generated nil check"
    	*s = 9           // ERROR "generated nil check"
    	return x + y
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 813 bytes
    - Viewed (0)
  7. test/fixedbugs/bug341.go

    // license that can be found in the LICENSE file.
    
    // Used to panic because 8g was generating incorrect
    // code for converting a negative float to a uint64.
    
    package main
    
    func main() {
    	var x float32 = -2.5
    
    	_ = uint64(x)
    	_ = float32(0)
    }
    /*
    panic: runtime error: floating point error
    
    [signal 0x8 code=0x6 addr=0x8048c64 pc=0x8048c64]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 459 bytes
    - Viewed (0)
  8. src/math/rand/export_test.go

    package rand
    
    func Int31nForTest(r *Rand, n int32) int32 {
    	return r.int31n(n)
    }
    
    func GetNormalDistributionParameters() (float64, [128]uint32, [128]float32, [128]float32) {
    	return rn, kn, wn, fn
    }
    
    func GetExponentialDistributionParameters() (float64, [256]uint32, [256]float32, [256]float32) {
    	return re, ke, we, fe
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 28 16:06:21 UTC 2021
    - 482 bytes
    - Viewed (0)
  9. src/runtime/vlrt.go

    	sign64 = 1 << (64 - 1)
    )
    
    func float64toint64(d float64) (y uint64) {
    	_d2v(&y, d)
    	return
    }
    
    func float64touint64(d float64) (y uint64) {
    	_d2v(&y, d)
    	return
    }
    
    func int64tofloat64(y int64) float64 {
    	if y < 0 {
    		return -uint64tofloat64(-uint64(y))
    	}
    	return uint64tofloat64(uint64(y))
    }
    
    func uint64tofloat64(y uint64) float64 {
    	hi := float64(uint32(y >> 32))
    	lo := float64(uint32(y))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 6.7K bytes
    - Viewed (0)
  10. src/go/constant/value_test.go

    	}
    }
    
    func TestMakeFloat64(t *testing.T) {
    	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
    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