LRDR Rl,R2
[RR, Extended Operand 2, Long Operand 1]
25
o 8 12 15
The second operand is rounded to the next smaller
format, and the result is placed in the first-operand
location.
Rounding consists in adding a one in bit position
32 or 72 of the long or extended second operand,
respectively, and propagating the carry, if any, to the
left. For both cases, the sign of the fraction is ig­
nored, and addition is performed as if the fractions
were positive.
If rounding causes a carry out of the high-order
digit position of the fraction, the fraction is shifted
right one digit position, and the characteristic is in­
creased by one.
The sign of the result is the same as the sign of
the second operand. No normalization takes place.
An exponent-overflow exception is recognized
when shifting the fraction right causes the character­
istic to exceed 127. The operation is completed by
loading a number whose characteristic is 128 less
than the correct value, and a program interruption
for exponent overflow occurs. The result is normal­
ized, and the sign and fraction remain correct.
Exponent-underflow and significance exceptions
cannot occur.
The Rl field must designate register 0, 2, 4, or 6;
the R2 field of LRER must designate register 0, 2, 4,
or 6; and the R2 field of LRDR must designate reg­
ister ° or 4. Otherwise, a specification exception is
recognized.
Condition Code:
The code remains unchanged.
Program Exceptions:
Operation (if the extended-precision floating­
point feature is not installed)
Specification
Exponent Overflow
Multiply
MER Rl,R2
[RR, Short Multiplier and Multiplicand,
Long Product]
3C
o 8 12 15
ME Rl,D2(X2,B2)
[RX, Short Multiplier and Multiplicand,
Long Product]
o 8 12 16
MDR
[RR, Long Operands]
o 8 12 15
MD Rl,D2(X2,B2)
[RX, Long Operands]
6C 20 o 8 12 16 20 MXDR Rl,R2
[RR, Long Multiplier and Multiplicand,
Extended Product 1
o 8 12 15
MXD Rl,D2(X2,B2)
[RX, Long Multiplier and Multiplicand,
Extended Product 1
67
o 8 12 16 20 MXR Rl,R2
[RR, Extended Operands]
o 8 12 15
31
31
31
The normalized product of the second operand (the
multiplier) and the first operand (the multiplicand) is
placed in the first-operand location.
Floating-Point Instructions 167
Multiplication of two floating-point numbers con­
sists in exponent addition and fraction multiplica­
tion. The operands are prenormalized, and the sum of the characteristics of the normalized operands,
less 64, is used as the characteristic of the intermedi­
ate product.
The product of the fractions is developed such
that the result has the exact fraction product truncat­
ed to the proper result-fraction length. When the
result is normalized without requiring any postnor­
malization, the intermediate-product fraction is trun­
cated to the result-fraction length, and the
intermediate-product characteristic becomes the
final product characteristic. When the intermediate­
product fraction has one leading zero digit, it is shift­
ed left one digit position, bringing the contents of
the guard-digit position into the low-order position
of the result fraction, and the intermediate-product
characteristic is reduced by one. The intermediate­
product fraction is subsequently truncated to the
result-fraction length.
For MER and ME, the multiplier and multipli­
cand have six-digit fractions, and the product frac­
tion has the full 14 digits of the long format, with the
two low-order fraction digits always zero. For MDR
and MD, the multiplier and multiplicand fractions
have 14 digits, and the result product fraction is
truncated to 14 digits. For MXDR and MXD, the
multiplier and multiplicand fractions have 14 digits,
with the multiplicand occupying the high-order part
of the first operand; the result product fraction con­
tains 28 digits and is an exact product of the operand
fractions. For MXR, the multiplier and multiplicand
fractions have 28 digits, and the result product frac­
tion is truncated to 28 digits.
The sign of the product is determined by the rules
of algebra, unless all digits of the product fraction
are zero, in which case the sign is made plus.
An exponent-overflow exception is recognized
when the characteristic of the normalized product
exceeds 127 and the fraction of the product is not
zero. The operation is completed by making the
characteristic 128 less than the correct value. If, for
extended results, the low-order characteristic also
exceeds 127, it, too, is decreased by 128. The result
is normalized, and the sign and fraction remain cor­
rect. A program interruption for exponent overflow
then occurs.
Exponent overflow is not recognized if the
intermediate-product characteristic exceeds 127 but
is brought within range by normalization.
An exponent-underflow exception exists when the
characteristic of the normalized product is less than
zero and the fraction of the product is not zero. If
the exponent-underflow mask bit is one, the opera-
168 System/370 Principles of Operation
tion is completed by making the characteristic 128
larger than the correct value, and a program inter­
ruption for exponent underflow occurs. The result is
normalized, and the sign and fraction remain correct.
If the exponent-underflow mask bit is zero, program
interruption does not take place; instead, the opera­
tion is completed by making the product a true zero.
For extended results, exponent underflow is not
recognized when the low-order characteristic is less
than zero but the high-order characteristic is zero or
above.
Exponent underflow is not recognized when the
characteristic of an operand becomes less than zero
during pre normalization, but the characteristic of the
normalized product is within range.
When either or both operand fractions are zero,
the result is made a true zero, and no exceptions are
recognized.
The Rl field for MER, ME, MDR, and MD, and
the R2 field for MER, MDR, and MXDR must des­
ignate register 0, 2, 4, or 6. The Rl field for MXDR,
MXD, and MXR, and the R2 field for MXR must
designate register 0 or 4. Otherwise, a specification
exception is recognized.
Com/ition Code:
The code remains unchanged.
Program Exceptions: Operation (if the floating-point feature is not
installed, or, for MXDR, MXD, and MXR, if
the extended-precision floating-point feature is
not installed)
Access (fetch, operand 2 of ME, MD, and MXD
only)
Specification
Exponent Overflow Exponent Underflow Progranrurndng Interchanging the two operands in a floating-point
multiplication does not affect the value of the prod­
uct.
Store STE Rl,D2(X2,B2)
[RX, Short Operands] 70 o 8 12 16 20 31
Previous Page Next Page