Using make tune, speed_measure error

2022-09-29 Thread Aaron
Hi y'all, I'm doing a clean build of GMP 6.2.1, trying to follow all of the steps finally. My "./configfsf.guess" output is "x86_64-pc-linux-gnu", and this is basically the same infothat "./config.guess" and "uname -a" produces. I built using "./configure" and make, this went fine I think. Then I

GMP does not detect float exponent overflow while reading floating point numbers

2022-09-29 Thread Eric Li
While using GMP to read floating point numbers, I noticed that when the exponent is too large, the exponent overflows without warning or error. GMP version: gmp-6.2.1-2.fc36.x86_64, installed using dnf on Fedora 36. Test program: a.c and b.cpp, see attachment. To run a.c, use "gcc a.c -o a -lgmp

Re: mini-gmp mpz_powm incorrect result

2022-09-29 Thread Marco Bodrato
Ciao, Il 2022-09-05 21:23 ni...@lysator.liu.se ha scritto: Marco Bodrato writes: I propose to also add a couple of tests to mini-gmp/tests/t-powm.c , to keep track of this. Definitely needed, thanks for looking into that. + if (mpz_cmp_ui (res, 1) <= 0) +mpz_add_ui (res, res, 9);

Re: mini-gmp mpz_powm incorrect result

2022-09-29 Thread Niels Möller
Marco Bodrato writes: >>> or even (mn == 0 check just above this code rules out |m| < 1) >>> >>>mpz_set_ui (r, mpz_cmpabs_ui (m, 1)); > > I agree with this solution. Will you commit it? Committed, and I've verified that it fixes Guido's test case. > I propose to also add a couple of tests

Re: mini-gmp mpz_powm incorrect result

2022-09-29 Thread Marco Bodrato
Ciao, Il 2022-08-30 10:25 Vincent Lefevre ha scritto: or even (mn == 0 check just above this code rules out |m| < 1) mpz_set_ui (r, mpz_cmpabs_ui (m, 1)); I agree with this solution. Will you commit it? Concerning this second solution, the GMP manual says: -- Function: int

Re: mini-gmp mpz_powm incorrect result

2022-09-29 Thread Marco Bodrato
Il 2022-09-05 19:04 Marco Bodrato ha scritto: Il 2022-08-30 10:25 Vincent Lefevre ha scritto: or even (mn == 0 check just above this code rules out |m| < 1) mpz_set_ui (r, mpz_cmpabs_ui (m, 1)); I agree with this solution. Will you commit it? I incorrectly removed the "Niels Möller