dxex

Decimal Extract Exponent

dxex FRT,FRB
dxex. FRT,FRB

Extracts the biased exponent of a DFP operand in FRB and places it into FRT.

Details

The biased exponent of the operand in FRB is extracted and placed into FRT in the 64-bit signed binary integer format. Special codes are returned for infinity, QNaN, or SNaN operands.

Pseudocode Operation

if 'dxex' then
    a <- biased exponent of FRB[p]
    if a > MBE1 then
        FRT[p] <- QNaNSNaN
    else if 0 ≤a ≤MBE then
        FRT[p] <- Finite number with biased exponent a
    else if a = -1 then
        FRT[p] <- Infinity
    else if a = -2 then
        FRT[p] <- QNaN
    else if a = -3 then
        FRT[p] <- SNaN
    else if a < -3 then
        FRT[p] <- QNaN

Programming Note

The exponent bias value is 101 for DFP Short, 398 for DFP Long, and 6176 for DFP Extended.

Example

dxex f1, f3

Encoding

Binary Layout
59
0
FRT
6
0
11
FRB
31
354
/
 
Format X-form
Opcode 0xEC0002C4
Extension Decimal Floating-Point
Registers Altered CR1, (if, Rc=1), FPSCR

Operands

  • FRT
    Target
  • FRB
    Source