A perfect power, and then?

Torbjorn Granlund tg at gmplib.org
Sun Oct 28 11:26:39 CET 2012


nisse at lysator.liu.se (Niels Möller) writes:

  nisse at lysator.liu.se (Niels Möller) writes:
  
  > 0. Support in speed, for benchmarking.
  
  Not checked in yet, but here are some benchmark numbers, comparing to
  binvert:
  
Do you have any interpretation of these numbers?

I am hacking out the existing functions from perfpow.c.  Both binv_root
and binv_sqroot accept both a limb ount argument and a bit count
argument.  Either could be omitted; the limb count argument can be
computed from the bit count argument, but the other direction requires
conservative rounding.

It does make some sense to have a bit count argument here instead of a
limb count argument.  The first few iterations will use limb precision,
but perhaps the caller needs such small precision that only 3 or 4
iterations are needed?  A limb count argument will not communicate that
fact.

A bit count argument is non-standard, of course.

-- 
Torbjörn


More information about the gmp-devel mailing list