The mods command reduces the expression A modulo the positive integer P in the symmetric range.
If a denominator is not invertible mod P then null is returned.
Examples
mods(8,5);
-2
mods(x^2-x-2,11);
x^2-x-2
References
Gullberg, Jan. Mathematics: From the Birth of Numbers. Norton, 1996.