
26 Jul
2010
26 Jul
'10
7:09 p.m.
PS As for naming, I'd vote for sum and accurate_sum (to keep backward compatibility).
Please don't call them "accurate_sum" and "quick_sum" (as proposed by someone else). There are several different types of "accurate sum" algorithms with different runtime trade-offs. 'sum' in itself is as accurate as it gets if all the numbers are normalized in some way. As this is frequently required for the overall computation, it would be wasteful to compute the secondary accumulator. There are other scenarios where a plain 'sum' is good enough. Thanks, Tom