Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
* Intel Pentium FDIV bug
       [not found] <3a58g0$75m@vkhdsu01.hda.hydro.com>
@ 1994-11-21  7:41 ` Thomas Koenig
  0 siblings, 0 replies; only message in thread
From: Thomas Koenig @ 1994-11-21  7:41 UTC (permalink / raw)


[ 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-11-21  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3a58g0$75m@vkhdsu01.hda.hydro.com>
1994-11-21  7:41 ` Intel Pentium FDIV bug Thomas Koenig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox