Skip to main content

f64_117

Function f64_117 

Source
pub fn f64_117(bits: impl FnMut() -> u64) -> f64
Expand description

Returns a random f64 distributed as a uniform 117-bit fixed-point real in [0 . . 1) rounded down to the nearest representable value: every float in [2⁻⁶⁵ . . 1), and the multiples of 2⁻¹¹⁷ below 2⁻⁶⁵.

A port of Float64_117: as f64_64, except that when the first word has 12 or more leading zeros (probability 2⁻¹²) a second word extends the fixed point to 117 bits.