Incomplete GMP documentation...

Torbjorn Granlund tege at swox.com
Tue Jun 27 16:28:06 CEST 2006


abbott <abbott at dima.unige.it> writes:

  ... where's the email address for sending praise?  :-)

:-)

  Last night I installed GMP-4.2 on my Mac G5.  It was impressively quick
  compared to what I'd been using before (probably 4.1.4).  Well done!

Kevin Ryde's improved configure helps for many systems.  (But Mac
users tend to run into many compiler bugs, creating sticky problems.)

  I believe mpz_root can be speeded up; I might look into it if I get
  some spare time.

Yes, http://swox.com/gmp/projects.html suggests a division-free
iteration:

                    2
                   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).

That multiplication-only iteration could make use of short products
(mpn_mullow, mpn_mulhigh, mpn_mulmid) for a great speedup for operands
of up to around 100 limbs.

  Would you be interested in a function which takes a real interval
  (two mpf_t values) and returns the simplest rational in that interval?

That might be useful for mpq.

-- 
Torbjörn


More information about the gmp-bugs mailing list