The irem command finds the remainder of
two integers (see Section 6.5.8).
remain is a synonym for irem.
Examples.
3 |
111615339728229933018338917803008301992120942047239639312 |
−4+i |
The smod command finds the symmetric
remainder of two (ordinary) integers.
mods is a synonym for smod.
Example.
Input:
Output:
−2 |
The mod operator is an infixed operator
which takes an integer to a modular integer.
% is a synonym for mod.
Example.
Input:
or:
Output:
⎛ ⎝ | −2 | ⎞ ⎠ | %5 |
Note that the result -2 % 5 is not an integer (-2) but an element of Z/5Z (see Section 6.34 for the possible operations in Z/5Z).