drsp
Decimal Round To DFP Short
drsp FRT,FRB
drsp. FRT,FRB
drsp. FRT,FRB
Rounds DFP Long (64-bit) to DFP Short (32-bit compressed).
Details
The DFP long operand in FRB is converted and rounded to DFP short format. The DFP short value is extended on the left with zeros to form a 64-bit entity and placed into FRT. The sign of the result is the same as the sign of the source operand.
Pseudocode Operation
if 'drsp' then
FRT <- (FRB) rounded to DFP short format
if Rc=1 then
CR0, CR1 <- updated based on result
Programming Note
Note that DFP short format is a storage-only format. Therefore, conversion of a long SNaN to short for mat will not cause an exception.
Example
drsp f1, f3
Encoding
Binary Layout
59
0
FRT
6
0
11
FRB
31
770
/
Operands
-
FRT
Target -
FRB
Source