Syntax rules
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").
For a COMPUTATIONAL-2 item, the PICTURE clause is prohibited.
The COMPUTATIONAL-2 phrase indicates that a data item is to be stored in double precision floating-point format.
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
A COMPUTATIONAL-2 data item is represented in storage as follows:
Here, S is the sign of the mantissa.
Characteristic = exponent + 64
A double-precision internal floating-point item permits representation with a precision of 16 decimal digits.
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".