[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] [PATCH] Disable use of FMA
From: |
Rhys Ulerich |
Subject: |
Re: [Bug-gsl] [PATCH] Disable use of FMA |
Date: |
Mon, 28 Nov 2011 09:37:33 -0600 |
Hi Andreas,
On Sat, Nov 26, 2011 at 6:12 PM, Andreas Schwab <address@hidden> wrote:
> The algorithms in cblas (at least) become instable when the compiler is
> allowed to contract floating-point expressions. This manifests in the
> failure of the ode-initval2 test. Add a configure check to disable fp
> contractions.
When you say "instable" do you mean that they fail at some particular
tolerance level? Could you give an example? The problem you describe
sounds like overly-sensitive unit tests rather than a reason to
entirely avoid FMAs.
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.
- Rhys