Re: mini-gmp mpz_powm incorrect result

2022-08-29 Thread Guido Vranken
Thank you, I have confirmed that your patch resolves the issue. On Mon, Aug 29, 2022 at 10:29 AM Paul Zimmermann wrote: > thank you, I confirm the bug, here is a potential fix: > > $ diff -u mini-gmp.c.orig mini-gmp.c > --- mini-gmp.c.orig 2022-08-29 10:28:20.700995412 +0200 > +++

Re: mini-gmp mpz_powm incorrect result

2022-08-29 Thread Paul Zimmermann
thank you, I confirm the bug, here is a potential fix: $ diff -u mini-gmp.c.orig mini-gmp.c --- mini-gmp.c.orig 2022-08-29 10:28:20.700995412 +0200 +++ mini-gmp.c 2022-08-29 10:27:36.112191428 +0200 @@ -3060,6 +3060,7 @@ if (en == 0) { mpz_set_ui (r, 1); + mpz_tdiv_r (r,