TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Remainder.Integer

The unbounded nearest-even quotient #

The quotient is characterized by an error of at most one half and even parity at the two possible midpoints. The remainder coefficient never exceeds the original dividend or half the divisor. These integer bounds will prove representability at the preferred decimal quantum, without rounding the result.

Zero residuals use the lower quotient and therefore retain the input sign.

The natural coefficient and sign encode the exact signed integer residual.

Either midpoint chooses the even integer, with no bound on quotient precision.

Every other integer quotient has at least as large a residual magnitude.