The most general form of a real constant is:
sign | digits | . | digits | E | sign | digits |
2c-integer-part- | 2c-decimal-part- | 2c-exponent- | ||||
4c--basic-real-constant-- | 3c--exponent-section-- |
There is no harm in giving more decimal digits in a real (or double precision) constant than the computer can make use of: the value will be correctly rounded by the computer and the extra decimal places ignored.
Here are a few examples of valid real constants:
.5 -10. 1E3 +123.456E4 .000001
Dangling decimal points, though permitted, are easily overlooked,
and it is conventional to standardize constants in exponential
notation so that there is only one digit before the decimal point.
Using this convention, these values would look like this:
0.5 -10.0 1000.0 1.23456E6 1.0E-6