Expand description
IEEE-754 non-finite propagation helpers for native BigFloat arithmetic.
Two entry points:
nonfinite_binop— used by the arithmetic operators (+,-,*,/,%). Handles both NaN/Inf propagation and non-finite generation (e.g.finite / 0produces±Inf;0 / 0orInf - InfproducesNaN).nonfinite_propagate— input-propagation subset only (no generation from finite inputs). Used by the checked methods (div_ref,sqrt_ref, …) so they keep theirErr(DivByZero)/Err(Domain)contract on finite-domain errors while still propagating non-finite inputs.
§Rem special case
For Rem, when rhs is Infinite and lhs is finite, nonfinite_binop returns
None — the caller should return lhs.clone() (IEEE rule: finite % Inf = finite).
Enums§
- BinOp
- Describes which binary operation is being performed.
Functions§
- nonfinite_
binop - IEEE-754 binary operation table for non-finite inputs or non-finite results generated from finite inputs (zero divisors).
- nonfinite_
propagate - Input-propagation subset only: propagates NaN/Inf inputs; does not generate
Inf from finite-zero divisors (the caller keeps
Err(DivByZero)for that case).