Pentium FDIV bug From Wikipedia, the free encyclopedia

The FDIV bug is a bug in the Pentium floating point unit (FPU). Because of the bug, the processor can return incorrect decimal results, an issue troublesome for the precise calculations needed in fields like math and science. Discovered by Professor Thomas R. Nicely at Lynchburg College,[1] Intel attributed the error to missing entries in the lookup table used by the floating-point division circuitry.[2]

Though rarely encountered by average users 66 MHz Intel Pentium (Byte magazine estimated that 1 in 9 billion (sSpec=SX837) with the floating point divides with random parameters FDIV bug would produce inaccurate results),[3] both the flaw and Intel's initial handling of the matter were heavily criticized. Intel ultimately recalled the defective processors.

Contents

1 Chronology 2 Affected models 3 Example symptoms 4 See also 5 References 6 External links

Chronology

Thomas Nicely, a professor of mathematics at Lynchburg College, had written code to enumerate primes, twin primes, prime triplets, and prime quadruplets. Nicely noticed some inconsistencies in the calculations on June 13, 1994, shortly after adding a Pentium system to his group of , but was unable to eliminate other factors (such as programming errors, motherboard chipsets, etc.) until October 19, 1994. On October 24, 1994, he reported the issue to Intel. According to Nicely, his contact person at Intel later admitted that Intel had been aware of the problem since May 1994, when the flaw was discovered by Tom Kraljevic, a Purdue co-op student working for Intel in Hillsboro, OR, during testing of the FPU for its new P6 core, first used in the Pentium Pro.

On October 30, 1994, Nicely sent an email describing the error he had discovered in the Pentium floating point unit to various contacts, requesting reports of testing for the flaw on 486-DX4s, and Pentium clones.[1]

This flaw in the Pentium FPU was quickly verified by other people around the , and became known as the Pentium FDIV bug (FDIV is the assembly language mnemonic for floating-point division). One example was found where the division result returned by the Pentium was off by about 61 parts per million.[1]

The story first appeared in the press on November 7, 1994, in an article in Electronic Engineering Times, "Intel fixes a Pentium FPU glitch" by Alexander Wolfe.[4]

The story was subsequently picked up by CNN in a segment aired on November 21, 1994.[1] This brought it into widespread public prominence.

Publicly, Intel acknowledged the floating-point flaw, but claimed that it was not serious and would not affect most users. Intel offered to replace processors to users who could prove that they were affected. However, although most independent estimates found the bug to be of little importance and would have negligible effect on most users, it caused a great public outcry. Companies like IBM (whose IBM 5x86C microprocessor competed at that time with the Intel Pentium line) joined the condemnation.

On December 20, 1994, Intel offered to replace all flawed Pentium processors on the basis of request, in response to mounting public pressure.[5] Although it turned out that only a small fraction of Pentium owners bothered to get their chips replaced, the financial impact on the company was significant. On January 17, 1995, Intel announced a pre-tax charge of $475 million against earnings, ostensibly the total cost associated with replacement of the flawed processors.[1] Some of the defective chips were later turned into key rings by Intel.[6]

A 1995 article in Science describes the value of number theory problems in discovering bugs and gives the mathematical background and history of Brun's constant, the problem Nicely was working on when he discovered the bug.[7] Affected models

This problem occurs only on some models of the original Pentium processor.[8] Any Pentium family processor with a clock speed of at least 120 MHz is new enough not to have this bug.[8] On affected models, the Intel Processor Frequency ID Utility checks for the presence of this bug.

The ten affected processors are listed below. The 39 S-spec of those processors are not listed in the Intel processor specification finder web page.

Pentium P5 800 nm 5V Core Clock FSB Family Model Stepping S-spec stepping rate speed Q0352, Q0412, 5 1 3 B1 60 MHz 60 MHz SX753 Q0353, Q0413, 5 1 3 B1 66 MHz 66 MHz SX754 Q0466, SX835, 5 1 5 C1 60 MHz 60 MHz SZ949 Q0467, SX837, 5 1 5 C1 66 MHz 66 MHz SZ950

Pentium P54C 600 nm 3.3V Core Clock FSB Family Model Stepping S-spec stepping rate speed 75 5 2 1 B1 50 MHz Q0601 MHz Q0542, Q0613, Q0543, 90 5 2 1 B1 60 MHz SX879, SX885, SX909, MHz SX874 100 Q0563, Q0587, Q0614, 5 2 1 B1 66 MHz MHz SX886, SX910 75 5 2 2 B3 50 MHz Q0606, SX951 MHz Q0628, Q0611, Q0612, 90 SX923, SX922, SX921, 5 2 2 B3 60 MHz MHz SX942, SX943, SX944, SZ951 100 5 2 2 B3 66 MHz Q0677, SX960 MHz

Example symptoms

The presence of the bug can be checked manually by performing the following calculation in any application that uses native floating point numbers, including the Windows Calculator or Microsoft Excel in Windows 95/98. The correct value is:

When converted to the hexadecimal value used by the processor, 4,195,835 = 0x4005FB and 3,145,727 = 0x2FFFFF. The '5' in 0x4005 triggers the fault in the FPU control logic. as a result the value returned by a flawed Pentium processor is incorrect at or beyond four digits:[9]

Another way of detecting the bug is using the pentnt utility included with Windows NT 3.51, NT 4.0, 2000, and XP.[10] See also

Pentium F00F bug Software bug MOS Technology 6502 bugs and quirks Accuracy problems in floating point operations SRT division Hardware Trojan Kill switch References

1. Professor Thomas Nicely. "Pentium FDIV flaw FAQ" (http://www.trnicely.net/pentbug/pentbug.html). 2. "FDIV Replacement Program: Description of the Flaw" (http://support.intel.com/support/processors/pentium/sb/CS-013007.htm). Intel. 2004-07-09. Solution ID CS-013007. Retrieved 2006-12-19. 3. Tom R. Halfhill (March 1995). "An error in a lookup table created the infamous bug in Intel's latest processor" (http://www.byte.com/art/9503/sec13/art1.htm) (– SCHOLAR SEARCH (HT T P://SCHOLAR.GOOGLE.CO.UK/SCHOLAR? HL=EN&LR=&Q=INT IT LE%3AAN+ERROR+IN+A+LOOKUP+T ABLE+CREAT ED+T HE+INFAMOUS+BUG+IN+I NT EL%27S+LAT EST +PROCESSOR&AS_PUBLICAT ION=%5B%5BBYT E%5D%5D&AS_YLO=&AS_YHI=&BT NG=S EARCH)). BYTE (March 1995). Retrieved 2006-12-19. 4. Alexander Wolfe. "Intel fixes a Pentium FPU glitch" (http://davefaq.com/Opinions/Stupid/Pentium.html#glitch). 5. "Intel adopts upon-request replacement policy on Pentium processors with floating point flaw; Will take Q4 charge against earnings" (http://findarticles.com/p/articles/mi_m0EIN/is_1994_Dec_20/ai_15939945). Business Wire. 1994-12-20. Retrieved 2006-12-24. 6. "How many engineers does it take to change a lightbulb?" (http://www.boiledbeans.net/2009/04/20/how-many-engineers-does-it-take-to- change-a-lightbulb/). Boiledbeans. 20 April 2009. Retrieved 10 November 2009. 7. Cipra, Barry (1995-01-13). "How number theory got the best of the Pentium chip". Science 267 (5195): 175. doi:10.1126/science.267.5195.175 (https://dx.doi.org/10.1126%2Fscience.267.5195.175). PMID 17791336 (https://www.ncbi.nlm.nih.gov/pubmed/17791336). 8. "FDIV Replacement Program: Frequently asked questions" (http://www.intel.com/support/processors/pentium/sb/CS-012748.htm). Intel. 2009- 03-20. Solution ID CS-012748. Retrieved 2009-11-10. 9. "Pentium FDIV bug - a Picture" (http://www.ipsr.ku.edu/stafffil/hoyle/pentium_fdiv/). Kansas University Institute for Policy and Social Research. 1994-11-30. Retrieved 2010-11-03. 10. "Pentnt" (http://technet.microsoft.com/en-us/library/bb490967.aspx). External links

Personal website of Dr. Nicely, who discovered the bug (http://www.trnicely.net/#PENT) A page with precise information, also about the cause (http://www.cs.earlham.edu/~dusko/cs63/fdiv.html) Ivars Peterson's Mathland on the bug (http://www.maa.org/mathland/mathland_5_12.html) A Tale of Two Numbers (http://www.mathworks.com/company/newsletters/news_notes/pdf/wi n95cleve.pdf), by Cleve Moler of MathWorks ZIP-file containing more details (http://www.mathworks.com/matlabcentral/fileexchange/loadFile .do?objectId=1666&objectType=file) (See ZIP file format for details on the file) Intel's official site (http://support.intel.com/support/processors/pentium/fdiv/) Unopened Intel CPU box from the FDIV replacement program (http://www.cpucollection.se/details.php?image_id=784)

Retrieved from "http://en.wikipedia.org/w/index.php? title=Pentium_FDIV_bug&oldid=659440192"

Categories: X86 architecture Hardware bugs

This page was last modified on 27 April 2015, at 08:40. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.