tg at gmplib.org
Wed Mar 16 14:45:49 CET 2011
James Wanless <james at grok.ltd.uk> writes:
On 16 Mar 2011, at 12:17, Torbjorn Granlund wrote:
> James Wanless <james at grok.ltd.uk> writes:
> Code should go _something_ like this (I don't pretend this is a
> genuine patch)
> File mpz/perfpow.c should replace its only function implementation,
> mpz_perfect_power_p, thusly:
> I don't follow you at all. We have quite good code for detection of
> perfect powers already.
This returns the actual root?
[though, like I said, maybe your version is just as fast :)]
We are not communicating very well, are we? :-(
I thought the operation you asked for was computation of the nth root of
some (large) integer a given that it is known by the caller that the
exact result will be an integer.
Was this what you mean?
Then you quote mpz_perfect_power_p which does not seem to have much to
do with this. We have great code for mpz_perfect_power_p (by means of a
quite new mpn_perfect_power_p).
(It is quite possible that some code from mpn_perfect_power_p can be
reused from this new function, but that's a different story.)
More information about the gmp-discuss