drrnd
Decimal Floating-Point Reround
drrnd FRT,FRA,FRB,RMC
drrnd. FRT,FRA,FRB,RMC
drrnd. FRT,FRA,FRB,RMC
Rounds a decimal floating-point value to the specified number of significant digits.
Details
The drrnd instruction rounds the contents of register FRB to k significant digits and places the result in register FRT. The rounding mode is determined by the third operand, which specifies the number of significant digits (1 in this case).
Pseudocode Operation
Programming Note
DFP Reround can be used to adjust a DFP value to have no more than a specified number of significant digits. The result is right-justified and rounded as specified by RMC.
Example
drrnd f1, f2, f3, 0
Encoding
Binary Layout
0
0
FRT
6
FRA
11
FRB
16
RMC
21
Rc
31
Operands
-
FRT
Target Floating-Point Register -
FRA
Source Floating-Point Register containing the reference significance -
FRB
Source Floating-Point Register containing the value to be rounded -
RMC
Rounding Mode Control -
k
Number of significant digits