Decimal floating-point constant
A decimal floating-point constant is a C floating-point literal written with decimal digits, optionally including a fractional part and decimal exponent.
Modern C, Third Edition
A decimal floating-point literal is a C floating-point literal written with decimal digits and optionally a fractional part and decimal exponent.
- How it is used
- Specifies numerical constants directly in decimal or scientific notation.
- How deep it goes
- Defines decimal-point and exponent notation, without detailing floating-point evaluation or representation.
- Examples
- Uses 1.7E-13 for scientific notation and 0.2F, 0.2, and 0.2L for typed forms.
- What you can do after
- Evaluate/understand decimal floating-point syntax and interpret an exponent as a power of ten.
Read how Modern C, Third Edition explains decimal floating-point constant →
Modern C
A decimal floating-point constant is a C floating-point literal written with decimal digits whose effective value may differ from its written mathematical value.
- How it is used
- Explains how C decimal floating-point literals acquire values and types.
- How deep it goes
- Defines rounding, suffix-based types, and binary representation, while deferring detailed representation mechanics.
- Examples
- Uses 0.0, 0.2, exponent notation, suffix variants, and hexadecimal constants as concrete comparisons.
- What you can do after
- Evaluate how notation and suffixes affect a floating-point literal's effective value and type.
Read how Modern C explains decimal floating-point constant →
Related concepts
- literalkind of · A literal is a language construct that directly denotes a fixed value or specifies an exact value permitted by a type.
- decimal integer constantcontrasts with · A decimal integer constant is a C integer literal written using decimal digits and subject to the language's decimal type-selection rules.
- 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.

