What is acceptable for -ffast-math? (Was: associative law incombine)
Linus Torvalds
torvalds@transmeta.com
Wed Aug 1 10:32:00 GMT 2001
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
More information about the Gcc
mailing list