pub fn two_diff(a: f64, b: f64) -> (f64, f64)Expand description
Computes a - b and its rounding error.
Requirement: a - b does not overflow.
ยงExamples
use implicit_predicates_core::eft::two_diff;
let (x, y) = two_diff(1.0, 1e-20);
assert_eq!(x, 1.0);
assert_eq!(y, -1e-20);