Skip to main content

Modulo

The modulo or modulus operation finds the remainder after division of one number by another.

Syntax

Integer mod Integer
Fraction mod Integer

Description

Given two integers a and m, returns the remainder of the division am

arithmetic.mod1.calc.png

Given a fraction ab and an integer mm, returns a·b-1 mod m, as long as b is invertible modulo mm.

arithmetic.mod2.calc.png