Function smartnoise_runtime::utilities::binary_to_f64 [−][src]
pub fn binary_to_f64(binary_string: &str) -> Result<f64>
Converts String
of length 64 to f64
, yielding the floating-point number represented by the String
.
The first bit of the string is the sign, the next 11 are the exponent, and the last 52 are the mantissa. See here for an explanation of IEEE-754 64-bit floating-point numbers.
Arguments
binary_string
: String showing IEEE-754 binary representation of a number
Return
num
: f64 version of the String