Skip to main content

logos_approx_eq

Function logos_approx_eq 

Source
pub fn logos_approx_eq(a: f64, b: f64) -> bool
Expand description

a is approximately b — the TOLERANT float comparison (== is IEEE bit-exact). Python’s math.isclose semantics: relative tolerance 1e-9 (nine significant digits agree) with absolute floor 1e-12 (so values near zero compare sanely), plus an exact fast path so inf is approximately inf holds. NaN is approximately nothing. ONE definition — the tree-walker, VM, JIT deopt path, AOT, and WASM lowering all share it.