Operations using modular arithmetic;
(a mod x + b mod x) mod x = (a + b) mod x.
(a mod x * b mod x) mod x = (a * b) mod x.
The above does not hold for exponentiation;
((261 mod 19)↑(771 mod 19)) mod 19 != (261↑771) mod 19.
Last fiddled with by 3.14159 on 20101207 at 22:34
