Function twofloat::no_overlap

source ·
pub fn no_overlap(a: f64, b: f64) -> bool
Expand description

Checks if two f64 values do not overlap, with the first value being the more significant. This matches definition 1.4 in Joldes et al. (2017).

Examples

let a = no_overlap(1.0, -1e-200);
let b = no_overlap(1e-200, 1.0);
let c = no_overlap(1.0, 0.25);

assert!(a);
assert!(!b);
assert!(!c);