swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swarm Futures re-cap


From: Gary Polhill
Subject: Re: Swarm Futures re-cap
Date: Tue, 15 Oct 2002 17:32:15 +0100

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 + 
0.4 + 0.4 + 0.4 + 0.4 + 0.4 + 0.4 + 0.4 - 0.6 - 0.6 - 0.6 - 0.6 - 0.6 - 0.6 = 
-6.66134E-16 -- not even consistent in which side of 0 it is... plus, 0.4 + 0.4 
+ 0.4 - 0.6 + 0.4 - 0.6 + 0.4 + 0.4 + 0.4 + 0.4 + 0.4 - 0.6 - 0.6 - 0.6 - 0.6 = 
-2.22045E-16, so even the order matters!], I wonder if one of the standard 
libraries Swarm should provide is some kind of proper treatment of floating 
point arithmetic, or perhaps even representing numbers as Integer, Rational, 
Surd and Real classes somehow. All I know is I'm never trusting floating points 
again (these were double "precision", too!).

I'd be interested to hear how other people deal with floating points. Some kind 
of tolerance windows could be used, but, for example (0.4 * 50331648.0) - (0.6 
* 33554432.0) = 3.72529E-9, so it's not even immediately obvious what order of 
magnitude such tolerances should have! You would also then need to somehow be 
sure that the smallest number you could generate given your parameters was 
always greater than this tolerance. I am not at all convinced that such 
certainty can be obtained, but I do feel sure that others have come across and 
dealt with this issue before.

Gary 

>>> <address@hidden> 10/10/02 19:23:37 >>>

OK.  This is going *very* well.  Our reports from Roger and Gulya
will help, too.  Right now, I'm just collecting this stuff.  I'd
like to have enough fodder for some solid discussion by the time
SwarmFest comes around.

Also, we should have more discussion of the other implementations like
AScape, RePast, MAS, Ecolab, StarLogo and any other tool that falls
under "Swarm-like" modeling.  And I, personally, welcome discussion
of things like Mathematica, Matlab, XMath, R, HDF, VenSim, ProModel,
DADiSP, etcetcetc, as well as Linux (as a preferred platform), 
Windows, Mac OSX, etc.  Heck, I'd even like to see some discussion of
real-time systems.  Swarm has never even approached things like 
real-time scheduling or embedded systems or mobile agents, etc.




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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]