Outward-rounded arithmetic for Model.Interval #
Each endpoint operation uses the corresponding directed Model kernel. Multiplication and
division use the classical four-corner construction. Division returns the whole interval when the
denominator contains zero, covering quotient sets that may be disconnected or unbounded.
Addition, subtraction, multiplication, and division pass computed endpoints through ofBounds,
replacing NaN or reversed endpoints with the format's whole range. For formats without infinity,
enclosing real results needs the relevant range bounds.
The finite endpoint formulas and outward rounding are described in Rump's Verification methods, ยงยง5.1 and 5.3.
Outward-rounded interval addition.
Instances For
Interval negation, reversing and negating the endpoints.
Instances For
Outward-rounded interval subtraction.
Instances For
Outward-rounded interval multiplication using all four endpoint products.
Instances For
Outward-rounded interval division.
When the denominator contains zero, the result is whole fmt. Otherwise all four directed
quotients determine the endpoint enclosure.
Instances For
Interval reciprocal, conservatively returning whole fmt when zero is included.