[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Swarm Futures re-cap
From: |
M Lang / S Railsback |
Subject: |
Re: Swarm Futures re-cap |
Date: |
Tue, 15 Oct 2002 10:25:37 -0600 |
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
> + 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
A learning opportunity for me: What is a Surd number?
Steve
--
address@hidden
Lang, Railsback & Assoc.
250 California Ave., Arcata CA 95521
707-822-0453; Fax 822-1868
==================================
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.
==================================