[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]
<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
- [Freeciv-Dev] Re: (PR#12833) consider_settler_action simplification (rev.), (continued)
- [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, 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 <=
- [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] (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
|
|