4.3.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 (0 - 9).
  • An optional fractional part: . followed by zero or more decimal digits.
  • An optional exponent, consisting of:
    • An E or e.
    • Optional sign: either + or -.
    • One or more decimal digits.

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.