Proposal: Rounding errors
Timed out and passed, 10-0. Josh
Adminned at 11 Mar 2010 20:39:25 UTC
To the end of subrule 3.2.1 “Numbers and Variables”, append the following bullet point:
- If a rule implies that the result of a division should be an integer (for instance, by attempting to store that result in, or add it to, a gamestate variable that can only hold integers), the result of the division is instead the result rounded towards 0.
Because, otherwise I can’t resolve Raiding if the resources don’t divide evenly. This problem has probably come up before, and is likely to come up again, so fixing with a Glossary fix.

Comments
Kevan:
Josh:
Klisz:
Keba:
Roujo:
Purplebeard:
ais523:
@Roujo: I don’t, it might lead to rounding error loops in a future dynasty.
Darknight:
dbdougla:
dbdougla:
I think Roujo is referring to the method of rounding listed at http://en.wikipedia.org/wiki/Rounding#Round_half_to_even which leads to more accurate average results. This only makes sense, though, when dividing the integers yields exactly X.5
There’s no way that would lead to a loop or problem that I can see.
ais523:
@dbdougla: It produces more accurate results on average, but can be manipulated to drive results upwards or downwards if you aren’t trying random inputs, but instead contriving them. For instance, imagine four people have 1 Coal each. Two of them pool their Coal and distribute it evenly among those 4 people. Now, the other 2 people have 1 more Coal than when they started, and there’s 6 Coal in total. Repeat to gain infinite Coal. There isn’t a rule that lets you do that in this dynasty, but it’s easy to imagine it being possible in another dynasty.
Qwazukee:
Klisz:
@ais523,dbdougla: I think by “even number” he means “integer”, not actually even numbers.
ais523:
@Darth: I don’t; round-to-even is often used in the financial industries, and does indeed mean rounding to even numbers.