drintn
Decimal Floating-Point Round To FP Integer Without Inexact
drintn R,FRT,FRB,RMC
Rounds a decimal floating-point number to an integer without recognizing an inexact exception.
Encoding
Binary Layout
0
0:5
FRT
6:10
R
11:14
FRB
15
RMC
16:20
Rc
21:31
Operands
-
R
Rounding mode control -
FRT
Target Floating-Point Register -
FRB
Source Floating-Point Register -
RMC
Rounding Mode Control
Example
drintn 0, f1, f3, 0
Registers Altered
FPSCR, (FPRF, FX, VXSNAN), FPSCR, (FR, FI), CR1, CR0Related
More in Decimal Floating-Point
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
This operation rounds the value in FRB to an integer using the specified rounding mode (RMC) and places the result in FRT. It does not recognize an inexact exception.
Operation
if 'drintn' then
FRT <- Round(FRB, RMC)
FI <- 0
FR <- 0
VXSNAN <- 0
if Rc=1 then
CR1 <- ClassAndSign(FRT)
else if 'drintn.' then
FRT <- Round(FRB, RMC)
FI <- 0
FR <- 0
VXSNAN <- 0
CR1 <- ClassAndSign(FRT)
Programming Note
The DFP Round To FP Integer Without Inexact and DFP Round To FP Integer Without Inexact Quad instructions can be used to implement decimal equivalents of several C99 rounding functions by specifying the appropriate R and RMC field values.