Title
Floating-point requirements for integer representation
Status
nad
Section
7.3.11 [conv.fpint]
Submitter
Tony Van Eerd

Created on 2015-06-12.00:00:00 last changed 109 months ago

Messages

Date: 2015-10-15.00:00:00

Rationale (October, 2015):

CWG felt that the cited passage should be read as indicating that converting true and false should have the same result as converting 1 and 0 and thus do not imply a requirement that those values be represented exactly.

Date: 2022-11-20.07:54:16

There is no normative requirement regarding the ability of floating-point values to represent integer values exactly; however, 7.3.11 [conv.fpint] paragraph 2 appears to implicitly rely on their ability to represent the values 0 and 1:

If the source type is bool, the value false is converted to zero and the value true is converted to one.
History
Date User Action Args
2015-11-10 00:00:00adminsetmessages: + msg5976
2015-06-12 00:00:00admincreate