WitipediaIt's funny because it's true.
Create account Log in

Pentium FDIV bug

From Witipedia, the funny encyclopedia
Pentium FDIV bug
Found byThomas R. Nicely, Lynchburg College
NoticedJune 1994
Isolated19 October 1994
Reported to intel24 October 1994
Public email30 October 1994
Example4195835 divided by 3145727
Checkthe same division, rearranged, returns 256 instead of 0

The Pentium FDIV bug is an error in the floating-point division of early Intel Pentium processors. Thomas R. Nicely, a mathematician at Lynchburg College, was enumerating primes and adding up the reciprocals of twin primes when the totals from a Pentium disagreed with the totals from a 486 by more than rounding could explain. He traced it, by binary search, to one pair of twin primes. The processor was returning a wrong reciprocal. He contacted Intel on 24 October 1994 and described the bug in an email on 30 October.[1]

He had first seen the bad totals in June. It took until 19 October to be satisfied that the compiler, the chipset and his own code were not the cause.

The division[edit]

A short test, which Nicely attributes to Tim Coe, is the division of 4,195,835 by 3,145,727. A correct processor returns 1.3338204491362410025. A flawed Pentium returns 1.3337390689020375894. The first digits agree. The fifth significant digit does not.[1]

Rearranged, the same sum is harder to miss. Compute 4195835 minus 3145727 times the quotient of those two numbers. The result should be 0. On a flawed Pentium it is 256. Nicely's note says the check can be done in a spreadsheet, in BASIC, or in the calculator that shipped with Windows.

What he was doing[edit]

The project was not a test of the chip. It was a count of primes, twin primes, triplets and quadruplets, run across a set of ordinary computers and combined at the end. The first Pentium joined that set in March 1994. The wrong answers appeared in the sum of reciprocals, which is a quantity that converges, slowly, and which has to be right to many places before the error shows. Lock the floating-point unit out and the error disappeared, at about a tenth of the speed.[1]

The processor failed a piece of arithmetic that a mathematician was only doing in order to add up a series. The failure could then be demonstrated on the calculator.

See also[edit]

References[edit]

  1. ^ Thomas R. Nicely, "Pentium FDIV flaw FAQ", 19 August 2011, including the test values and his account of the discovery.

Rate this article

Two questions, two separate answers. An article can be useless and hilarious, or accurate and dull; the ratings are kept apart so editors can tell which problem they have. Anonymous ratings are counted per IP address.

Was this helpful?Did you actually learn the thing? No ratings yet
Was this funny?Did the joke land, and was it true? No ratings yet