pub fn float64(bits: &Bits) -> f64Expand description
Converts up to the first 64 bits of a bit string to a 64 bit float
ยงExample
let bits = Bits::new([0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE]);
let float = bits_as::float64(&bits);
assert_eq!(float, f64::from_bits(0xFEDCBA9876543210));
let bits = Bits::new([0x10, 0x32, 0x54]);
let float = bits_as::float64(&bits);
assert_eq!(float, f64::from_bits(0x0000000000543210));