Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: exception for intention

...

On the same implementation, this program prints 0, implying that the integer value 1234567890 is representable in type double without change.

Exceptions

FLP36-C-EX1: Loss of precision can be acceptable when necessary for the proper execution of the program. It is recommended that the conversion be clearly commented as permitting loss of precision.

Risk Assessment

Conversion from integral types to floating-point types without sufficient precision can lead to loss of precision (loss of least significant bits).

...