Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 42 for float64FromBits (0.38 sec)

  1. src/encoding/binary/binary.go

    	case reflect.Float64:
    		v.SetFloat(math.Float64frombits(d.uint64()))
    
    	case reflect.Complex64:
    		v.SetComplex(complex(
    			float64(math.Float32frombits(d.uint32())),
    			float64(math.Float32frombits(d.uint32())),
    		))
    	case reflect.Complex128:
    		v.SetComplex(complex(
    			math.Float64frombits(d.uint64()),
    			math.Float64frombits(d.uint64()),
    		))
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:29:31 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  2. src/runtime/export_debug_ppc64le_test.go

    		} else {
    			dst.gp_regs[i+3] = uint64(src.Ints[i])
    		}
    	}
    	// Fprs F1..F13 are used to pass float arguments in registers on PPC64
    	for i := 0; i < 12; i++ {
    		dst.fp_regs[i+1] = math.Float64frombits(src.Floats[i])
    	}
    
    }
    
    func loadRegArgs(dst *abi.RegArgs, src *sigcontext) {
    	// Gprs R3..R10, R14..R17 are used to pass int arguments in registers on PPC64
    	for i := range [12]int{} {
    		if i > 7 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 15:33:38 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  3. src/encoding/gob/decode.go

    // the exponent end coming out first, so integer floating point numbers
    // (for example) transmit more compactly. This routine does the
    // unswizzling.
    func float64FromBits(u uint64) float64 {
    	v := bits.ReverseBytes64(u)
    	return math.Float64frombits(v)
    }
    
    // float32FromBits decodes an unsigned integer, treats it as a 32-bit floating-point
    // number, and returns it. It's a helper function for float32 and complex64.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  4. src/encoding/binary/binary_test.go

    	0x10,
    	0x1112,
    	0x13141516,
    	0x1718191a1b1c1d1e,
    
    	math.Float32frombits(0x1f202122),
    	math.Float64frombits(0x232425262728292a),
    	complex(
    		math.Float32frombits(0x2b2c2d2e),
    		math.Float32frombits(0x2f303132),
    	),
    	complex(
    		math.Float64frombits(0x333435363738393a),
    		math.Float64frombits(0x3b3c3d3e3f404142),
    	),
    
    	[4]uint8{0x43, 0x44, 0x45, 0x46},
    
    	true,
    	[4]bool{true, false, true, false},
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:16:18 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top