Skip to main content

ulp_distance

Function ulp_distance 

Source
pub fn ulp_distance(a: f32, b: f32) -> u32
Expand description

Compute the ULP distance between two f32 values.

Returns the number of representable floats between a and b. Special cases: if either value is NaN, returns u32::MAX. If signs differ and neither is zero, returns u32::MAX.