Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

COMPUTATIONAL-2 phrase

Syntax rules

  1. This phrase specifies internal floating-point items, which are equivalent to external floating-point items in terms of capacity and application (see “Classes and categories of data and literals” in section "Concept of computer-independent data description").

  2. For a COMPUTATIONAL-2 item, the PICTURE clause is prohibited.

  3. The COMPUTATIONAL-2 phrase indicates that a data item is to be stored in double precision floating-point format.

  4. A COMPUTATIONAL-2 item has a length of 8 bytes and is aligned on a doubleword boundary if the SYNCHRONIZED clause is specified.

General rules

  1. A COMPUTATIONAL-2 data item is represented in storage as follows:

    Here, S is the sign of the mantissa.

    Characteristic = exponent + 64

  2. A double-precision internal floating-point item permits representation with a precision of 16 decimal digits.

  3. The following applies to the value that may be represented in a COMPUTATIONAL-2 data item:

    value = 0 or the absolute value of it may range from 5.4 * 10-79 to 7.2 * 1075.


For examples of the COMPUTATIONAL-2 phrase see table 17 in section "COMPUTATIONAL-3 phrase or PACKED-DECIMAL phrase".