dmharvey at cims.nyu.edu
Tue Dec 23 01:18:38 CET 2008
mpz_perfect_power_p() can return incorrect answers.
The following code snippet illustrates:
mpz_set_si (x, -64);
printf ("%ld\n", mpz_perfect_power_p (x));
It prints 0, even though -64 = (-4)^3 is a perfect power.
This was tested with GMP 4.2.4, on a macbook with ./configure ABI=32.
(This bug was discovered by Robert Bradshaw and John Cremona, see
More information about the gmp-bugs