Partial interval arithmetic on arbitrary endpoint carriers #
Exact endpoint calculations take place in an ordered field. A supplied OutwardRounding
encodes the lower and upper results; failure is explicit rather than silently saturating an
invalid enclosure. Binary, decimal, and posit adapters can instantiate the scalar field with
exact rationals. No IEEE-specific exceptional values enter this layer.
Check candidate encodings against the exact scalar before accepting an enclosure.
Instances For
Build a sound partial rounder from candidate endpoints and their exact decoder.
The check also rejects overflowed, saturated-on-the-wrong-side, and exceptional results. Candidate generation may use a fast untrusted search; successful results carry checked bounds.
Instances For
Round the lower bound downward and the upper bound upward, with explicit failure.
Instances For
Decode, apply an exact endpoint enclosure, and round outward.
Instances For
Decode two intervals, apply an exact endpoint enclosure, and round outward.
Instances For
Outward-rounded negation, exchanging the endpoints.
Instances For
Outward-rounded addition; missing finite interpretations and overflow return none.
Instances For
Outward-rounded subtraction.
Instances For
Outward-rounded four-corner multiplication.
Instances For
Outward-rounded four-corner division, defined only away from a zero-crossing denominator.
The generic endpoint carrier need not represent unbounded intervals, so a denominator that
does not lie strictly on one side of zero returns none.