News for hackers. Stuff that matters.
Re:Improving Floating Point Accuracy: A Look at Sums by acqq on Monday October 19, 2015 @09:15AM (#10412658)
Absolutely, even if you sum floats, if you care about accuracy you should sum them using double. I've read the discussion of Julia implementers that have discussed Kahan summation but strangely didn't pick the simpler approach of not using floats for partial sums of floats. Albeit it was an old discussion and I don't know what's the present state.
Re:Improving Floating Point Accuracy: A Look at Sums by alexSanchStern on Monday October 19, 2015 @02:39PM (#10414704)
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.
Re:Improving Floating Point Accuracy: A Look at Sums by acqq on Monday October 19, 2015 @03:09PM (#10414923)
That'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.