- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for float64FromBits (0.3 sec)
-
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) -
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) -
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) -
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) -
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) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/appendixa_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 15 18:59:36 UTC 2024 - 15.8K bytes - Viewed (0) -
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) -
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) -
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) -
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)