bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] [bug #35367] ode-initval2 testsuite failure


From: Frantisek Kluknavsky
Subject: Re: [Bug-gsl] [bug #35367] ode-initval2 testsuite failure
Date: Tue, 29 Jan 2013 10:25:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 01/28/2013 05:29 PM, Tuomo Keskitalo wrote:
On 01/27/2013 05:47 PM, Andreas Schwab wrote:

The ode-initval2 test no longer fails, but others remain.

Hmm. I removed part of code which divided and multiplied a set of values by the same constant (doing stuff in between). Rhys said earlier:

> FWIW, I am aware of FMA gives the wrong answer for comparisons like
> (a*x + b*y) == 0 when x == y and b == -a.  The fix is never check
> strict equality for floats and instead check if |a*x + b*y| < tol.
> The problem in those cases is not the use of FMAs but rather the code
> being incorrect in the presence of floating point arithmetic.

So, does this mean that whenever an algorithm relies on a=a+a-a or a=a*a/a, the algorithm is going to fail when high precision is required? I don't know details about sf, poly or cfd functions, but there might be a few problematic places.

I wonder if you should post separate bug reports against those, this one was for ode-initval2 only.

Sorry, meant a=a+b-b and a=a*b/b.

No. You need both addition and multiplication to involve FusedMultiplyAdd. No FMA will take place in a==a*b/b. It might fail or not, that depends on specific numbers and rounding mode. Unless I missed some new floating point instructions or new quirks of compiler optimization.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]