Mon, 11 Aug 2003 12:02:46 +1000
Not sure if this is a 'factorization' question, or a 'GMP' question, or a
basic math question - but since there are probably people here with
expertise in all of those areas, I'll ask it here.
>From the docs
"Detecting perfect powers is required by some factorization algorithms."
By my understanding these factorization algorithms require that the
candidate not be a *prime* power, and mpz_perfect_power_p() does not address
this issue since it does not distinguish between prime powers and composite
I'm currently coding up some of these factorization algorithms for the
joy(?) of it. Can I make use of the mpz_perfect_power_p function without
the possibility of excluding a candidate that should not be excluded ?
Also, given that this function tells us that some candidate is a perfect
power, can we then easily determine the value of that perfect power ? I
guess not .... otherwise the function would surely return that value.