What is acceptable for -ffast-math? (Was: associative law in combine)

Carlo Wood carlo@alinoe.com
Wed Aug 1 19:04:00 GMT 2001


When I see a thread as long as this one, I always think:
here is some inefficient "communication" going on :p.
Allow me to give my 0.02.

> > Changing 0.125 to 0.0 is a dramatic change.

Some may think that dramatic changes are acceptable.

When an optimization results in

99%   of practical cases it is faster,
0.99% of practical cases it is slower and
0.01% of the cases it results in a dramatic change;

then that might be acceptable because the number
of cases were the difference is not dramatic and also
not close to the normal FP accuracy is 0%.

A dramatic change will be noted.  Developers have to watch
for overflow and underflow already anyway.

My definition of what is unacceptable is when an optimization
causes possibly errors for example in the 32th bit, while the
expected accuracy is 64 bit...

Imho, this difference (dramatic versus subtile) is would you
tried to discuss, but failed to make clear.

-- 
Carlo Wood <carlo@alinoe.com>



More information about the Gcc mailing list