Convert Decimal Form to Floating-Point (CVTDFFP)


Op Code (Hex) Operand 1 Operand 2 Operand 3
107F Receiver Decimal exponent Decimal significand
Operand 1: Floating-point variable scalar.

Operand 2: Packed scalar or zoned scalar (1 to 31 digits).

Operand 3: Packed scalar or zoned scalar (1 to 31 digits).

Description

This instruction converts the decimal form of a floating-point value specified by a decimal exponent and a decimal significand to binary floating-point format, and places the result in the receiver operand. The decimal exponent (operand 2) and decimal significand (operand 3) are considered to specify a decimal form of a floating-point number. The value of this number is considered to be as follows:

Value = S * (10**E)

where:

S = The value of the decimal significand operand.
E = The value of the decimal exponent operand.
* Denotes multiplication.
** Denotes exponentiation.

The decimal exponent must be specified as a decimal integer value; no fractional digit positions may be specified in its definition. The decimal exponent is a signed integer value specifying a power of 10 which gives the floating-point value its magnitude. A decimal exponent value too large or too small to be represented in the receiver will result in the signaling of the appropriate floating-point overflow  (hex 0C06) exception or floating-point underflow  (hex 0C07) exception.

The decimal significand must be specified as a decimal value with a single integer digit position and optional fractional digit positions. The decimal significand is a signed decimal value specifying decimal digits which give the floating-point value its precision. The significant digits of the decimal significand are considered to start with the leftmost nonzero decimal digit and continue to the right to the end of the decimal significand value. Significant digits beyond 7 for a short float receiver, and beyond 15 for a long float receiver exceed the precision provided for in the binary floating-point receiver. These excess digits do participate in the conversion to provide for uniqueness of the conversion as well as for proper rounding.

The decimal form floating-point value specified by the decimal exponent and decimal significand operands is converted to a binary floating-point number and rounded to the precision of the result field as follows:

Source values which, in magnitude M, are in the range where (10**31-1) * 10**-31 <= M <= (10**31-1) *10**+31 are converted subject to the normal rounding error defined for the floating-point rounding modes.

Source values which, in magnitude M, are in the range where (10**31-1) * 10**-31 > M > (10**31-1) *10**+31 are converted such that the rounding error incurred on the conversion may exceed that defined above. For round to nearest, this error will not exceed by more than .47 units in the least significant digit position of the result in relation to the error that would be incurred for normal rounding. For the other floating-point rounding modes, this error will not exceed 1.47 units in the least significant digit position of the result.

The converted and rounded value is then assigned to the floating-point receiver.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

0C Computation

10 Damage Encountered

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2E Resource Control Limit

32 Scalar Specification

36 Space Management

44 Protection Violation