Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1456

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

FPREM1—Partial Remainder
Opcode
D9 F5
Description
Computes the IEEE remainder obtained on dividing the value in the ST(0) register (the
dividend) by the value in the ST(1) register (the divisor or modulus), and stores the
result in ST(0). The remainder represents the following value:
Remainder = ST(0)  (N  ST(1))
Here, N is an integer value that is obtained by rounding the real-number quotient of
[ST(0) / ST(1)] toward the nearest integer value. The sign of the remainder is the same
as the sign of the dividend. The magnitude of the remainder is less than half the
magnitude of the modulus, unless a partial remainder was computed (as described
below).
This instruction produces an exact result; the precision (inexact) exception does not
occur and the rounding control has no effect. The following table shows the results
obtained when computing the remainder of various classes of numbers, assuming that
underflow does not occur.
Table 2-8.
ST(0)
Notes:
Fmeans finite-real number.
*indicates floating-point invalid-arithmetic-operand (#IA) exception.
**indicates floating-point zero-divide (#Z) exception.
When the result is 0, its sign is the same as that of the dividend. When the modulus is
, the result is equal to the value in ST(0).
The FPREM1 instruction computes the remainder specified in IEEE Std 754. This
instruction operates differently from the FPREM instruction in the way that it rounds the
quotient of ST(0) divided by ST(1) to an integer (see the "Operation" below).
4:154
Instruction
FPREM1
FPREM1 Zeros and NaNs
F
-•
-•
*
*
F
F or 0
ST(0)
0
0
0
+0
+0
+0
+F
ST(0)
+F or +0
+
*
*
NaN
NaN
NaN
Description
Replace ST(0) with the IEEE remainder obtained on dividing
ST(0) by ST(1)
ST(1)
0
+0
*
*
**
**
*
*
*
*
**
**
*
*
NaN
NaN
Volume 4: Base IA-32 Instruction Reference
+F
+
NaN
*
*
NaN
F or 0
ST(0)
NaN
0
0
NaN
+0
+0
NaN
+F or +0
ST(0)
NaN
*
*
NaN
NaN
NaN
NaN

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents