Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pentium FDIV bug
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Description== In order to improve the speed of floating-point division calculations on the Pentium chip over the [[Intel 80486|486DX]], Intel opted to replace the shift-and-subtract division algorithm with the [[Division_algorithm#SRT_division|Sweeney, Robertson, and Tocher]] (SRT) algorithm. The SRT algorithm can generate two bits of the division result per [[clock cycle]], whereas the 486's algorithm could only generate one. It is implemented using a [[programmable logic array]] with 2,048 cells{{Citation needed|reason=That's not how programmable logic arrays work.|date=November 2024}}, of which 1,066 cells should have been populated with one of five values: {{nowrap|β2, β1, 0, +1, +2}}. When the original array for the Pentium was compiled, five values were not correctly sent to the equipment that etches the arrays into the chips{{Citation needed|reason=This is not how chips are created. There are many design steps in between.|date=November 2024}} β thus five of the array cells contained zero when they should have contained +2.<ref name="intelreport">{{Cite report |url=https://users.fmi.uni-jena.de/~nez/rechnerarithmetik_5/fdiv_bug/intel_white11.pdf |title=Statistical Analysis of Floating Point Flaw in the Pentium Processor (1994) |last1=Sharangpani |first1=H. P. |last2=Barton |first2=M. L. |date=November 30, 1994 |publisher=Intel Corporation |publication-date=November 30, 1994 |access-date=April 11, 2021 |archive-date=March 19, 2022 |archive-url=https://web.archive.org/web/20220319184123/https://users.fmi.uni-jena.de/~nez/rechnerarithmetik_5/fdiv_bug/intel_white11.pdf |url-status=dead }}</ref> As a result, calculations that rely on these five cells acquire errors; these errors can accumulate repeatedly owing to the [[Recursion_(computer_science)|recursive]] nature of the SRT algorithm. In pathological cases the error can reach the fourth significant digit of the result, although this is rare. The error is usually confined to the ninth or tenth significant digit.<ref name="halfhill-199503" /> Only certain combinations of numerator and denominator trigger the bug. One commonly-reported example is dividing 4,195,835 by 3,145,727. Performing this calculation in any software that used the floating-point coprocessor, such as [[Windows Calculator]], would allow users to discover whether their Pentium chip was affected.<ref name="kansas">{{cite web|publisher=Kansas University Institute for Policy and Social Research|title=Pentium FDIV bug β a Picture|date=November 30, 1994|url=http://www.ipsr.ku.edu/stafffil/hoyle/pentium_fdiv/|access-date=November 3, 2010|archive-date=November 3, 2021|archive-url=https://web.archive.org/web/20211103175303/http://www.ipsr.ku.edu/stafffil/hoyle/pentium_fdiv/|url-status=dead}}</ref> The correct value of the calculation is: {{block indent|<math>\textstyle \dfrac{4{,}195{,}835}{3{,}145{,}727} = 1.333820449136241002</math>}} 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 access to the "empty" array cells. As a result, the value returned by a flawed Pentium processor is incorrect at or beyond four digits:<ref name="compaspects">{{cite journal |last1=Coe |first1=T. |last2=Mathisen |first2=T. |last3=Moler |first3=C. |last4=Pratt |first4=V. |title=Computational aspects of the Pentium affair |journal=IEEE Computational Science and Engineering |date=1995 |volume=2 |issue=1 |pages=18β30 |doi=10.1109/99.372929 |url=https://people.cs.vt.edu/~naren/Courses/CS3414/assignments/pentium.pdf |access-date=April 13, 2021 |archive-date=June 23, 2021 |archive-url=https://web.archive.org/web/20210623203121/https://people.cs.vt.edu/~naren/Courses/CS3414/assignments/pentium.pdf |url-status=live }}</ref> {{block indent|<math>\textstyle \dfrac{4{,}195{,}835}{3{,}145{,}727} = 1.333{\color{red}{739068902037589}}</math>}} which is actually the value of <math>\textstyle \dfrac{4{,}195{,}579}{3{,}145{,}727} = \dfrac{4{,}195{,}835 - 256}{3{,}145{,}727}</math>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)