Executable directed rounding #
Exact rational intermediates support the four IEEERoundingMode choices; together with the
dyadic rounders of Rounding.Directed.Dyadic, they implement addition, subtraction,
multiplication, division, fused multiply-add, and square root.
Rounding thresholds, signed-zero behavior, and exceptional results follow the FloatFormat
descriptor. Real and extended-real correctness theorems are provided separately by
DirectedSemantics with their format and input hypotheses.
Directed rounding of exact rationals #
Round a scaled positive rational magnitude to the adjacent lower or upper representable magnitude.
roundMagnitudeUp = false selects the lower magnitude and true selects the upper magnitude.
The sign parameter supplies the sign to the format's packing, zero, and overflow constructors.
Instances For
Round an exact scaled signed rational according to an IEEE rounding direction.
Instances For
Round an exact signed rational according to an IEEE rounding direction.
Instances For
Round an exact scaled signed rational toward negative infinity.
Instances For
Round an exact scaled signed rational toward positive infinity.
Instances For
Round an exact signed rational toward negative infinity.
Instances For
Round an exact signed rational toward positive infinity.
Instances For
Arithmetic under an explicit rounding direction #
Signed zero for an exact addition result under mode.
Instances For
IEEE addition under an explicit rounding direction.
Instances For
IEEE subtraction under an explicit rounding direction.
Instances For
IEEE multiplication under an explicit rounding direction.
Instances For
IEEE division under an explicit rounding direction.
Instances For
IEEE fused multiply-add under an explicit rounding direction.
Instances For
Directed square root #
Dyadic endpoint pair used to enclose a nonnegative square root.
- lower : Numerics.Dyadic
Lower endpoint.
- upper : Numerics.Dyadic
Upper endpoint.
Instances For
Compute a dyadic enclosure of the square root of a nonnegative exact dyadic.
Instances For
IEEE square root under an explicit rounding direction.
Instances For
Interval-friendly operation names #
Addition rounded toward negative infinity.
Instances For
Addition rounded toward positive infinity.
Instances For
Subtraction rounded toward negative infinity.
Instances For
Subtraction rounded toward positive infinity.
Instances For
Multiplication rounded toward negative infinity.
Instances For
Multiplication rounded toward positive infinity.
Instances For
Division rounded toward negative infinity.
Instances For
Division rounded toward positive infinity.
Instances For
Fused multiply-add rounded toward negative infinity.
Instances For
Fused multiply-add rounded toward positive infinity.
Instances For
Square root rounded toward negative infinity.
Instances For
Square root rounded toward positive infinity.