3 ms·
This kind of thing comes up in deciding how to round floats as well. If you always round up or round down, the errors accumulate linearly. Floats use round-to-
by zaptheimpaler 5y ago
This kind of thing comes up in deciding how to round floats as well. If you always round up or round down, the errors accumulate linearly.
Floats use round-to-even [1] to prevent this, although even that method accumulates error proportional to sqrt(number of ops).
[1] https://en.wikipedia.org/wiki/Rounding#Round_half_to_even https://en.wikipedia.org/wiki/Rounding#Round_half_to_even