Expand description
Arbitrary-length expansion arithmetic.
An expansion is a list of non-overlapping f64 components whose exact sum
is the value it represents. Two f64s can hold a product exactly; a list can
hold an arbitrary determinant exactly. This is what lets orient3d,
incircle, and insphere certify a sign rather than guess one.
Components are ordered smallest to largest, so the sign of a non-zero expansion is the sign of its last component.
§Cost and where it is paid
These operations allocate. That is deliberate and confined to the exact path, which a filtered predicate reaches only when the floating-point determinant is too close to zero to trust. The benchmark harness measures the escalation rate precisely so this cost is a number, not a hope.
Functions§
- expansion_
product - Multiply two expansions exactly.
- expansion_
sign - Sign of an expansion.
- expansion_
sum - Sum of two expansions, exactly.
- grow_
expansion - Grow an expansion by one scalar:
e + b, exactly. - negate_
expansion - Negate every component. Exact: negation is always representable.
- scale_
expansion - Scale an expansion by a scalar, exactly.