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

Gabriel Dos Reis gdr@codesourcery.com
Wed Aug 1 11:44:00 GMT 2001


Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> writes:

| [1  <text/plain; us-ascii (7bit)>]
| 
| 
| gdr@codesourcery.com said:
| > No, I do mean a transformation which does not dramatically transmute
| > the computations.  
| 
| That's not a definition.

Do you have one?

Changing 0.125 to 0.0 is a dramatic change.

| Dramatically, can mean very different things 
| depending on the people and on the algorithms. That's basically the 
| point that I'm trying to make. In many applications and algorithm
| the optimization a/b/c to a/(b*c) is meaningful and relevant.

In the case I showed, I was tring to compute a unit-length vector by
first scaling in order to avoid overflow (the /c part).

I'm not dismissing the fact that there are algorithms which would
benefit from optimizations.  As I said earlier, I'm a fervent
proponent of optimizations.  Not transformations which change the
computation in a very unexpected ways. 

-- Gaby





More information about the Gcc mailing list