Pentium FDIV bug

The Pentium FDIV bug is a hardware bug affecting the floating point unit (FPU) of the early Intel Pentium processors. Because of the bug, the processor might return incorrect binary floating point results when dividing a number. The bug was discovered in 1994 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]

66 MHz Intel Pentium (sSpec=SX837) with the FDIV bug

The severity of the FDIV bug is debated. Though rarely encountered by most users (Byte magazine estimated that 1 in 9 billion floating point divides with random parameters would produce inaccurate results),[3] both the flaw and Intel's initial handling of the matter were heavily criticized by the tech community.

In December 1994, Intel recalled the defective processors. In January 1995, Intel announced "a pre-tax charge of $475 million against earnings, ostensibly the total cost associated with replacement of the flawed processors."[1][4] This is equivalent to $730 million in 2018.[5]

Description

The Sweeney, Robertson, and Tocher (SRT) division algorithm is used on the affected Pentium chips. It is implemented as a programmable logic array with 2,048 cells, of which 1,066 cells should have been populated with one of five values: –2, –1, 0, +1, +2. On the buggy chips, five cells that should have contained the value +2 were missing, instead returning 0.[3]

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 computers, 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 University co-op student working for Intel in Hillsboro, Oregon, 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, Pentiums and Pentium clones.[1]

This flaw in the Pentium FPU was quickly verified by other people around the Internet, and became known as the Pentium FDIV bug (FDIV is the x86 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.[6]

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.[7] 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] This is equivalent to $730 million in 2018.[5] Some of the defective chips were later turned into key rings by Intel.[8]

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

Affected models

This problem occurs only on some models of the original Pentium processor.[10] The bug only existed in some Pentium family processors with a clock speed of less than 120 MHz.[10] 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-specs of those processors are not listed in the Intel processor specification finder web page.

Pentium P5 800 nm 5V
FamilyModelSteppingCore steppingClock rateFSB speedS-spec
513B160 MHz60 MHzQ0352, Q0412, SX753
513B166 MHz66 MHzQ0353, Q0413, SX754
515C160 MHz60 MHzQ0466, SX835, SZ949
515C166 MHz66 MHzQ0467, SX837, SZ950
Pentium P54C 600 nm 3.3V
FamilyModelSteppingCore steppingClock rateFSB speedS-spec
521B175 MHz50 MHzQ0601
521B190 MHz60 MHzQ0542, Q0613, Q0543, SX879, SX885, SX909, SX874
521B1100 MHz66 MHzQ0563, Q0587, Q0614, SX886, SX910
522B375 MHz50 MHzQ0606, SX951
522B390 MHz60 MHzQ0628, Q0611, Q0612, SX923, SX922, SX921, SX942, SX943, SX944, SZ951
522B3100 MHz66 MHzQ0677, SX960

Some Intel 80486 OverDrive and Pentium Overdrive models have also been known to exhibit the FDIV bug, as well as the F00F bug.

Detection methods

Generic

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 0x4005FB triggers the fault in the FPU control logic. As a result, the value returned by a flawed Pentium processor in certain situations is incorrect at or beyond four digits:[11][12]

Windows 95 or 98

Users can check if their processor has the issue using Device Manager. Once in Device Manager, users should expand "System devices", locate then click on "Numeric data processor", then click the Properties button. Once the new Properties window appears, click the Settings tab.
If the processor does not have the FDIV issue, the following message will be seen: "Your computer's numeric data processor has passed all diagnostic tests and appears to be working properly.", Otherwise the following message shall appear: "The numeric processor in this computer can sometimes compute inaccurate results when dividing large numbers"

Options are then provided at the bottom of the Settings tab to "Always use", "Use only if [it] passes all diagnostics" or "Never use".[13]

Windows NT, 2000, XP, Server 2003

pentnt
Developer(s)Microsoft
Initial releaseMay 30, 1995 (1995-05-30)
Operating systemMicrosoft Windows
TypeCommand
LicenseProprietary commercial software
Websitepentnt

Users can run the pentnt command included with Windows NT 3.51, NT 4.0, 2000, XP, and Server 2003. The computer needs to be restarted for changes to take effect.[14] The pentnt utility is deprecated and not included in current versions of Windows.[15]

The command-syntax is:

pentnt [-c] [-f] [-o]

  • -c – Enable conditional emulation
  • -f – Enable forced emulation
  • -o – Disable forced emulation and reenable floating-point hardware if it is present
  • /? – Display help
gollark: Why would you use the *router* for this?
gollark: It has much better compression ratios *and* speed than gzip. Shame it's not adopted for HTTP.
gollark: Zstandard is a highly cool compression algorithm, too.
gollark: Also, I extended the DNS→comment bridge to also have a function to post in an IRC channel on APIONET. It turns out that when you post a link in Discord a bunch of different nameservers try and resolve it, presumably for embed purposes.
gollark: Cloudflare can *also* give data to the government and probably would if legally forced to.

See also

References

  1. Nicely, Thomas (August 19, 2011). "Pentium FDIV flaw FAQ". trnicely.net. Archived from the original on June 18, 2019. Retrieved June 18, 2019.
  2. "Statistical Analysis of Floating Point Flaw: Intel White Paper" (PDF). Intel. 9 July 2004. p. 9. Solution ID CS-013007. Archived from the original (PDF) on 2016-04-06. Retrieved 5 April 2016.
  3. Tom R. Halfhill (March 1995). "An error in a lookup table created the infamous bug in Intel's latest processor". BYTE (March 1995). Archived from the original (– Scholar search) on February 9, 2006. Retrieved 2006-12-19.
  4. "1994 - Annual Report". Intel. 20 June 2020. Archived from the original on 26 February 2017. Retrieved 20 June 2020.
  5. Thomas, Ryland; Williamson, Samuel H. (2019). "What Was the U.S. GDP Then?". MeasuringWorth. Retrieved April 6, 2019. United States Gross Domestic Product deflator figures follow the Measuring Worth series.
  6. Alexander Wolfe. "Intel fixes a Pentium FPU glitch".
  7. "Intel adopts upon-request replacement policy on Pentium processors with floating point flaw; Will take Q4 charge against earnings". Business Wire. 1994-12-20. Archived from the original on 2012-07-10. Retrieved 2006-12-24.
  8. "How many engineers does it take to change a lightbulb?". Boiledbeans. 20 April 2009. Archived from the original on 2010-02-03. Retrieved 10 November 2009.
  9. Cipra, Barry Arthur (1995-01-13). "How number theory got the best of the Pentium chip". Science. 267 (5195): 175. doi:10.1126/science.267.5195.175. PMID 17791336.
  10. "FDIV Replacement Program: Frequently asked questions". Intel. 2009-03-20. Solution ID CS-012748. Archived from the original on 2009-05-11. Retrieved 2009-11-10.
  11. "Pentium FDIV bug - a Picture". Kansas University Institute for Policy and Social Research. 1994-11-30. Retrieved 2010-11-03.
  12. "Ivars Peterson's MathTrek: Pentium Bug Revisited". Mathematical Association of America. Archived from the original on 10 December 2008.
  13. Slob, Arie. "Windows 95 Troubleshooting: How to Check for a Faulty Math Coprocessor". www.helpwithwindows.com. Retrieved April 23, 2019.
  14. "Pentnt". Microsoft TechNet. Microsoft. September 11, 2009. Retrieved April 23, 2019.
  15. https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/pentnt
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.