3 ms·
There's an algorithm to deal with this kind of additive small error, the Kahan Summation algorithm. It keeps a second number to record the residual of an additi
by adolgert 13y ago
There's an algorithm to deal with this kind of additive small error, the Kahan Summation algorithm. It keeps a second number to record the residual of an addition so that adding something small to something large doesn't go awry. With modern floating point, it's rarely an issue, but with a mere 24 bits, I guess it was a terrible problem.
- pedroo 13y agoThis sounds similar to the technique used in the integer-only version of bresenham's line drawing algorithm.