Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Floating point numbers

The Java floating point types float and double are represented in IEEE format, while the COBOL floating point types COMP-1 and COMP-2 are represented in /390 format. The conversion is performed automatically in the JCI functions.

During conversion, the following exceptional situations can occur, which are displayed to the caller as a condition variable in the field ResErrCode (COPY element JCI-METHODRES) when returning from the JCI function:

  • COMP-1 ---> IEEE:

    RES-ERR-FLOAT-UNDERFLOW

    The /390 floating point number is lower than the smallest representable IEEE floating point number.

    RES-ERR-FLOAT-OVERFLOW

    The /390 floating point number is greater than the largest representable IEEE floating point number.

  • COMP-2 ---> IEEE:

    (none)

  • IEEE ---> COMP-1:

    RES-ERR-FLOAT-INVALID

    The IEEE floating point number equals NaN or infinity.

  • IEEE ---> COMP-2:

    RES-ERR-FLOAT-UNDERFLOW

    The IEEE floating point number.is less than the smallest representable /390 floating point number.

    RES-ERR-FLOAT-OVERFLOW

    The IEEE floating point number.is greater than the largest representable /390 floating point number.

    RES-ERR-FLOAT-INVALID

    The IEEE floating point number equals NaN or infinity.

If bit positions are lost in the conversion, this does not lead to an exceptional situation.