-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
C++26Targeted at C++26Targeted at C++26ISShip vehicle: ISShip vehicle: ISSG6NumericsNumericssize - smallpaper size estimatepaper size estimate
Description
In C23, floating-point literals (called "constants" there) can be represented with excess precision, meaning a float
literal is treated as a double
or long double
value (without affecting the type system, though).
In C++, there is no such permission.
Both C++ and C permit floating-point computations (including operands) to use excess precision. A footnote hints that a conversion will drop the excess precision (e.g. (float)(314.f/100.f)
yields a value with float
precision) (like C does), but there is no normative wording to make that happen.
What is the design intent for handling excess-precision floating-point computations in C++?
See CWG2752 for details.
frederick-vs-ja, mhoemmen and xiaosa-zhz
Metadata
Metadata
Assignees
Labels
C++26Targeted at C++26Targeted at C++26ISShip vehicle: ISShip vehicle: ISSG6NumericsNumericssize - smallpaper size estimatepaper size estimate
Type
Projects
Status
reviewed, needs to come back