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: dvv at egcs dot dvv dot ru (Dima Volodin)
- Date: Wed, 01 Aug 2001 15:03:02 GMT
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, dewar at gnat dot com, gcc at gcc dot gnu dot org
- Organization: Huh?
- References: <Pine.SOL.4.10.10108011647470.29695-100000@eros>
On Wed, 1 Aug 2001 16:55:02 +0200 (MET DST), you wrote:
>So we agree: there are instable problems where -ffast-math makes no sense
>because they are too sensitive even when using stable algorithms. And then
>there are stable problems where stable methods might profit from
>potentially dubious transformations; for these, a/b/c=a/(b*c) and
>a*c+b*c=(a+b)*c would make sense.
Just out of curiosity: what about
t1 = a*c;
t2 = b*c;
res = t1+t2;
Is it supposed to be folded into
res = (a+b)*c;
with aggressive -ffast-math? Why?
> Wolfgang
Thanks!
Dima