Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,264 for float1 (0.11 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. test/fixedbugs/issue56220.go

    package p
    
    func f() int {
    	return int(1 - .0000001) // ERROR "cannot convert 1 - \.0000001 \(untyped float constant 0\.9999999\) to type int"
    }
    
    func g() int64 {
    	return int64((float64(0.03) - float64(0.02)) * 1_000_000) // ERROR "cannot convert \(float64\(0\.03\) - float64\(0\.02\)\) \* 1_000_000 \(constant 9999\.999999999998 of type float64\) to type int64"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 20 21:52:09 UTC 2022
    - 539 bytes
    - Viewed (0)
  7. 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)
  8. src/expvar/expvar.go

    }
    
    func (v *Int) Set(value int64) {
    	v.i.Store(value)
    }
    
    // Float is a 64-bit float variable that satisfies the [Var] interface.
    type Float struct {
    	f atomic.Uint64
    }
    
    func (v *Float) Value() float64 {
    	return math.Float64frombits(v.f.Load())
    }
    
    func (v *Float) String() string {
    	return string(v.appendJSON(nil))
    }
    
    func (v *Float) appendJSON(b []byte) []byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 21:32:11 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/saved_model/core/ops/restore_ops_test.cc

    // --file_name="$CKPT_PREFIX".
    // Here are the values for VarsAndArithmeticObjectGraph:
    // tensor: child/z/.ATTRIBUTES/VARIABLE_VALUE (float32) []
    // 3.0
    // tensor: x/.ATTRIBUTES/VARIABLE_VALUE (float32) []
    // 1.0
    // tensor: y/.ATTRIBUTES/VARIABLE_VALUE (float32) []
    // 2.0
    
    TEST_F(RestoreOpsTest, RestoreSuccessful) {
      ImmediateTensorHandlePtr x_handle;
      TF_EXPECT_OK(internal::SingleRestore(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  10. src/internal/abi/abi.go

    	// be in the top bits of the slot. Floats are usually just
    	// directly represented, but some architectures treat narrow
    	// width floating point values specially (e.g. they're promoted
    	// first, or they need to be NaN-boxed).
    	Ints   [IntArgRegs]uintptr  // untyped integer registers
    	Floats [FloatArgRegs]uint64 // untyped float registers
    
    	// Fields above this point are known to assembly.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 23 15:51:32 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top