Incomplete GMP documentation...

Torbjorn Granlund tg at
Tue Sep 19 12:18:10 CEST 2006

Looking through the GMP mailing list archives, I found an odd
reply from myself:

Torbjorn Granlund <tege at> writes:

    I believe mpz_root can be speeded up; I might look into it if I get
    some spare time.
  Yes, suggests a division-free
                     x   = x  (3  A x )/2
                      i+1   i        i
  This should be faster than the current code, since division is hard to
  make fast (and since current GMP division is a log(n) factor worse
  than multiplication).
I replied as if you talked about mpz_sqrt/mpn_sqrt, not mpz_root.

I try again: Please look at for vastly
improved nth root code.  Compared to the code in GMP 4.2, there
is a 20x to 30x speedup.


More information about the gmp-bugs mailing list