HP 3000 Manuals

Real Number Handling [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

Real Number Handling 

TurboIMAGE/V databases must be STORE/RESTORE compatible with
TurboIMAGE/XL databases; therefore, real numbers in TurboIMAGE/XL are
stored in MPE V floating-point format.  TurboIMAGE/XL does not translate
real numbers to IEEE real format.  The default real data type in native
mode programs is IEEE real format.  Since PACKFMT line is generated by
the migration aid to control packing and unpacking of database buffers,
specify "OPTION REALV" in the migration aid if your database uses real
data types.  Then all the PACKFMT statements generated by the migration
aid will include the keyword "REALV".  This keyword indicates that real
number conversions between IEEE real and MPE V real format are necessary.
If a PACKFMT statement doesn't contain any real data types, the "REALV"
keyword is ignored.

The change in floating-point real format representation creates some
potential problems.  MPE V format lets real numbers and short real
numbers have exponents between +77 and -77.  IEEE real format lets
exponents be between +308 and -324.  IEEE short real format lets
exponents be between +38 and -45.

These are the potential problems:

 *  Short real overflow or underflow occurs during the change from MPE V
    real format when a short real variable is unpacked from the packed
    buffer and the short real data stored in the database is not within
    the range of +38 and -45.

 *  Real overflow or underflow occurs during the change from IEEE real
    format to MPE V real format if data is not within the range of +77
    and -77 when the real variable is packed to the packed buffer.

Run programs in compatibility mode if they contain databases that use
short real numbers that are not within the range of +38 and -45.



MPE/iX 5.0 Documentation