Skip to main content

ulp

Function ulp 

Source
pub fn ulp(x: f64) -> f64
Expand description

Distance from x to the next representable f64 toward +infinity.

ยงExamples

use mathverse_core::precision::ulp;

assert!(ulp(1.0) < 1e-15);
assert!(ulp(-1.0) < 1e-15);