mpn_rootrem

Torbjorn Granlund tg at gmplib.org
Wed Sep 29 09:06:16 CEST 2010


Paul Zimmermann <Paul.Zimmermann at loria.fr> writes:

  ... some nice functions that we could use are not (yet) documented:
  
  * mpn_div_q (gmplib.org/list-archives/gmp-devel/2010-September/001651.html)
  
  * mpn_rootrem, which is faster than the documented function mpn_sqrtrem when
    computing a square root without remainder
  
  Is there any plan to document mpn_rootrem, or to improve mpn_sqrtrem in the
  case R2P=NULL so that it is as efficient as mpn_rootrem with remp=NULL and k=2?
  
There are plans to document (some form of) mpn_rootrem.  There are plans
to rewrite mpn_sqrtrem to use a different algorithm, computing sqrt(A)
as sqrt(1/A)*A, since the Newton iteration for 1/A is division-free.

I realise that this is not an ideal reply; perhaps we should be less
conservative about documenting mpn functions that we are.  The reasoning
behind our current policy is that we want the interfaces to mature, to
avoid ending up in a situation where we need to support multiple
interfaces.

-- 
Torbjörn


More information about the gmp-devel mailing list