[Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Dear diary, on Sun, Dec 23, 2001 at 06:22:18PM CET, I got a letter, where Chris
Richards <chrisr@xxxxxxxxxxxxxxxx> told me, that...
> It can be further reduced to:
>
> cost = (amortized * weight) / (MAX(0, weight - amortized));
>
> except that you are incurring round-off error from amortized results in cost
> being 1 less (integer-wise) than with the old formula.
>
> Not knowing how round-off was playing a part in the previous heuristic, I
> can't common on which cost is better.
I disagree here. First, division-by-zero smiles to you from that expression,
and second, (amortized * weight) / (1/64) is same like (amortized * weight) *
64. I wouldn't reduce that to zero then.
--
Petr "Pasky" Baudis
UN*X programmer, UN*X administrator, hobbies = IPv6, IRC, FreeCiv hacking
.
"A common mistake that people make, when trying to design
something completely foolproof is to underestimate the
ingenuity of complete fools."
-- Douglas Adams in Mostly Harmless
.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), (continued)
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/22
- [Freeciv-Dev] Another Maintainer, Raahul Kumar, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Ross W. Wetmore, 2001/12/21
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Raimar Falke, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Ross W. Wetmore, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Gregory Berkolaiko, 2001/12/22
- Message not available
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/23
- Message not available
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/23
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Chris Richards, 2001/12/23
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149),
Petr Baudis <=
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Chris Richards, 2001/12/23
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/23
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Raahul Kumar, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Ross W. Wetmore, 2001/12/21
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Raahul Kumar, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Raahul Kumar, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Ross W. Wetmore, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Raahul Kumar, 2001/12/22
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Daniel L Speyer, 2001/12/22
|
|