About sqrt_exact...

Paul Zimmermann Paul.Zimmermann at inria.fr
Wed Jun 24 17:39:41 CEST 2026


       Hi Marco,

>  I have to say that in MPFR I tried to implement Newton's method for
>  1/sqrt(x),
>  which is theoretically faster than mpn_sqrtrem, by implementing
>  Algorithm
>  ApproximateRecSquareRoot from Modern Computer Arithmetic, but I failed
>  miserably.
> 
> How did you fail?
> 
> The result was not correct, in this case you should write to the authors of
> the book,
> and say that the algorithm they propose is not working :-)
> 
> Or it was simply slower than current sqrtrem?

the result was correct, so that I did not have to bother the authors of
the book, but it was slower than using mpn_sqrtrem.

Paul


More information about the gmp-devel mailing list