>>>>> Bernard Murray writes:
BM> In article <3beqpr$1h9 at lyra.csx.cam.ac.uk>,
BM> tjrc1 at mole.bio.cam.ac.uk (Tim Cutts) writes:
>> prm at aber.ac.uk (Pedro Mendes) writes:
>> >4195835.0 - (4195835.0 / 3145727.0 ) * 3145727.0
>> >The result should be 0, but the pentiums seem to think it is
>> Bear in mind you should make sure that the program doing the
>> calculation is using double precision. It is apparently only
>> double precision that is affected.
Not completely true, some very small changes in single precision results
are also possible.
BM> I hope that no one is using a Pentium machine for control of
BM> life-dependent machinery.
Looking at the results "256" and "0" it may seem that the results are
"extremely" different. Bear in mind, however that the calculation
above is "extremely" badly behaved! Likewise, if one needs to perform
a large matrix inversion, a standard algorithm can be extremely
bad. This then leads to bad results, even when all divisions are
performed in double precision correctly. If a better behaved algorithm
is used, there is no longer a problem (another example: type the
number 1.0000001 in a pocket calculator, and then press "x^2" 27
times. Write down the result, and then calculate 1.0000001^(2^27),
which is the same, but calculated differently. Compare the results).
I am led to believe that (almost?) no calculation that is well
performed can be so bad that it breaks completely when one in 10^9
divisions (a relatively rare operation anyway) is off by 10^-7. And:
life-saving equipment shouldn't depend on double precision anyway. I
hope there is more than 10^-7 margin when "they" will be trying to
keep me alive.
BM> I think Intel are being rather shoddy in their treatment of the
I have no connection to Intel, but I can see that although all their new
processors now have FP capability built in, not more people have started
using it. You might not be a typical user. Think about that.
Rob W. W. Hooft, hooft at EMBL-Heidelberg.DE, Meyerhofstr. 1, 69117 Heidelberg
Germany. === you should try WHAT IF! === Linux: Free i386 operating system!
2.1 GS d? H- s/ !g p0 !au a- w+ v C++ UL++++ UIOS++ UA+ P++ L+(++) 3 E+(++)
N++(+++) K- W-- M- V -po+ Y !j R G? tv+ b+ D+ B- e++++(*) u+ h+ f !r !n !y