mpf_eq can give wrong results in certain cases
Torbjorn Granlund
tg at gmplib.org
Mon Jul 13 17:33:34 CEST 2009
Uwe Mueller <um.computing at arcor.de> writes:
The following test program evaluates the function mpf_eq in 9 specific
cases.
In my systems (1. GNU/Linux i686, 2. GNU/Linux x86_64), 3 of these 9 cases
evaluate to wrong results. The results do not depend on the OS, but on
the GMP version (4.3.1, 4.2.2, and 4.2.1).
In which cases the results are right and wrong, is mentioned in the
comments
of the program. The actual versus correct values are also given in the
program output.
Please find the output for different GMP versions below, after the
program source.
Thanks for this bug report!
Oh my, mpf_eq was quite broken. I had to rewrite it almost from scratch
to (hopefully) get it right. I also wrote a systematic test case for it
which will become tests/mpf/t-eq.c.
Please try the attached replacement. I will do some further testing
before I commit this to the repository.
-------------- next part --------------
--
Torbj?rn
More information about the gmp-bugs
mailing list