A hexadecimal floating-point constant combines a hexadecimal significand with an exponent introduced by P or p. Its general form is 0XhPe, interpreted as h × 2^e: h uses hexadecimal digits, while e remains a decimal exponent. This notation is useful when specifying floating-point values with exact representations. section 5.3
Reading a hexadecimal floating-point constant
0x1.7aP-13 means the hexadecimal fraction 1.7a multiplied by 2 to the power −13. The hexadecimal significand supplies the value’s digits; P-13 supplies a binary scaling factor, not a power of 16. section 5.3
float |
double |
long double |
|
| Literal | 0.2F |
0.2 |
0.2L |
| Value | 0x1.9999’9AP-3F |
0x1.9999’9999’9999AP-3 |
0xC.CCCC’ CCCC’ CCCC’ CCDP-6L |
Compare hexadecimal floating-point constants with float, double, and long double suffix forms. section 5.3

