diff options
author | mbkma <[email protected]> | 2020-04-08 01:11:48 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-08 01:11:48 +0200 |
commit | 8bdf0d013359d295e7b26b46d553c9525d7ed0cb (patch) | |
tree | 96235fd9d2df5736553ecc884a9f1b0050ae2365 /src/test-mp-equation.c | |
parent | 2e5b3891e485237a7860a84b141a770b0a867ea1 (diff) | |
download | mate-calc-8bdf0d013359d295e7b26b46d553c9525d7ed0cb.tar.bz2 mate-calc-8bdf0d013359d295e7b26b46d553c9525d7ed0cb.tar.xz |
Add modular exponentiation ability and add acccording tests
Diffstat (limited to 'src/test-mp-equation.c')
-rw-r--r-- | src/test-mp-equation.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test-mp-equation.c b/src/test-mp-equation.c index c1c136a..c6ab98c 100644 --- a/src/test-mp-equation.c +++ b/src/test-mp-equation.c @@ -482,6 +482,11 @@ test_equations(void) test("8 mod 7", "1", 0); test("−1 mod 7", "6", 0); + test("123^456 mod 78", "27", 0); + test("2^2 mod 2", "0", 0); + test("1^0 mod 2", "1", 0); + test("2^1 mod 1", "0", 0); + test("sgn 0", "0", 0); test("sgn 3", "1", 0); test("sgn −3", "−1", 0); |