Anomaly in mpn_sqrtrem and mpn_rottrem

Niels Möller nisse at lysator.liu.se
Thu Jun 11 09:00:19 UTC 2015


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

> Before I try to understand the rest of your reasoning: What is B?  It's
> not the usual limb base, I presume, since then sqrt(B^{n-2}) =
> (B/2)^{n-2}, which I can compute completely without hard thinking
> (assuming the common case that B is a power of two)...

Sorry, there was an A missing. The function "sqrt_nm1" is intended to
compute a close approximation of sqrt(B^{n-2} A), with n input limbs A
and n-1 output limbs X. (Suggestions for better names are appreciated).

And B is the usual limb base.

Regards,
/Niels

-- 
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