Floating-point constants

A floating point constant has different components in the specified order.

A floating-point constant has the following components in the specified order:

Item Description
Integer Part Must be one or more digits.
Decimal Point . (period). Optional if no fractional part follows.
Fraction Part Must be one or more digits. The fraction part is optional.
Exponent Part Optional. Consists of an e or E, possibly followed by a + or -, followed by one or more digits.

For assembler input, you can omit the fraction part. For example, the following are valid floating-point constants:

  • 0.45
  • 1e+5
  • 4E-11
  • 0.99E6
  • 357.22e12

Floating-point constants are allowed only where fcon expressions are found.

There is no bounds checking for the operand.

Note:In AIX® 4.3 and later, the assembler uses the strtold subroutine to perform the conversion to floating point. Check current documentation for restrictions and return values.