dquai.

DFP Quantize Immediate

dquai. FRT,FRB,UI

Quantizes a DFP value to an immediate number of decimal digits.

Details

Quantizes a decimal floating-point (DFP) value in FRB to the number of decimal digits specified by immediate UI, storing the result in FRT. This instruction is part of the Decimal Floating-Point category and updates FPSCR and CR1 when Rc=1.

Pseudocode Operation

FRT ← Quantize(FRB, UI)
FPSCR ← updated with DFP status
CR1 ← (FRT is NaN, FRT is Infinity, FRT is Zero, FRT is Negative) if Rc=1

Programming Note

The dquai. instruction is used for quantizing DFP values with an immediate quantum, rounding as necessary. Ensure that the immediate field UI specifies a valid quantum and that the source operand FRB is correctly formatted. This instruction operates at the problem state privilege level.

Example

dquai. f1, f3, 4

Encoding

Binary Layout
111011
0
FRT
6
FRB
11
UI
16
..010
21
00011
31
 
Format Z23-form
Opcode 0xEC000086
Extension Decimal Floating-Point

Operands

  • FRT
    Target Floating-Point Register
  • FRB
    Source Floating-Point Register
  • UI
    Immediate Value