nails cxx error

Torbjorn Granlund tg at
Sun Nov 9 00:52:14 CET 2008

Torbjorn Granlund <tg at> writes:

  Torbjorn Granlund <tg at> writes:
    A patch is at <>.
  I now realize that my patch doesn't fully solve the problem.  mpf_eq
  might still involve too many bits in the comparison.
  To get things tight, one needs to locate the position of the most
  significant bit of the operands, and count bits downwards from there.
It turned out that mpf_eq was much worse than I first realized.  It
could not only (as documented) compare too many bits, but very often
also compared too few bits, which is quite bad.  It has been broken
like that since the first release of it.  Hopefully, most people use
the mathematically better defined mpf_reldiff.

I have replaced the patch at <>.  It now
patches both the test case (which took advantage of the too few bug!)
and the mpf_eq function.


More information about the gmp-bugs mailing list