[Freeciv-Dev] Re: (PR#12946) FACTOR in consider_settler_action
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12946 >
Brian Dunstan wrote:
...
> It seems that the multiplier used to prevent rounding
> errors in consider_settler_action needs to be reversed
> before best_newv is returned from
> evaluate_improvements.
...
Those multipliers are used so we can use integer arithmetic, which in
turn is done because integer arithmetic is faster than floating-point
arithmetic (right?). But it introduces bugs like this (I have a vague
recollection of similar bugs previously). But is this 'optimisation'
really worthwhile? Is the performance gain large enough to justify the
decreased reliability? I would not be surprised if the gain were small.
- [Freeciv-Dev] Re: (PR#12946) FACTOR in consider_settler_action,
Benedict Adamson <=
|
|