Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 53 for Float64frombits (0.32 sec)

  1. src/runtime/debug_test.go

    		t.Fatal(err)
    	}
    	var result0 int
    	var result1 float64
    	if len(intRegs) > 0 {
    		result0 = int(intRegs[0])
    		result1 = math.Float64frombits(floatRegs[0])
    	} else {
    		result0 = args.y0Ret
    		result1 = args.y1Ret
    	}
    	if result0 != 43 {
    		t.Errorf("want 43, got %d", result0)
    	}
    	if result1 != fval+1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 15:08:04 UTC 2023
    - 8K bytes
    - Viewed (0)
  2. src/syscall/dll_windows.go

    // "double", use uintptr(math.Float64bits(x)). Floating-point return
    // values are returned in r2. The return value for C type "float" is
    // [math.Float32frombits](uint32(r2)). For C type "double", it is
    // [math.Float64frombits](uint64(r2)).
    //
    //go:uintptrescapes
    func (p *Proc) Call(a ...uintptr) (uintptr, uintptr, error) {
    	return SyscallN(p.Addr(), a...)
    }
    
    // A LazyDLL implements access to a single [DLL].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. src/strconv/atof_test.go

    	for i := range atofRandomTests {
    		n := uint64(rand.Uint32())<<32 | uint64(rand.Uint32())
    		x := math.Float64frombits(n)
    		s := FormatFloat(x, 'g', -1, 64)
    		atofRandomTests[i] = atofSimpleTest{x, s}
    	}
    
    	for i := range benchmarksRandomBits {
    		bits := uint64(rand.Uint32())<<32 | uint64(rand.Uint32())
    		x := math.Float64frombits(bits)
    		benchmarksRandomBits[i] = FormatFloat(x, 'g', -1, 64)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 16:24:57 UTC 2022
    - 23.6K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/telemetry/internal/upload/reports.go

    func computeRandom() float64 {
    	for {
    		b := make([]byte, 8)
    		_, err := rand.Read(b)
    		if err != nil {
    			panic(fmt.Sprintf("rand.Read failed: %v", err))
    		}
    		// and turn it into a float64
    		x := math.Float64frombits(binary.LittleEndian.Uint64(b))
    		if math.IsNaN(x) || math.IsInf(x, 0) {
    			continue
    		}
    		x = math.Abs(x)
    		if x < 0x1p-1000 { // avoid underflow patterns
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/arch/arm/armasm/plan9x.go

    			case VLDR_EQ:
    				switch {
    				case strings.HasPrefix(args[0], "D"): // VLDR.F64
    					if _, err := text.ReadAt(buf, int64(addr)); err != nil {
    						break
    					}
    					args[1] = fmt.Sprintf("$%f", math.Float64frombits(binary.LittleEndian.Uint64(buf)))
    				case strings.HasPrefix(args[0], "S"): // VLDR.F32
    					if _, err := text.ReadAt(buf[:4], int64(addr)); err != nil {
    						break
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  6. src/math/all_test.go

    	{NaN(), NaN()},
    }
    var nextafter64SC = []float64{
    	0,
    	0,
    	-4.9406564584124654418e-324, // Float64frombits(0x8000000000000001)
    	NaN(),
    	4.9406564584124654418e-324, // Float64frombits(0x0000000000000001)
    	Copysign(0, -1),
    	Copysign(0, -1),
    	-4.9406564584124654418e-324, // Float64frombits(0x8000000000000001)
    	NaN(),
    	NaN(),
    }
    
    var vfpowSC = [][2]float64{
    	{Inf(-1), -Pi},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 07 17:39:26 UTC 2023
    - 86.8K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/rewrite.go

    }
    
    // auxTo32F decodes a float32 from the AuxInt value provided.
    func auxTo32F(i int64) float32 {
    	return truncate64Fto32F(math.Float64frombits(uint64(i)))
    }
    
    // auxTo64F decodes a float64 from the AuxInt value provided.
    func auxTo64F(i int64) float64 {
    	return math.Float64frombits(uint64(i))
    }
    
    func auxIntToBool(i int64) bool {
    	if i == 0 {
    		return false
    	}
    	return true
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/appendixa_test.go

    		// everything to JSON.
    		{
    			example: hex("f97c00"),
    			decoded: math.Inf(1),
    		},
    		{
    			example: hex("f97e00"),
    			decoded: math.Float64frombits(0x7ff8000000000000),
    		},
    		{
    			example: hex("f9fc00"),
    			decoded: math.Inf(-1),
    		},
    		{
    			example: hex("fa7f800000"),
    			decoded: math.Inf(1),
    			encoded: hex("f97c00"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 15 18:59:36 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/x86/ssa.go

    		x := v.Reg()
    		p := s.Prog(v.Op.Asm())
    		p.From.Type = obj.TYPE_FCONST
    		p.From.Val = math.Float64frombits(uint64(v.AuxInt))
    		p.To.Type = obj.TYPE_REG
    		p.To.Reg = x
    	case ssa.Op386MOVSSconst1, ssa.Op386MOVSDconst1:
    		p := s.Prog(x86.ALEAL)
    		p.From.Type = obj.TYPE_MEM
    		p.From.Name = obj.NAME_EXTERN
    		f := math.Float64frombits(uint64(v.AuxInt))
    		if v.Op == ssa.Op386MOVSDconst1 {
    			p.From.Sym = base.Ctxt.Float64Sym(f)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 01:26:58 UTC 2023
    - 26.7K bytes
    - Viewed (0)
  10. 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)
Back to top