Directly compairing floating point numbers for equality is *always* a bad
idea.
Only if the numbers are supposed to be the same number but are the result
of two different computations.
For example, you can find that a floating point value which is not a
NaN is not equal to itself.
I find this very surprising. And possibily wrong, ie against IEEE 754.
The explanation that followed made no sense to me. It would make sense for
floating point values held in *different* variables, but not for the
*same*
variable. It seems to me that the gcc docs is spreading unnecessary FUD.
But I must be missing something...