This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What is acceptable for -ffast-math? A numerical viewpoint
- To: Wolfgang Bangerth <wolfgang dot bangerth at iwr dot uni-heidelberg dot de>
- Subject: Re: What is acceptable for -ffast-math? A numerical viewpoint
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 01 Aug 2001 16:00:59 +0200
- Cc: dewar at gnat dot com, gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <Pine.SOL.4.10.10108011516300.29695-100000@eros>
Wolfgang Bangerth <wolfgang.bangerth@iwr.uni-heidelberg.de> writes:
| Well, the claim was that the result is not _degraded_, but just _altered_.
Must we quibble?
| Solving a linear system of equations with IEEE is just one way to get at
| an approximate of the true inverse. It would be interesting to see whether
| the residual || A * A^-1 || is smaller if you compute an approximate
| inverse A^-1 using IEEE or -fast-math, using the same algorithm. I'd claim
| it does not make much of a difference.
Firstly, no competent programmer would ever dream of using -ffast-math
for doing serious numerical computations. And that point is already
understood in this discussion.
Secondly, Linear Algebra is just a tiny part of numerical
computations, and matrix residuals are even a much smaller part; thus
the point you're trying to make is unclear.
Finally, as a concrete example, look at the classical problem of
approximating the zeros of a univariate polynomial. There you have
true degragation. Just take the Wilkinson polynomial of 20th degree,
and make slight pertubation to its cofficients (preferably the three
leading cofficients) and see what happens.
http://www-sop.inria.fr/saga/POL/BASE/1.unipol/wilkinson.1.n.dir/index.html
or more generally have a look at
http://www-sop.inria.fr/saga/POL/BASE/1.unipol/
-- Gaby