Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The object representation for floating-point values is implementation defined. However, an implementation which defines the __STDC_IEC_559__ macro shall conform to the IEC 60559 floating-point standard, and uses what is frequently referred to as IEEE 754 floating-point arithmetic [ISO/IEC 9899:2011]. The floating-point object representation used by IEC 60559 is one of the most common floating-point object representations in use today.

All floating-point object representations uses specific bit patterns to encode the value of the floating-point number being represented. However, equivalence of floating-point values is not encoded solely by the bit pattern used to represent the value. For instance, if the floating-point format supports negative zero values (as IEC 60559 does), the values -0.0 and 0.0 are equivalent and will compare as equal, but the bit patterns used in the object representation are not identical. Similarly, if two floating-point values are both (the same) NaN, they will not compare as equal, despite the bit patterns being identical, because they are not equivalent.

...

[ISO/IEC 9899:2011]Annex F, "IEC 60559 floating-point arithmetic"

 

...

Image Added Image Added Image Added