Hexadecimal floating-point constant
A hexadecimal floating-point constant is a C floating-point literal with a hexadecimal significand and a binary exponent introduced by p or P.
Modern C, Third Edition
A hexadecimal floating-point literal is a C floating-point literal written with a hexadecimal significand and a binary exponent introduced by P or p.
- How it is used
- Specifies floating-point values in a form suited to exact representations.
- How deep it goes
- Defines the significand, P exponent, and numerical interpretation, but does not discuss compiler implementation or portability details.
- Examples
- Uses 0x1.7aP-13 and type-suffixed hexadecimal constants for float, double, and long double.
- What you can do after
- Evaluate a hexadecimal significand scaled by a power of two.
Read how Modern C, Third Edition explains hexadecimal floating-point constant →
Modern C
A hexadecimal floating-point constant is a C floating-point literal written with hexadecimal significand digits and a binary power exponent.
- How it is used
- Specifies floating-point values in a form closely corresponding to binary representations.
- How deep it goes
- Explains syntax, approximation, representation, and suffix-selected types, but does not develop floating-point internals.
- Examples
- Uses 0x1.99999AP-3, 0xC.CCCCCCCCCCCCCCDP-6, and typed variants of 0.2.
- What you can do after
- Evaluate hexadecimal floating-point spellings and select float, double, or long double with suffixes.
Read how Modern C explains hexadecimal floating-point constant →
Related concepts
- C99produced by · C99 is the ISO standard revision of the C programming language published in 1999.
- literalkind of · A literal is a language construct that directly denotes a fixed value or specifies an exact value permitted by a type.
- binary representationequivalent to · Binary representation expresses information or values using a base-two positional system with two symbols, conventionally zero and one.
- hexadecimal numbercontrasts with · A hexadecimal number is a numeral represented in the base-sixteen positional system using symbols 0–9 and A–F for values zero through fifteen.
- floating-point constantkind of · A floating-point constant is source-code numeric literal syntax that denotes a value in a floating-point type.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

