Skip to main content

Module interval

Module interval 

Source
Expand description

Directed-rounding f64 interval tier — the predicate cascade’s fast path.

Every op widens the interval OUTWARD (round-to-nearest then ±1 ULP), so the true real value is always bracketed. A predicate’s sign is returned only when the result interval is strictly one side of zero; a straddling interval is a genuine near-degeneracy and escalates to the exact (BigRational) tier. Because the interval can never claim a definite sign it doesn’t have, it can never return a WRONG sign — proven by the soundness test against the oracle.

next_up/next_down are integer bit-twiddles (not f64::next_up), so the widening is bit-identical across x86_64/aarch64/wasm — the determinism bar. No mul_add/FMA anywhere (contraction would break the directed rounding).

Structs§

RnInterval

Functions§

cmp_along
Interval tier of cmp_along — the f64 mirror of fixed::cmp_along: the sign of (a−b)·u over the homogeneous lambdas. None on a zero-straddle ⇒ the caller runs the exact I512/BigRational tiers. Closes the latent slow path where EVERY tri-tri cmp_along skipped the float filter and went straight to bignum.
cmp_lex
Interval tier of rational::cmp_lex. None if the deciding axis straddles zero (escalate to exact). A definite-Zero axis advances to the next.
lpi_orient2d
lpi_orient3d
next_down
Largest representable f64 strictly less than x (toward −∞).
next_up
Smallest representable f64 strictly greater than x (toward +∞).
orient2d_2i
Interval tier of rational::orient2d_2iNone on a zero-straddle.
orient2d_3i
Interval tier of rational::orient2d_3iNone on a zero-straddle.
tpi_orient2d
tpi_orient3d