- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 72 for Float64frombits (0.53 sec)
-
src/math/erf.go
} else { // |x| >= 1 / 0.35 ~ 2.857143 R = rb0 + s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(rb5+s*rb6))))) S = 1 + s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(sb5+s*(sb6+s*sb7)))))) } z := Float64frombits(Float64bits(x) & 0xffffffff00000000) // pseudo-single (20-bit) precision x r := Exp(-z*z-0.5625) * Exp((z-x)*(z+x)+R/S) if sign { return r/x - 1 } return 1 - r/x }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 11.5K bytes - Viewed (0) -
src/encoding/gob/debug.go
fmt.Fprintf(os.Stderr, "%s%d\n", indent, x) case tFloat: x := deb.uint64() fmt.Fprintf(os.Stderr, "%s%g\n", indent, float64FromBits(x)) case tComplex: r := deb.uint64() i := deb.uint64() fmt.Fprintf(os.Stderr, "%s%g+%gi\n", indent, float64FromBits(r), float64FromBits(i)) case tBytes: x := int(deb.uint64()) b := make([]byte, x) deb.r.Read(b) deb.consumed(x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 20 09:34:41 UTC 2023 - 18.3K 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/strconv/atof.go
if neg { bits |= 1 << flt.mantbits << flt.expbits } if flt == &float32info { return float64(math.Float32frombits(uint32(bits))), err } return math.Float64frombits(bits), err } const fnParseFloat = "ParseFloat" func atof32(s string) (f float32, n int, err error) { if val, n, ok := special(s); ok { return float32(val), n, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 06 18:50:50 UTC 2022 - 15.9K bytes - Viewed (0) -
src/strconv/ftoa_test.go
if testing.Short() { N = 100 } t.Logf("testing %d random numbers with fast and slow FormatFloat", N) for i := 0; i < N; i++ { bits := uint64(rand.Uint32())<<32 | uint64(rand.Uint32()) x := math.Float64frombits(bits) shortFast := FormatFloat(x, 'g', -1, 64) SetOptimize(false) shortSlow := FormatFloat(x, 'g', -1, 64) SetOptimize(true) if shortSlow != shortFast {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 24 23:50:20 UTC 2022 - 9.3K bytes - Viewed (0) -
src/math/cmplx/tan.go
// Clear implicit mantissa bit and shift into place. hi = (hi << (lz + 1)) | (lo >> (64 - (lz + 1))) hi >>= 64 - shift // Include the exponent and convert to a float. hi |= e << shift x = math.Float64frombits(hi) // map to (-Pi/2, Pi/2] if x > 0.5 { x-- } return math.Pi * x } // Taylor series expansion for cosh(2y) - cos(2x) func tanSeries(z complex128) float64 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 01 03:16:37 UTC 2020 - 8.5K bytes - Viewed (0) -
src/runtime/debug_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 15:08:04 UTC 2023 - 8K bytes - Viewed (0) -
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) -
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)