Skip to main content

f32_down

Function f32_down 

Source
pub fn f32_down(bits: impl FnMut() -> u64) -> f32
Expand description

Returns a random f32 distributed as a uniform real in (0 . . 1) rounded down (toward −∞) to the nearest representable value.

The f32 counterpart of f64_down; the result lies in [0 . . 1) and every f32 in that range is reachable, including subnormals and 0.