R
Robert Gamble
Douglas said:When the "same" mathematical value is computed twice, the
results need not be the same, so long as each result is one
of the two nearest representable values to the "true" value.
Thus, not even 0.1==0.1 is guaranteed.
Where is this stated? 6.4.4.2p3 states in part:
"For decimal floating constants, and also for hexadecimal floating
constants when FLT_RADIX is not a power of 2, the result is either the
nearest representable value, or the larger or smaller representable
value immediately adjacent to the nearest representable value, chosen
in an implementation-defined manner."
There is similiar language for converting floating point numbers from
other types.
Since when is an implementation allowed to manifest
implementation-defined behavior in a non-consistent fashion?
Robert Gamble