A floating-point constant consists of the following parts:
•
|
Integer part, which is the sequence of numbers
|
•
|
Fractional part, which is the sequence of numbers
|
•
|
Exponential symbol e or E
|
•
|
Exponential in the form of an integer constant (can have sign)
|
Any of the two parts (but not both at the same time) of the following pairs can be omitted:
•
|
Integer or fractional part
|
•
|
Decimal point or symbol e (E) and the exponential in the form of an integer constant
|
Examples:
345. = 345 (decimal);
3.14159 = 3.14159 (decimal);
2.1E5 = 210000 (decimal);
.123E3 = 123 (decimal);
4037e-5 = .04037 (decimal).
|