modulo operation
Sign in to saveAlso known as modulo, modulus
In computing and mathematics, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another, the latter being called the modulus of the operation.
~20 min read
Encyclopedic overview
13 sectionsContents
- Variants of the definition
- Notation
- Common pitfalls
- Performance issues
- Properties (identities)
- In programming languages
- Generalizations
- Modulo with offset
- Implementing other modulo definitions using truncation
- See also
- Notes
- References
- External links
In computing and mathematics, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another, the latter being called the modulus of the operation.
Given two positive numbers and , modulo (often abbreviated as ) is the remainder of the Euclidean division of by , where is the dividend and is the divisor.
Excerpted from Wikipedia’s “modulo operation” article, available under the CC BY-SA 4.0 licence.