Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [patch] amortize
Home

[Freeciv-Dev] Re: [patch] amortize

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Chris Guest <chris.guest@xxxxxxxxxxxx>, "freeciv-dev@xxxxxxxxxxx" <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [patch] amortize
From: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Date: Thu, 25 Oct 2001 10:07:33 -0500

On Thu, Oct 25, 2001 at 10:40:39AM +0200, Raimar Falke wrote:
> On Thu, Oct 25, 2001 at 02:27:36PM +1000, Chris Guest wrote:
> 
> (23/24)^12 = 0.600066154091
> 3/5        = 0.6
> 
> 0.6/0.600066154091 = 0.0001102
> 

I would agree. In fact, if you're worried, do
/* comment: this is (23/24)^12 it's important because... */
#define BLAH_NUMBER 0.600066154091

why bother generating oft used numbers on the fly?
if you want to use pi, you don't calculate terms in the power series to
get it, you just #define PI 3.1415...

-mike

> This is a difference of 0.01%. This is a very small difference. So
> IMHO the original kludge is quite accurate. The big question is now:
> do you have noticed any difference in the AI runs which are caused by
> this more accurate method?
> 
>       Raimar
> 
> -- 
>  email: rf13@xxxxxxxxxxxxxxxxx
>  "Understanding is a three-edged sword; 
>   your side, their side, and the truth."
>     -- a well-known Vorlon
> 


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