mpz_limbs interface

Torbjorn Granlund tg at gmplib.org
Thu Feb 6 17:36:14 UTC 2014


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

  Below is a patch to do this (and return value is long, not mp_bitcnt_t,
  since it needs to be signed).
  
  What do you think?
  
I'm to busy to make an educated analysis.

Why isn't __gmp_extract_double's style OK for mpn_set_d?  Is its
conventions not neat enough, or are there efficiency reasons?  If
efficiency reasons, are any efficiency advantage of mpn_set_d maintained
once __gmp_extract_double is replaced by mpn_set_d in callers?  (I mean,
perhaps the saved shifting in mpn_set_d is instead done in the caller.)

Do you plan to replace __gmp_extract_double by mpn_set_d where
__gmp_extract_double is used currently?  Keeping both these two very
similar functions seems a bit ugly.


More information about the gmp-devel mailing list