Compiler Library/XL Reference Manual (32650-90029)

1- 6
For longreal numbers stored in normalized form, the exponent portion has
a range of [1,2046] and the fraction portion has a range of [0,252 -1].
The sign bit indicates the sign of the fraction portion (0 indicates a
positive value and 1 indicates a negative value).
Longreal numbers in normalized form have an implied value of 1.0 to the
left of the fraction's most significant bit. Thus, a normalized decimal
value equals the following:
(-1)Sign * 2Exponent-1023 * (1.0+
Fraction
* 2-52 )
and has a range of
(-1)Sign [2.225073858507201 x 10-308 ,1.797693134862316 x 10308 ]
However, the IEEE Standard P754 allows decimal numbers whose absolute
values are smaller than 2.225073858507201 x 10-308 . Denormalized numbers
with
Exponent
equal to zero have the value
(-1)Sign * 2-1022 *(0.0 +
Fraction
* 2-52 )
and has a range of
(-1)Sign * [4.940656458412465 x 10-324 ,2.225073858507201 x 10-308 ]
When the significant bit, the exponent, and the fraction are zero, the
decimal value is equal to 0.0.
NaN (not a number) can be encoded in the longreal number format, as
follows:
When all the exponent bits are set to 1 and at least one of the
fraction bits is non-zero, there is a NaN regardless of the sign bit.
For example:
Exponent = 2047; fraction <> 0
Infinity can also be encoded in the longreal number format as follows:
When all exponent bits are set to 1 and all of the fraction bits are
set to 0, there is an Infinity: (-1)Sign Infinity.
For example:
Exponent = 2047; fraction = 0
NOTE The procedures described in Chapter 4, "Packed-Decimal Procedures,"
use packed-decimal and external-decimal numbers.
Functions and Procedures
Table 1-2 through Table 1-11 summarize the functions and procedures in
the Compiler Library. Chapter 2 describes mathematical functions.
Chapter 3 describes the utility procedures. Chapter 4 describes the
packed-decimal procedures. Appendix A describes an error message
handling routine and the Compiler Library/XL error messages.