[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Swarm Futures re-cap
From: |
Jan Burse |
Subject: |
Re: Swarm Futures re-cap |
Date: |
Wed, 16 Oct 2002 00:26:53 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 |
Gary Polhill wrote:
> Now that I've just found a bug in our model that I've traced
> back to floating point arithmetic [e.g. (9 * 0.4) - (6 * 0.6) =
> 4.44089E-16, whilst 0.4 + 0.4 +
Yes troubles, in this situation often EPS comes into play,
which can easily be computed by:
EPS=1;
while (1+EPS!=1) {
EPS=EPS/2;
}
Its the greatest number X such that 1+X=1. Confusing, isn't
it! Too much wholes in the machine continuum!
So in the worst case your result is roughly 7.2*EPS, if 0.4
is represented to high and 0.6 is represented to low:
9*0.4*(1+EPS)-6*0.6*(1-EPS)=7.2*EPS.
Best Regards
--
Jan Burse
Milchbuckstr. 1
8057 Zürich
fixnet: +41-43-268 04 03
natel: +41-76-316 46 39
==================================
Swarm-Modelling is for discussion of Simulation and Modelling techniques
esp. using Swarm. For list administration needs (esp. [un]subscribing),
please send a message to <address@hidden> with "help" in the
body of the message.
==================================