Bug Report GMP-5.1.1 Mini-gmp t-double.c
Marc Glisse
marc.glisse at inria.fr
Mon Feb 25 15:58:48 CET 2013
On Mon, 25 Feb 2013, Niels Möller wrote:
>> I believe I have found the cause of this problem. The test program
>> increments/decrements a double by 1.0 during the course of testing. If
>> the double has more than 16 digits of precision, then the inc/dec fails
>> to take effect and the succeeding test fails.
>
> The testcode is intended to handle both cases: when the increment has
> effect, and when it hasn't. That's why there are some comparisons
> between f and d after the increment. Could still be buggy, of course,
> but I see no reason why precision-related bugs there should lead to
> memory coruption.
Just to rule it out, does declaring f and d volatile change the result?
(or compiling with -msse -mfpmath=sse)
--
Marc Glisse
More information about the gmp-bugs
mailing list