Extract Exponent (EXTREXP)

Instruction Syntax

Op Code (Hex) Extender Operand 1 Operand 2 Operand [3-6]
EXTREXP 1072 Receiver Source
EXTREXPB 1C72 Branch options Receiver Source Branch targets
EXTREXPI 1872 Indicator options Receiver Source Indicator targets
Operand 1: Binary variable scalar.

Operand 2: Floating-point scalar.

Operand 3-6:

  • Branch Form–Branch point, instruction pointer, relative instruction number, or absolute instruction number.
  • Indicator Form–Numeric variable scalar or character variable scalar.

Description:

This instruction extracts the exponent portion of a floating-point scalar source operand and places it into the receiver operand as a binary variable scalar.

The operands must be the numeric types indicated because no conversions are performed.

The source floating-point field is interrogated to determine the binary floating-point value represented and either a signed exponent, for number values, or a special identifier, for infinity and NaN values, is placed in the binary variable scalar receiver operand.

The value to be assigned to the receiver is dependent upon the floating-point value represented in the source operand as described below. It is a signed binary integer value and a numeric assignment of the value is made to the receiver.

When the source represents a normalized number, the biased exponent contained in the exponent field of the source is converted to the corresponding signed exponent by subtracting the bias of 127 for short or 1,023 for long to determine the value to be returned. The resulting value ranges from -126 to +127 for short format, -1,022 to +1,023 for long format.

When the receiver is unsigned binary, a negative exponent will result in a size (hex 0C0A) exception unless size exceptions are suppressed.

When the source represents a denormalized number, the value to be returned is determined by adjusting the signed exponent of the denormalized number. The signed exponent of a denormalized number is a fixed value of -126 for the short format and -1,022 for the long format. It is adjusted to the value the signed exponent would be if the source value was adjusted to a normalized number. The resulting value ranges from -127 to -149 for short format, -1,023 to -1,074 for long format.

When the source represents a value of zero, the value returned is zero.

When the source represents infinity, the value returned is +32,767.

When the source represents a not-a-number, the value returned is -32,768 for a signed binary receiver. For an unsigned binary(2) a value of 32,768 is returned, and for a unsigned binary(4) a value of 4,294,934,528 is returned.

Resultant Conditions

  • Normalized–The source operand value represents a normalized binary floating-point number. The signed exponent is stored in the receiver.
  • Denormalized–The source operand value represents a denormalized binary floating-point number. An adjusted signed exponent is stored in the receiver.
  • Infinity–The source operand value represents infinity. The receiver is set with a value of +32,767.
  • NaN–The source operand value represents a not-a-number. The receiver is set with a value of -32,768 when signed binary, with a value of 32,768 when unsigned binary(2), and with a value of 4,294,934,528 when unsigned binary(4).

Authorization Required

  • None

Lock Enforcement

  • None

Exceptions

  • 06 Addressing
    • 0601 Space Addressing Violation
    • 0602 Boundary Alignment
    • 0603 Range
  • 08 Argument/Parameter
    • 0801 Parameter Reference Violation
  • 10 Damage Encountered
    • 1004 System Object Damage State
    • 1044 Partial System Object Damage
  • 0C Computation
    • 0C0A Size
  • 1C Machine-Dependent
    • 1C03 Machine Storage Limit Exceeded
  • 20 Machine Support
    • 2002 Machine Check
    • 2003 Function Check
  • 22 Object Access
    • 2201 Object Not Found
    • 2202 Object Destroyed
    • 2203 Object Suspended
    • 2208 Object Compressed
    • 220B Object Not Available
  • 24 Pointer Specification
    • 2401 Pointer Does Not Exist
    • 2402 Pointer Type Invalid
  • 2C Program Execution
    • 2C04 Branch Target Invalid
  • 2E Resource Control Limit
    • 2E01 User Profile Storage Limit Exceeded
  • 32 Scalar Specification
    • 3201 Scalar Type Invalid
  • 36 Space Management
    • 3601 Space Extension/Truncation
  • 44 Protection Violation
    • 4401 Object Domain or Hardware Storage Protection Violation
    • 4402 Literal Values Cannot Be Changed