liveBook · Manning

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.

How 2 Manning books explain it

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

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.