Mantissa string from mpf_get_str can be wrong in some least-significant digits

Torbjorn Granlund tg at gmplib.org
Sat Sep 12 22:43:19 CEST 2009


Uwe Mueller <um.computing at arcor.de> writes:

  This bug report concerns GMP versions 4.2.1, 4.3.1 and probably also
  others. It contains a test program, error description and a suggested
  patch.
  
  The issue is shown by the attached test program. It calculates the
  string representation of some big numbers by the function mpf_get_str
  with different values for n_digits. The respective result is compared
  with the exact (n_digits = 0) result. The differences are displayed.
  
  The test program does not take any arguments.
  
[Sorry for the slow answer]

I don't see any test program as part of your message.  Perhaps
you forgot to include it?

I think the current code, as of July 2009, should work better.  Please
see http://gmplib.org:8000/gmp-4.3/ or specifically this change:
http://gmplib.org:8000/gmp-4.3/rev/2de544d2efd9.

-- 
Torbjörn


More information about the gmp-bugs mailing list