commands → mod

mod(A,P)

The mod command reduces the expression A modulo the positive integer P. If a denominator is not invertible mod P then null is returned.

Examples

mod(8,5);
	3

mod(x^2-x-2,11);
	x^2+10*x+9

References

Gullberg, Jan. Mathematics: From the Birth of Numbers. Norton, 1996.