On 2006-12-20, at 00:10, Richard B. Kreckel wrote:


C89 did not refer to IEEE 754 / IEC 60559. Yet, as far as I am aware,
-ffast-math or the implied optimizations have never been turned on by GCC
unless explicitly requested. That was a wise decision.

By the same token it would be wise to refrain from turning on any
optimization that breaks programs which depend on wrapping signed
integers.

Numerical stability of incomplete floating point representations are an entirely different problem category then some simple integer tricks. In the first case the difficulties are inherent to the incomplete representation of the calculation domain. In the second case it's just some peculiarities of the underlying machine as well as the fact that the unsigned qualifier is not used nearly enough frequently in common code. Or in other words: Z/32 resp. 64 IS AN ALGEBRA but
float isn't! Thus this argument by analogy simply isn't valid.

Marcin Dalecki


Reply via email to