Format-generic executable floating-point intervals #
Closed executable intervals have Model fmt endpoints, an endpoint order, and
format-independent constructors. Outward-rounded arithmetic and activation ranges live in later
modules.
The executable layer carries no soundness theorems, so applications can choose an exact real, extended-real, or format-model interpretation without changing the interval representation.
A closed executable interval with both endpoints in fmt.
Instances For
Instances For
#eval shows both endpoints as their values.
Membership using the numerical order of Model, in which NaNs are unordered.
Instances For
Enable x ∈ I for format-generic executable intervals.
An interval is valid when both endpoints are finite and ordered.
For formats with infinity, whole is not valid under this finite-endpoint predicate. For finite
formats, whole uses the two maximal finite endpoints and is valid.
Instances For
Validity is decided by classifying and comparing the endpoints.
An interval is extended-valid when both endpoints are non-NaN and are ordered.
This predicate permits infinite endpoints. It is the closure invariant for outward-rounded IEEE operations: a finite input interval may produce an infinite endpoint on overflow without ceasing to denote an ordered interval.
Instances For
Extended validity is decided by classifying and comparing the endpoints.
Degenerate interval [x, x].
Instances For
Smallest endpoint hull containing both input intervals, with IEEE NaN propagation.
Instances For
Minimum of four values, grouped to match the interval corner operations.
Instances For
Maximum of four values, grouped to match the interval corner operations.
Instances For
Conservative interval spanning the complete numerical range of fmt.
Formats with infinity use [-∞, +∞], and formats without infinity use their two maximal finite
endpoints.
Instances For
Executable x ≤ y, which is false for unordered comparisons.
Instances For
Build an enclosure from ordered, non-NaN endpoints, or use the whole range.
The candidate pair is kept only when leB lo hi holds. It is replaced by whole fmt when either
endpoint is a NaN (so the comparison is unordered) and also when lo > hi numerically, which can
happen when a caller supplies reversed bounds. An indeterminate expression such as 0 * ∞ can
produce NaN endpoints instead. Such endpoint calculations cannot justify a narrower bound, and for
formats with infinity the fallback encloses every real number, so interval arithmetic composes.
Instances For
Whether the represented endpoint range contains numerical zero.