Float Decimal (p) BCD - non-Intel platforms

Underlying default support for Open PL/I FLOAT DECIMAL BCD is Float Binary Standard IEEE-854-1987. This is identical to our support for FLOAT BINARY, and is available on non-Intel platforms only.

The Open PL/I compiler option for FLOAT DECIMAL support is -fdasfb (float decimal as float binary). This option is the default.

The default format is 4-byte float binary for FLOAT DECIMAL(p) where p represents the precision, and is ≤ 6.

The default format is 8-byte float binary for FLOAT DECIMAL(p) where p represents the precision, and is > 6 and <= 16.

Alternatively, float decimal data can be stored and processed as 12-byte Binary Coded Decimal BCD float decimal data by using the -nofdasfb (no float dec as float bin) compiler option. In this case, Float Decimal (p) is a decimal floating-point number, stored in packed decimal format. It consists of a sign, an exponent sign, two bits used for infinity, not-a-number (usually 0), a 3-digit (base 10) exponent and a 17-digit (base 10) fraction. Both the exponent and fraction have a separate sign bit. All digits are packed Binary Coded Decimal (BCD), such that the entire string fits in 96 bits (12 bytes). The fraction contains at least p decimal digits.


Float Decimal

Size Alignment    Approximate Absolute Value of Range
12 bytes    4 bytes 9.9999999999999999x10 -999 to 9.9999999999999999x10 999