This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What is acceptable for -ffast-math? (Was: associative law incombine)
- To: <dewar at gnat dot com>
- Subject: Re: What is acceptable for -ffast-math? (Was: associative law incombine)
- From: Linus Torvalds <torvalds at transmeta dot com>
- Date: Wed, 1 Aug 2001 10:27:59 -0700 (PDT)
- cc: <tim at hollebeek dot com>, <Theodore dot Papadopoulo at sophia dot inria dot fr>, <amylaar at redhat dot com>, <aoliva at redhat dot com>, <gcc at gcc dot gnu dot org>, <gdr at codesourcery dot com>, <moshier at moshier dot ne dot mediaone dot net>, <tprince at computer dot org>
On Wed, 1 Aug 2001 dewar@gnat.com wrote:
>
> a/2.0/2.0 will never yield zero if a is non-zero
> a/4.0 may indeed yield zero if a is the smallest number
Didn't you already agree that FTZ was acceptable even for a default mode,
much less -ffast-math?
The above rules, btw, only apply for exact IEEE math, and on a number of
machines you _will_ see zero for the first one.
So I don't think your example is a valid argument for not using the
optimization - even without -ffast-math.
Linus