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!
== Software patches == Various [[software patch]]es were produced by manufacturers to work around the bug. One specific algorithm, outlined in a paper in ''IEEE Computational Science & Engineering'', is to check for divisors that can trigger the access to the programmable logic array cells that erroneously contain zero, and if found, multiply both numerator and denominator by 15/16. This takes them out of the 'buggy' range. This fix does carry a measurable speed penalty - worst case for a program doing nothing but FDIV operations with bad divisors the running time would double since each FDIV would take about 80 instead of 40 clock cycles. With more random divisors the average time per FDIV was approximately 50 clock cycles, i.e. 10 cycles added to check the divisor: Only 5 out of 1024 random divisors would trigger the scaling fixup. Since FDIV is a rare operation in most programs, the normal slowdown with the fix installed was typically a percent or less.<ref name="compaspects" /> The main challenge faced by software companies was implementing the fix in pre-existing software, much of which relied on [[library (computing)|libraries]] outside their control. Some companies, such as [[Wolfram Research]], opted to directly patch the [[machine code]] of existing executables to replace the FDIV opcode with an illegal instruction. This would then trigger an exception that an exception handler (also patched in) would catch. From here, arbitrary code could be executed to work around the bug.<ref name="wolfram" /> Microsoft offered operating system level workarounds in versions of [[Microsoft Windows|Windows]] up to Windows XP. Utilities were included with the operating system to check for the presence of the bug and disable the FPU if found.<ref>{{Cite web|url=http://www.helpwithwindows.com/windows95/troub-58.html|title=Windows 95 Troubleshooting: How to Check for a Faulty Math Coprocessor|last=Slob|first=Arie|website=www.helpwithwindows.com|access-date=April 23, 2019|archive-date=August 14, 2024|archive-url=https://web.archive.org/web/20240814063044/https://www.helpwithwindows.com/windows95/troub-58.html|url-status=live}}</ref><ref>{{cite web|url=https://technet.microsoft.com/en-us/library/bb490967.aspx|title=Pentnt|date=September 11, 2009|website=[[Microsoft TechNet]]|publisher=[[Microsoft]]|access-date=April 23, 2019|archive-date=February 3, 2018|archive-url=https://web.archive.org/web/20180203082401/https://technet.microsoft.com/en-us/library/bb490967.aspx|url-status=live}}</ref>
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)