From 6049236401017668524
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f5bc,6f6e97a6fdbbf44c
X-Google-Attributes: gid10f5bc,public
X-Google-Thread: 109fba,6f6e97a6fdbbf44c
X-Google-Attributes: gid109fba,public
X-Google-Thread: 110292,6f6e97a6fdbbf44c
X-Google-Attributes: gid110292,public
X-Google-Thread: 1014db,6f6e97a6fdbbf44c
X-Google-Attributes: gid1014db,public
X-Google-Thread: 1149ec,6f6e97a6fdbbf44c
X-Google-Attributes: gid1149ec,public
X-Google-Thread: 102b75,6f6e97a6fdbbf44c
X-Google-Attributes: gid102b75,public
X-Google-Thread: f78e5,6f6e97a6fdbbf44c
X-Google-Attributes: gidf78e5,public
From: nick@dvstsol.demon.co.uk (Nick Gorham)
Subject: Re: And you thought that the Pentium bug was bad!  (Get a load of this!)
Date: 1995/06/19
Message-ID: <3s46bi$3qe@devel.dvstsol.demon.co.uk>#1/1
X-Deja-AN: 104726293
distribution: world
references: <3s2las$1br@hustle.rahul.net>
followup-to: comp.std.c,comp.std.c++,comp.lang.c,comp.lang.c++,comp.sys.intel,comp.arch,comp.software.testing
organization: Applied Visual Systems
newsgroups: comp.std.c,comp.std.c++,comp.lang.c,comp.lang.c++,comp.sys.intel,comp.arch,comp.software.testing

Ronald F. Guilmette (rfg@rahul.net) wrote:
: As we all now know, early versions of the Pentium chip could, in rare cases,
: produce floating point errors way down in the seventh or eighth digit after
: some particular floating-point calculations.

[ stuff removed ]

: Rightly or wrongly, people engaged in performing intensely numerical compu-
: tations were horrified by this news, and promptly demanded refunds, which
: led in turn to large numbers of people who were engaged in intensely
: amusement-oriented computations to promptly demand refunds also.

: Anyway, I'm looking forward to the reaction of the numerical computing
: community to the following short C program, and to the divergent results
: obtained when compiling this program with different _compilers_.

: -------------------------------------------------------------------------
: double d = 0.9;
:  
: int
: main ()
: {
:     double d = 0.8;
:     {
:         extern double d;
:  
:         printf ("%f\n", d);
:         return 0;
:     }
: }
: -------------------------------------------------------------------------

Perhaps I am missing the point, but whats the above bit of silly code
to do with floating point errors. The simple way to fix this "compilor bug"
is not to write code like this ;-). Perhaps someone will tell otherwise.

Nick Gorham - nick@dvstsol.demon.co.uk



