TorchLean API

FloatLib.Floats.Formats.Flocq.Theory.Rounding.Modes

Rounding directions as integer-rounding rules #

IEEERoundingMode has six rounding directions: the five rounding-direction attributes of IEEE 754-2019 (Section 4.3) and rounding away from zero, the MPFR_RNDA mode of GNU MPFR. They are the named rounding modes of the generic float model as well. roundingFunction interprets each direction as a valid integer-rounding rule, so the generic theory of round applies to every direction: round (roundingFunction mode) x rounds a real into a generic format.

References #

The integer-rounding rule of a rounding direction, as used by round.

Nearest rounding resolves a tie toward an even integer at the selected scale. Under the usual Flocq conditions (in particular, excluding the precision-one even-radix corner case), this agrees with the familiar even canonical-significand description.

Instances For

    Every rounding direction satisfies the generic rounding-function laws.