4 ms·
Even when summing using doubles, you can lose precision. In general, Kahan summation allows you to double the intermediary precision of your sums, so if you're
by alexSanchStern 11y ago
Even when summing using doubles, you can lose precision. In general, Kahan summation allows you to double the intermediary precision of your sums, so if you're losing precision even with 64-bit doubles, Kahan summation can give you 128-bits of intermediary precision, without going to software floating point solutions.
- acqq 11y agoThat's true, however it's saner, safer and faster to simply use doubles to sum floats than just use floats and Kahan's summation, and surprisingly some people don't get that.