drrnd.
DFP Reround
Rerounds a decimal floating-point number to the specified precision.
Details
Rerounds a decimal floating-point number from FRB to the precision specified by the rounding mode control, placing the result in FRA and setting CR1 based on the result (if Rc=1). The instruction handles overflow, underflow, and inexact exceptions according to FPSCR settings. This instruction requires Decimal Floating-Point support and modifies CR1 and FPSCR when Rc is set.
Pseudocode Operation
FRA ← dround(FRB, RMC)
if Rc = 1 then CR1 ← (FRA_exception_flags)
Programming Note
The drrnd instruction is used to reround a decimal floating-point number in register RA according to the rounding mode specified in the FPSCR. Ensure that the FPSCR's rounding mode is set appropriately before executing this instruction to achieve the desired precision. This instruction operates at user privilege level and does not raise exceptions under normal circumstances, but it may alter the contents of CR0 if an exception occurs during execution.
Example
Encoding
Operands
-
RA
Target Decimal Floating-Point Register -
RB
Source Decimal Floating-Point Register