FROM:  Dr. Thomas R. Nicely
       Professor of Mathematics
       Lynchburg College
       1501 Lakeside Drive
       Lynchburg, Virginia 24501-3199

       Phone:     804-522-8374
       Fax:       804-522-8499

TO:    Whom it may concern

RE:    Bug in the Pentium FPU

DATE:  30 October 1994

It appears that there is a bug in the floating point unit (numeric
coprocessor) of many, and perhaps all, Pentium processors.

In short, the Pentium FPU is returning erroneous values for certain
division operations.  For example,


is calculated incorrectly (all digits beyond the eighth significant digit
are in error).  This can be verified in compiled code, an ordinary
spreadsheet such as Quattro Pro or Excel, or even the Windows calculator
(use the scientific mode), by computing


which should equal 1 exactly (within some extremely small rounding
error; in general, coprocessor results should contain 19 significant
decimal digits).  However, the Pentiums tested return


for this calculation.  A similar erroneous value is obtained for x*(1/x)
for most values of x in the interval

		824633702418 <= x <= 824633702449,

and throughout any interval obtained by multiplying or dividing the above
interval by an integer power of 2 (there are yet other intervals which
also produce division errors).

The bug can also be observed by calculating 1/(1/x) for the above values
of x.  The Pentium FPU will fail to return the original x (in fact, it
will often return a value exactly 3072 = 6*0x200 larger).

The bug has been observed on all Pentiums I have tested or had tested to
date, including a Dell P90, a Gateway P90, a Micron P60, an Insight P60,
and a Packard-Bell P60.  It has not been observed on any 486 or earlier
system, even those with a PCI bus.  If the FPU is locked out (not always
possible), the error disappears; but then the Pentium becomes a "586SX",
and floating point must run in emulation, slowing down computations by
a factor of roughly ten.

I encountered erroneous results which were related to this bug as long
ago as June, 1994, but it was not until 19 October 1994 that I felt I had
eliminated all other likely sources of error (software logic, compiler,
chipset, etc.).  I contacted Intel Tech Support regarding this bug on
Monday 24 October (call reference number 51270).  The contact person later
reported that the bug was observed on a 66-MHz system at Intel, but had no
further information or explanation, other than the fact that no such bug 
had been previously reported or observed.

Further information can be obtained by contacting me directly, and by
downloading files from the [anonymous.nicely.pentium_bug] directory of the machine via anonymous ftp on Internet (password
ANONYMOUS, user ID = Internet ID).  These files include a documentation
file, a DOS executable image demonstrating the bug, and the source code for
the demonstration.  The zip file uses PKZIP version 2.04g.

I would be interested in hearing of test results from other Pentiums, and
also from 486-DX4s and (if anybody has one yet) the AMD, Cyrix, and NexGen
clones of the Pentium.

You may use this information freely as long as you give me attribution by
name and employer.