mpn_sqrtrem{1,2} - patch for pure C implem

paul zimmermann Paul.Zimmermann at inria.fr
Tue Jun 6 07:00:02 UTC 2017


       Dear Marco,

> I'll be happy to receive comments or critics :-)

I'd be happy to see a comparison with the code of [1]. According to [2],
slide 31, the slow branch of mpfr_sqrt takes 56 cycles for one 64-bit limb,
and 133 cycles for two limbs. This includes the computation of n = s^2 + r,
with s = floor(sqrt(n)), for s having 64 bits and 128 bits respectively.

Best regards,
Paul

[1] https://members.loria.fr/PZimmermann/papers/mpfr4.pdf
[2] https://members.loria.fr/PZimmermann/talks/mpfr4.pdf


More information about the gmp-devel mailing list