TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Remainder.Runtime

Exact decimal remainder #

IEEE 754-2019 §5.3.1 uses the nearest integer quotient, with even ties, regardless of the current rounding direction. Aligning the integer coefficients at the smaller quantum makes the computation exact, even for a quotient too large to represent as a decimal floating-point number. The result retains that preferred quantum. An exact zero keeps the dividend's sign (§6.3).

The default status has no underflow or inexact flag, including tiny exact remainders. Alternate exception handling is outside this pure result API.

Whether the nearest integer quotient lies above the truncated quotient.

Instances For

    Unbounded nearest-even quotient of two nonnegative integers.

    Instances For

      Magnitude of the signed remainder on the common integer grid.

      Instances For

        Exact remainder of finite operands on their common, preferred decimal grid.

        Instances For

          IEEE remainder, independent of the rounding direction. Finite dividend/infinite divisor returns the dividend, including its cohort.

          Instances For