Convert Floating-Point to Decimal Form (CVTFPDF)


Op Code (Hex) Operand 1 Operand 2 Operand 3
CVTFPDF 10BF Decimal exponent Decimal significand Source


CVTFPDFR 12BF Decimal exponent Decimal significand Source
Operand 1: Packed variable scalar or zoned variable scalar (1 to 31 digits).

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

Operand 3: Floating-point scalar.

Description

This instruction converts a binary floating-point value to a decimal form of a floating-point value specified by a decimal exponent and a decimal significand, and places the result in the decimal exponent and decimal significand operands.

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 are allowed. It must be specified with at least five digit positions. The decimal exponent provides for containing a signed integer value specifying a power of 10 which gives the floating-point value its magnitude.

The decimal significand must be specified as a decimal value with a single integer digit position and optional fractional digit positions. The decimal significand provides for containing a signed decimal value specifying decimal digit which gives the floating-point value its precision. The decimal significand is formed as a normalized value, that is, the leftmost digit position is nonzero for a nonzero source value.

When the source contains a representation of a normalized binary floating-point number with decimal significand digits beyond the leftmost 7 digits for a short floating-point source or beyond the leftmost 15 digits for a long floating-point source, the precision allowed for the binary floating-point source is exceeded.

When the source contains a representation of a denormalized binary floating-point number, it may provide less precision than the precision of a normalized binary floating-point number, depending on the particular source value. Decimal significand digits exceeding the precision of the source are set as a result of the conversion to provide for uniqueness of conversion and are correct, except for rounding errors. These digits are only as precise as the floating-point calculations that produced the source value. The floating-point inexact result  (hex 0C0D) exception provides a means of detecting loss of precision in floating-point calculations.

The binary floating-point source is converted to a decimal form floating-point value and rounded to the precision of the decimal significand operand as follows:

A size  (hex 0C0A) exception cannot occur on the assignment of the decimal exponent or the decimal significand values.

Limitations (Subject to Change)

The following are limits that apply to the functions performed by this instruction.

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