7-41
FLOATING-POINT UNIT
given argument x, let f(x) and F(x) be the correct and computed (approximate) function values,
respectively. The error in ulps is defined to be:
where k is an integer such that
.
With the Pentium
®
and Pentium
®
Pro processors, the worst case error in the transcendental
instructions is less than 1 ulp when rounding to nearest and less than 1.5 ulps when rounding
in other modes. (The instructions fyl2x and fyl2xp1 are two operand instructions and are guar-
anteed to be within 1 ulp only when y = 1.
When y != 1, the maximum ulp error is always within 1.35 ulps in round to nearest mode. The
trigonometric
instructions may use a 66-bit approximation to the true value of pi to reduce the magnitude of
the input argument.
In this case, the final computed result can vary considerably from the true mathematically
precise result.) The instructions are guaranteed to be monotonic, with respect to the input oper-
ands, throughout the domain supported by the instruction. (For the two operand functions,
monotonicity was proved by holding one of the operands constant.)
With the Intel486 processor and Intel 387 math coprocessor, the worst-case, transcendental-
function error is typically 3 or 3.5 ulps, but is sometimes as large as 4.5 ulps.
7.5.11.FPU Control Instructions
The following instructions control the state and modes of operation of the FPU. They also allow
the status of the FPU to be examined:
FINIT/FNINIT
Initialize FPU
FLDCW
Load FPU control word
FSTCW/FNSTCW
Store FPU control word
FSTSW/FNSTSW
Store FPU status word
FCLEX/FNCLEX
Clear FPU exception flags
FLDENV
Load FPU environment
FSTENV/FNSTENVStore FPU environment
FRSTOR
Restore FPU state
FSAVE/FNSAVE
Save FPU state
FINCSTP
Increment FPU register stack pointer
FDECSTP
Decrement FPU register stack pointer
FFREE
Free FPU register
FNOP
No operation
WAIT/FWAIT
Check for and handle pending unmasked FPU exceptions
The FINIT/FNINIT instructions initialize the FPU and its internal registers to default values.
errorfx
()
Fx
()
2
k63
--------------------------
=
12
k
fx
()
2
<
?