Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!werple.apana.org.au!otis.apana.org.au!serval.net.wsu.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!lll-winken.llnl.gov!uwm.edu!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!ensta!bsdtest.ensta.fr!bouyer From: bouyer@bsdtest.ensta.fr (Manuel Bouyer) Newsgroups: comp.os.386bsd.misc Subject: Intel Pentium FDIV bug (fwd) Date: 22 Nov 1994 17:02:58 GMT Organization: Ecole Nationale Superieure de Techniques Avancees, Paris Lines: 74 Distribution: world Message-ID: <3at882$74r@ici-paris.ensta.fr> NNTP-Posting-Host: bsdtest.ensta.fr This article comes from to comp.os.linux.announce, but i think this may interrest Net/FreeBSD users too. >Path: ensta!jussieu.fr!math.ohio-state.edu!usc!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 >Lines: 46 >Sender: wirzeniu@cc.Helsinki.FI >Approved: linux-announce@tc.cornell.edu (Lars Wirzenius) >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 <stdio.h> > >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. -- Manuel Bouyer, Ecole Nationale Superieure de Techniques Avancees, Paris email: bouyer@ensta.fr --