Quotient and remainder #
There are three main conventions for integer division,
referred here as the E, F, T rounding conventions.
All three pairs satisfy the identity
x % y + (x / y) * y = x unconditionally,
x / 0 = 0 and
x % 0 = x.
E-rounding division #
This pair satisfies
0 ≤ mod x y < natAbs y for
y ≠ 0.