4.4.1.2 Floating-Point Numbers
A floating-point number is represented in IEEE 754 format. A floating-point number is written by writing (in order):
- an optional prefix, which consists of the digit ‘
0
’, followed by the letter ‘e
’, ‘f
’ or ‘d
’ in upper or lower case. Because floating point constants are used only with.float
and.double
directives, the precision of the binary representation is independent of the prefix. - an optional sign: either ‘
+
’ or ‘-
’. - an optional integer part: zero or more decimal digits.
- an optional fractional part: ‘
.
’ followed by zero or more decimal digits. - an optional exponent, consisting of:
- an ‘
E
’ or ‘e
’. - an optional sign: either ‘
+
’ or ‘-
’. - one or more decimal digits.
- an ‘
At least one of the integer part or fractional part must be present. The floating-point number has the usual base-10 value.
Floating-point numbers are computed independently of any floating-point hardware in the computer running the assembler.