Hallo, Krzysztof Czaja hat gesagt: // Krzysztof Czaja wrote:
while without "-O6" it works ok. The bottom line is, that I do not know the rules (if there are any).
This one was posted by Simon Jenkins last week on linux-audio-dev:
I (re)discovered the following branch-free method a while ago:
/* branch-free denormal killer (slightly blunt) */
inline float FlushToZero( volatile float f )
{
f += 9.8607615E-32f;
return f - 9.8607615E-32f;
}
/* end */
The people who discovered it first call this method "Elimination
by Quantification".
Its slightly blunt because it damages the precision of extremely
low but not yet denormal numbers: Anything of magnitude < 2 **
-103 loses one bit of precision for each binary order of magnitude
it is below that number. (This means that denormal numbers lose
/all/ of their precision and become zero).
Simon Jenkins
(Bristol, UK)
He later added:
The reason its an inline function rather than a drop-in
replacement macro is because casting macro arguments to volatile
wasn't having the desired effect on the optimiser, whereas this
does.
Maybe it's an alternative to consider in some cases?
Frank Barknecht _ ______footils.org__