cpp/language/floating literal

Floating-point literal defines a compile-time constant whose value is specified in the source file.

Syntax
@1@ representing a whole number without a decimal separator, in this case the exponent is not optional:,. @2@ representing a whole number with a decimal separator, in this case the exponent is optional:,. @3@ representing a fractional number. The exponent is optional:, ,. @4@ Hexadecimal representing a whole number without a radix separator. The exponent is never optional for hexadecimal floating-point literals:,. @5@ Hexadecimal representing a whole number with a radix separator. The exponent is never optional for hexadecimal floating-point literals:,. @6@ Hexadecimal representing a fractional number with a radix separator. The exponent is never optional for hexadecimal floating-point literals:,.

has the form

has the form

, if present, is either or

, if present, is one of, , ,. The suffix determines the type of the floating-point literal:
 * (no suffix) defines
 * defines
 * defines

Explanation
Decimal scientific notation is used, meaning that the value of the floating-point literal is the significand multiplied by the number 10 raised to the power of. E.g. the mathematical meaning of is 123×104.