sqrt algorithm

Niels Möller nisse at lysator.liu.se
Wed Jul 29 20:38:32 UTC 2015

tg at gmplib.org (Torbjörn Granlund) writes:

> I'd suggest that you make ytour code require normalisation, then see if
> it can be mad faster.  After that, I can write the normalisation code if
> you think it is too ugly.  :-)

That's probably a good idea. The shifting can be done in one place, in
the top-level sqrtrem function.

Hmm, but if we shift to make the *root* normalized, that also means that
the input will always be an even number of limbs. Not entirely sure
that's good, in particular for smallish sizes. But it ought to simplify
some things.


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