dqua
Decimal Quantize
dqua FRT,FRA,FRB,RMC
dqua. FRT,FRA,FRB,RMC
dqua. FRT,FRA,FRB,RMC
Adjusts the exponent of a DFP number to match a reference. Critical for aligning decimal points before addition.
Details
The dqua instruction quantizes the DFP operand in register FRB to the form with the same exponent as that of the DFP operand in FRA based on the rounding mode specified by RMC. The result is placed in FRT.
Pseudocode Operation
Programming Note
DFP Quantize can be used to adjust one DFP value to a form having the same exponent as another DFP value. If the adjustment requires the significand to be shifted left and would cause overflow from the most significant digit, the result is a default QNaN.
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
Example
dqua f1, f2, f3
Encoding
Binary Layout
0
0
FRT
6
FRA
11
FRB
16
RMC
21
Rc
23
3
28
21
31
23
Operands
-
FRT
Target -
FRA
Source Value -
FRB
Reference Exponent -
RMC
Rounding Mode Control