drdpq

Decimal Round To DFP Quad-Precision

drdpq FRT, vB

Rounds DFP Quad (128-bit) to DFP Long (64-bit).

Details

The drdpq instruction rounds a decimal floating-point number in FRA[p] to the nearest long (quad-precision) format and places the result in FRT[p]. The rounding mode is determined by the current rounding control setting.

Pseudocode Operation

f1 <- DFP_operation(f2, f3)

Programming Note

The drdpq instruction is used for rounding decimal floating-point numbers to quad-precision. Ensure that the input number in FRA[p] is within the valid range for quad-precision format to avoid overflow or underflow exceptions. The rounding mode is controlled by the FPSCR register, so make sure it's set according to your application's requirements before executing drdpq.

Example

drdpq f1, vb

Encoding

Binary Layout
63
0
FRT
6
/
11
vB
16
770
21
/
31
 
Format X-form
Opcode 0xFC000604
Extension Decimal Floating-Point
Registers Altered FPSCR

Operands

  • FRT
    Target Long
  • vB
    Source Quad