- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for float64FromBits (0.24 sec)
-
src/runtime/float.go
// // abs(±Inf) = +Inf // abs(NaN) = NaN func abs(x float64) float64 { const sign = 1 << 63 return float64frombits(float64bits(x) &^ sign) } // copysign returns a value with the magnitude // of x and the sign of y. func copysign(x, y float64) float64 { const sign = 1 << 63 return float64frombits(float64bits(x)&^sign | float64bits(y)&sign) } // float64bits returns the IEEE 754 binary representation of f.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 02:39:39 UTC 2022 - 1.4K bytes - Viewed (0) -
src/math/unsafe.go
// and Float64bits(Float64frombits(x)) == x. func Float64bits(f float64) uint64 { return *(*uint64)(unsafe.Pointer(&f)) } // Float64frombits returns the floating-point number corresponding // to the IEEE 754 binary representation b, with the sign bit of b // and the result in the same bit position. // Float64frombits(Float64bits(x)) == x.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 1.6K bytes - Viewed (0) -
src/math/nextafter.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 1.2K bytes - Viewed (0) -
src/math/cbrt.go
} // rough cbrt to 5 bits t := Float64frombits(Float64bits(x)/3 + B1<<32) if x < SmallestNormal { // subnormal number t = float64(1 << 54) // set t= 2**54 t *= x t = Float64frombits(Float64bits(t)/3 + B2<<32) } // new cbrt to 23 bits r := t * t / x s := C + r*t t *= G + F/(s+E+D/s) // chop to 22 bits, make larger than cbrt(x) t = Float64frombits(Float64bits(t)&(0xFFFFFFFFC<<28) + 1<<30)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 2.3K bytes - Viewed (0) -
src/math/expm1.go
y := 1 - (e - x) y = Float64frombits(Float64bits(y) + uint64(k)<<52) // add k to y's exponent return y - 1 } if k < 20 { t := Float64frombits(0x3ff0000000000000 - (0x20000000000000 >> uint(k))) // t=1-2**-k y := t - (e - x) y = Float64frombits(Float64bits(y) + uint64(k)<<52) // add k to y's exponent return y } t = Float64frombits(uint64(0x3ff-k) << 52) // 2**-k y := x - (e + t) y++
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 7.9K bytes - Viewed (0) -
src/math/bits.go
func Inf(sign int) float64 { var v uint64 if sign >= 0 { v = uvinf } else { v = uvneginf } return Float64frombits(v) } // NaN returns an IEEE 754 “not-a-number” value. func NaN() float64 { return Float64frombits(uvnan) } // IsNaN reports whether f is an IEEE 754 “not-a-number” value. func IsNaN(f float64) (is bool) { // IEEE 754 says that only NaNs satisfy f != f.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 17:52:29 UTC 2022 - 1.9K bytes - Viewed (0) -
src/math/big/float_test.go
{"0x1.9p-1074", math.Float64frombits(0x00000000000000002), Above}, {"0x2.0p-1074", math.Float64frombits(0x00000000000000002), Exact}, {"0x2.8p-1074", math.Float64frombits(0x00000000000000002), Below}, // rounded down to even {"0x2.9p-1074", math.Float64frombits(0x00000000000000003), Above}, {"0x3.0p-1074", math.Float64frombits(0x00000000000000003), Exact},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 11 20:22:45 UTC 2024 - 51.9K bytes - Viewed (0) -
src/runtime/softfloat64_test.go
) // turn uint64 op into float64 op func fop(f func(x, y uint64) uint64) func(x, y float64) float64 { return func(x, y float64) float64 { bx := math.Float64bits(x) by := math.Float64bits(y) return math.Float64frombits(f(bx, by)) } } func add(x, y float64) float64 { return x + y } func sub(x, y float64) float64 { return x - y } func mul(x, y float64) float64 { return x * y } func div(x, y float64) float64 { return x / y }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 4K bytes - Viewed (0) -
src/internal/fuzz/encoding_test.go
uint8(0b0000000) byte(0x0) byte('\000') byte('\u0000') byte('\'') math.Float64frombits(9221120237041090562) math.Float32frombits(2143289345)`, want: `go test fuzz v1 int(0) rune('A') int64(68719476735) uint32(3405705229) uint64(18446744073709551615) byte('\x00') byte('\x00') byte('\x00') byte('\x00') byte('\'') math.Float64frombits(0x7ff8000000000002) math.Float32frombits(0x7fc00001)`, }, {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 00:20:34 UTC 2024 - 8.2K bytes - Viewed (0) -
src/encoding/gob/decgen.go
}, { "complex128", "Complex128", `real := float64FromBits(state.decodeUint()) imag := float64FromBits(state.decodeUint()) slice[i] = complex(real, imag)`, }, { "float32", "Float32", `slice[i] = float32(float32FromBits(state.decodeUint(), ovfl))`, }, { "float64", "Float64", `slice[i] = float64FromBits(state.decodeUint())`, }, { "int", "Int",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 14:15:38 UTC 2024 - 5.3K bytes - Viewed (0)