Modular Arithmetic Calculator
The Modular Arithmetic Calculator performs arithmetic modulo an integer m, including taking square roots.
To use the Modular Arithmetic Calculator, enter a non-zero integer for the modulus m, and integers a and b below. Then press one of the operation buttons. The answer is displayed in the Result box.
Notes:
- The +/- Result button replaces the current result x with m - x, which is the same as -x modulo m.
- Square roots are only calculated when the modulus m is a prime number (using the Tonelli-Shanks algorithm).
- If r is a square root of a, so is m - r. For example, since 3 is a square root of 9 modulo 17, the other square root of 9 is 17 - 3 = 14. After calculating a square root, click +/- Result to get the other root.
If you prefer the original Modular Arithmetic Calculator, it's still there.
Send comments.
Paul Trow's math software.
Copyright 2009 by Paul Trow