
16 Oct
2003
16 Oct
'03
8:25 p.m.
G'day all.
Quoting JP Bernardy
1. Use -fexcess-precision, unless you really need the exact (lesser) precision. Otherwise each intermediate result is spilled in memory. This hurts!
Yes, but it does avoid incorrect numerics, which hurts fewer times, but when it does, it hurts a LOT more. :-) Using C, you can often get code like this: float x; if ((x = some_complex_expression()) < 0) { assert(x < 0); /* This assert can fail. */ } The reason is that x has 80 bits of precision when the first test is performed, but by the time you get to the second one, it has been truncated to 32 bits and is now == 0. Cheers, Andrew Bromage