Modulo operation

Jump to navigation Jump to search

In mathematics, modulo operation, represented by the symbol ${\displaystyle {\text{mod}}}$, returns the remainder of an integer division (also known as Euclidean division), where the division of two integers produces a quotient and a remainder.

More specifically, given an integer ${\displaystyle n}$ and a non-zero integer ${\displaystyle d}$, the expression ${\displaystyle n{\text{ mod }}d}$ refers to the remainder of the division ${\displaystyle n\div d}$. Here, ${\displaystyle n}$ is also known as the dividend; ${\displaystyle d}$ is also known as the divisor (or the modulus), and the remainder can be also called the least non-negative residue.[1][2][3]

However, other conventions and definitions of the modulo operation are also possible, since computers and calculators have various ways of storing and representing numbers. Their definition of the modulo operation depends on the programming language and/or the underlying hardware.

References

1. "The Definitive Glossary of Higher Mathematical Jargon: Modulo". Math Vault. 2019-08-01. Retrieved 2020-08-27.
2. Weisstein, Eric W. "Congruence". mathworld.wolfram.com. Retrieved 2020-08-27.
3. Caldwell, Chris. "residue". Prime Glossary. Retrieved August 27, 2020.