Announcement by Dr. Thomas R. Nicely


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
Internet: nicely@acavax.lynchburg.edu

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 (numericcoprocessor) of many, and perhaps all, Pentium processors.

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

1/824633702441.0

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

(824633702441.0)*(1/824633702441.0),

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

0.999999996274709702

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 aboveinterval by an integer power of 2 (there are yet other intervals whichalso produce division errors).

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

The bug has been observed on all Pentiums I have tested or had tested todate, 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 earliersystem, even those with a PCI bus. If the FPU is locked out (not alwayspossible), the error disappears; but then the Pentium becomes a "586SX",and floating point must run in emulation, slowing down computations bya factor of roughly ten.

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

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

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

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


To misc page 99 To menu