2-adic roots (Re: bdiv vs redc)

Niels Möller nisse at lysator.liu.se
Tue Jul 24 01:05:57 CEST 2012

Torbjorn Granlund <tg at gmplib.org> writes:

> Is your code different from perfpow.c's binv_sqroot?

I think so. I don't fully understand the binv_sqroot, but some

* As far as I see, it doesn't take any advantage of cancellation in the

* It uses powlo in some way which I haven't figured out.

* And they return different values, a^{1/2} and a^{-1/2}, respectively
  (but that's a minor issue; I'm not sure which value makes the most
  sense to return).

* And the binv_sqrt function is a lot simpler than mine.


Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list