[Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.) |
From: |
"Brian Dunstan" <bdunstan149@xxxxxxxxx> |
Date: |
Tue, 19 Apr 2005 00:08:26 -0700 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12833 >
--- Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> <URL:
> http://bugs.freeciv.org/Ticket/Display.html?id=12833
> >
>
> Brian Dunstan wrote:
>
> > + /* use factor to prevent rounding errors */
> > + total_value = amortize((1024* base_value),
> delay) / 1024;
>
> The point of multiplying by 1024 is to avoid
> rounding errors. Excepting
> the bugginess of amortize, this doesn't help if you
> then divide by 1024.
> Often the delay will be reasonably large (20 turns)
> so with rounding
> the amortized value could become too small to be
> useful for comparisons
> after the divide.
>
> And yes this nastiness could be avoided by using
> doubles. I'm all in
> favor of this but amortize has to be changed first.
>
> -jason
The easy thing to do would be to drop that division.
The resulting values would be inflated but since
they're only used for comparison that would be OK.
Converting everything to doubles might be good, but
once you do it in one function you have to do it in
all the others, so it could turn into an overhaul of
half the settler code.
__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, (continued)
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, Jason Short, 2005/04/18
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Jason Short, 2005/04/18
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, Brian Dunstan, 2005/04/18
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/18
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification, Jason Short, 2005/04/18
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Jason Short, 2005/04/18
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/18
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Jason Short, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Jason Short, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.),
Brian Dunstan <=
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Jason Short, 2005/04/19
- [Freeciv-Dev] (PR#12833) consider_settler_action simplification, James Canete, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Mike Kaufman, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Brian Dunstan, 2005/04/19
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), Mike Kaufman, 2005/04/19
|
|