From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,19d185d282d9f461,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1994-11-21 03:13:47 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!news.sprintlink.net!hookup!swrinde!pipex!sunic!news.funet.fi!news.csc.fi!news.helsinki.fi!not-for-mail From: ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig) Newsgroups: comp.os.linux.announce Subject: Intel Pentium FDIV bug Followup-To: comp.os.linux.misc Date: 21 Nov 1994 09:41:19 +0200 Organization: University of Karlsruhe, Germany Sender: wirzeniu@cc.Helsinki.FI Message-ID: <3apiuv$3is@plootu.Helsinki.FI> References: <3a58g0$75m@vkhdsu01.hda.hydro.com> Reply-To: Thomas.Koenig@ciw.uni-karlsruhe.de NNTP-Posting-Host: plootu.helsinki.fi Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Keywords: Pentium, floating point bug, FDIV, division [ Moderator's note (gosh, it's been a while since I did one of these, hasn't it :-): While this is not strictly Linux-related, I think it's interesting enough for Linuxers. Besides, Linus has a Pentium on his desk at work. :-) --liw ] Recently, a bug has been discovered in the floating point arithmetic of Intel's Pentium processors. This bug affects the FDIV instruction in double precision. According to information on comp.sys.intel, the bug will manifest itself for ceratin bit patterns; the odds of hitting it are about 1/2^18, or 1/6E7. The bug reduces the precision of the result to about 8 significant digits (from 16). Apparently, Intel has fixed the problem with its newest chips; it is still undecided wether to offer people an upgrade, however. For more information, see comp.sys.intel, the "FDIV bug" thread. If you have used a Pentium system for numerical work which depends heavily on double precision floating point arithmetic, you are advised to check your results against those on a 486 system. Here is a simple test program that will reproduce the bug, if present; if this prints "256.000000" as result, your system is affected; on a 486, this prints "0.000000". #include int main() { double x,y,z; x = 4195835.0; y = 3145727.0; z = x - (x / y) * y; printf("%f\n",z); return 0; } -- Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet. The joy of engineering is to find a straight line on a double logarithmic diagram. -- Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu PLEASE remember Keywords: and a short description of the software.