Skip to main content

Module machine_epsilon

Module machine_epsilon 

Source
Expand description

Machine epsilon and unit-in-the-last-place helpers.

See the book entry Shared types, constants and utilities.

Functions§

approx_eq_ulps
Whether a and b differ by at most max_ulps representable values.
machine_epsilon
Machine epsilon of f64: the gap between 1.0 and the next representable number (2⁻⁵²).
machine_epsilon_f32
Machine epsilon of f32 (2⁻²³).
measure_machine_epsilon
Determines the f64 machine epsilon empirically by halving until 1 + e/2 == 1.
ulp
Spacing between x and the next larger-magnitude f64 (the unit in the last place). NaN for non-finite input.
ulps_between
Number of representable f64 values between a and b (0 if equal; None if either is NaN).