Intel 64 and IA-32 Architectures Software Developers Manual Volume 1, Basic Architecture

Vol. 1 8-25
PROGRAMMING WITH THE X87 FPU
set in the x87 FPU status word if the value is rounded up. See Section 8.3.8, “Pi,” for
information on the π constant.
8.3.5 Basic Arithmetic Instructions
The following floating-point instructions perform basic arithmetic operations on
floating-point numbers. Where applicable, these instructions match IEEE Standard
754:
FADD/FADDP Add floating point
FIADD Add integer to floating point
FSUB/FSUBP Subtract floating point
FISUB Subtract integer from floating point
FSUBR/FSUBRP Reverse subtract floating point
FISUBR Reverse subtract floating point from integer
FMUL/FMULP Multiply floating point
FIMUL Multiply integer by floating point
FDIV/FDIVP Divide floating point
FIDIV Divide floating point by integer
FDIVR/FDIVRP Reverse divide
FIDIVR Reverse divide integer by floating point
FABS Absolute value
FCHS Change sign
FSQRT Square root
FPREM Partial remainder
FPREM1 IEEE partial remainder
FRNDINT Round to integral value
FXTRACT Extract exponent and significand
The add, subtract, multiply and divide instructions operate on the following types of
operands:
Two x87 FPU data registers
An x87 FPU data register and a floating-point or integer value in memory
See Section 8.1.2, “x87 FPU Data Registers,” for a description of how operands are
referenced on the data register stack.
Operands in memory can be in single-precision floating-point, double-precision
floating-point, word-integer, or doubleword-integer format. They are converted to
double extended-precision floating-point format automatically.