Integer root extracting

Hans Aberg haberg-1 at telia.com
Fri Sep 3 12:09:59 CEST 2010


GMP has a function mpz_perfect_power_p() that for given integer a  
tells if a = x^y is solvable in integers x, y with y > 1. But I need  
to find the largest y for which this is true (and also finding x). One  
way to do this is to prime factor a and take the gcd of the exponents,  
but is there a faster method?



More information about the gmp-discuss mailing list