From 8bdf0d013359d295e7b26b46d553c9525d7ed0cb Mon Sep 17 00:00:00 2001 From: mbkma <39454100+mbkma@users.noreply.github.com> Date: Wed, 8 Apr 2020 01:11:48 +0200 Subject: Add modular exponentiation ability and add acccording tests --- src/test-mp-equation.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/test-mp-equation.c') 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); -- cgit v1.2.1