Floating Point

A floating point constant consists of an integer part, a decimal point, a fraction part, and an exponent part; where an exponent part is an e or E, and an optionally signed integer exponent. The integer and fraction parts both consist of a sequence of digits. Either the integer part or the fraction part (not both) may be missing; either the decimal point or the e (E) and the exponent (not both) may be missing.

Note that a floating point constant may not contain any embedded blanks or special characters.

Some floating point constants are:

1.23
.23
0.23
1.
1.0
1.2e10
1.23e-15

but not

1,000.00comma not allowed
1 000.00embedded space not allowed
1000decimal point or exponential part needed
.e0integer part or fractional part needed
-3.14159this is a floating point expression, not a constant

[BACK] [FORWARD] [HOME] [UP] [HELP]