Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 42 for float64FromBits (0.27 sec)

  1. src/log/slog/value.go

    	if g, w := v.Kind(), KindFloat64; g != w {
    		panic(fmt.Sprintf("Value kind is %s, not %s", g, w))
    	}
    
    	return v.float()
    }
    
    func (v Value) float() float64 {
    	return math.Float64frombits(v.num)
    }
    
    // Time returns v's value as a [time.Time]. It panics
    // if v is not a time.Time.
    func (v Value) Time() time.Time {
    	if g, w := v.Kind(), KindTime; g != w {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:12:08 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. src/cmd/internal/obj/ppc64/asm_test.go

    		// Misc (golang initializes -0.0 to 0.0, hence the obfuscation below)
    		{obj.Addr{Type: obj.TYPE_TEXTSIZE}, C_TEXTSIZE},
    		{obj.Addr{Type: obj.TYPE_FCONST, Val: 0.0}, C_ZCON},
    		{obj.Addr{Type: obj.TYPE_FCONST, Val: math.Float64frombits(0x8000000000000000)}, C_S16CON},
    
    		// Address type arguments
    		{obj.Addr{Type: obj.TYPE_ADDR, Reg: REG_R0, Name: obj.NAME_NONE, Offset: 1}, C_SACON},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 09 22:14:57 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/value.go

    }
    
    func (v *Value) AuxFloat() float64 {
    	if opcodeTable[v.Op].auxType != auxFloat32 && opcodeTable[v.Op].auxType != auxFloat64 {
    		v.Fatalf("op %s doesn't have a float aux field", v.Op)
    	}
    	return math.Float64frombits(uint64(v.AuxInt))
    }
    func (v *Value) AuxValAndOff() ValAndOff {
    	if opcodeTable[v.Op].auxType != auxSymValAndOff {
    		v.Fatalf("op %s doesn't have a ValAndOff aux field", v.Op)
    	}
    	return ValAndOff(v.AuxInt)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:40:22 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	// See issue 36399 and 36400.
    	// Encodings of +inf, -inf, and -0 are fine.
    	{name: "Const32F", aux: "Float32"}, // value is math.Float64frombits(uint64(auxint)) and is exactly representable as float 32
    	{name: "Const64F", aux: "Float64"}, // value is math.Float64frombits(uint64(auxint))
    	{name: "ConstInterface"},           // nil interface
    	{name: "ConstSlice"},               // nil slice
    
    	// Constant-like things
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/PPC64.rules

    (MOVDstore [off] {sym} ptr (MFVSRD x) mem) => (FMOVDstore [off] {sym} ptr x mem)
    
    (MTVSRD (MOVDconst [c])) && !math.IsNaN(math.Float64frombits(uint64(c))) => (FMOVDconst [math.Float64frombits(uint64(c))])
    (MFVSRD (FMOVDconst [c])) => (MOVDconst [int64(math.Float64bits(c))])
    
    (MTVSRD x:(MOVDload [off] {sym} ptr mem)) && x.Uses == 1 && clobber(x) => @x.Block (FMOVDload [off] {sym} ptr mem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 53.2K bytes
    - Viewed (0)
  6. src/runtime/mgcscavenge_test.go

    		if !isNormal(min) || !isNormal(max) || min > max {
    			return
    		}
    		// Use a random source, but make it deterministic.
    		rs := rand.New(rand.NewSource(800))
    		randFloat64 := func() float64 {
    			return math.Float64frombits(rs.Uint64())
    		}
    		p := NewPIController(kp, ti, tt, min, max)
    		state := float64(0)
    		for i := 0; i < 100; i++ {
    			input := randFloat64()
    			// Ignore the "ok" parameter. We're just trying to break it.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  7. src/cmd/cgo/gcc.go

    							if sdat, err := sect.Data(); err == nil {
    								data := sdat[s.Value-sect.Addr:]
    								floats = make([]float64, len(data)/8)
    								for i := range floats {
    									floats[i] = math.Float64frombits(bo.Uint64(data[i*8:]))
    								}
    							}
    						}
    					}
    				default:
    					if n := indexOfDebugStr(s.Name); n != -1 {
    						// Found it. Now find data section.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
  8. src/runtime/syscall_windows_test.go

    	proc = dll.MustFindProc("cfuncDouble")
    
    	_, r, err = proc.Call(
    		1,
    		uintptr(math.Float64bits(2.2)),
    		uintptr(math.Float32bits(3.3)),
    		uintptr(math.Float64bits(4.4e44)),
    	)
    	dr := math.Float64frombits(uint64(r))
    	if dr != 2.5 {
    		t.Errorf("got %f want 2.5 (err=%v)", dr, err)
    	}
    }
    
    func TestTimeBeginPeriod(t *testing.T) {
    	const TIMERR_NOERROR = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  9. src/encoding/gob/encoder_test.go

    		t.Errorf("decode: expected duplicate type error, got %s", err.Error())
    	}
    }
    
    // Issue 24075
    func TestMarshalFloatMap(t *testing.T) {
    	nan1 := math.NaN()
    	nan2 := math.Float64frombits(math.Float64bits(nan1) ^ 1) // A different NaN in the same class.
    
    	in := map[float64]string{
    		nan1: "a",
    		nan1: "b",
    		nan2: "c",
    	}
    
    	var b bytes.Buffer
    	enc := NewEncoder(&b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  10. test/escape2n.go

    }
    
    func Float32frombits(b uint32) float32 {
    	return *(*float32)(unsafe.Pointer(&b))
    }
    
    func Float64bits(f float64) uint64 {
    	return *(*uint64)(unsafe.Pointer(&f))
    }
    
    func Float64frombits(b uint64) float64 {
    	return *(*float64)(unsafe.Pointer(&b))
    }
    
    // contrast with
    func float64bitsptr(f float64) *uint64 { // ERROR "moved to heap: f$"
    	return (*uint64)(unsafe.Pointer(&f))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
Back to top