Skip to content
Snippets Groups Projects
Commit 8f8cc04d authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

powm fixed

Rev: src/modules/gmpmod/mpz_glue.c:1.4
Rev: src/modules/gmpmod/testsuite.in:1.2
parent c888a6fe
No related branches found
No related tags found
No related merge requests found
...@@ -359,7 +359,7 @@ static void mpzmod_powm(INT32 args) ...@@ -359,7 +359,7 @@ static void mpzmod_powm(INT32 args)
error("Too few arguments to mpzmod->powm()\n"); error("Too few arguments to mpzmod->powm()\n");
tmp=get_tmp(); tmp=get_tmp();
mpz_powm(tmp, tmp, get_mpz(sp-args), get_mpz(sp+1-args)); mpz_powm(tmp, THIS, get_mpz(sp-args), get_mpz(sp+1-args));
return_temporary(args); return_temporary(args);
} }
......
...@@ -25,6 +25,7 @@ cond( [[ master()->programs["/precompiled/mpz"] ]], ...@@ -25,6 +25,7 @@ cond( [[ master()->programs["/precompiled/mpz"] ]],
test_eq((int)clone(MPZ,17),17) test_eq((int)clone(MPZ,17),17)
test_false(clone(MPZ,0)) test_false(clone(MPZ,0))
test_true(clone(MPZ,1)) test_true(clone(MPZ,1))
test_eq(clone(MPZ,17)->powm(2,4711),290)
define([[mpz_test_cmp]],[[ define([[mpz_test_cmp]],[[
test_cmp(clone(MPZ,$1), $2) test_cmp(clone(MPZ,$1), $2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment