Boost logo

Boost :

Subject: Re: [boost] accurate sum accumulator (kahan)
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2010-07-26 12:46:48

David Abrahams wrote:
> At Mon, 26 Jul 2010 16:20:16 +0100,
> Paul A. Bristow wrote:
>>> At Mon, 26 Jul 2010 14:59:29 +0100,
>>> Paul A. Bristow wrote:
>>>> PS As for naming, I'd vote for sum and accurate_sum (to keep
>>>> backward compatibility).
>>> It's possible I'm completely off the mark here, but I think maybe we
>>> want sum and quick_sum.
>> This would be ideal - but doesn't accumulator already use 'sum' so
>> it would change behaviour of existing programs?
> Technically, of course it would, but aren't they getting the wrong
> answer currently?

In the past I've had people tell me that they couldn't accept my code that gives the right answer to replace code that gives the wrong answer because it might cause their regression tests to fail. I don't think I need to tell you my opinion on that, but if you change the sum behavior you might get people who will complain. Anyone who writes a regression test that compares equality of a floating point summation result to a reference value is pretty much asking for what they would be getting. I say we do it. My position is that people use libraries expecting superior results to what they could achieve themselves with little effort (better algorithmic complexity/accuracy of outputs) and that such behavior should be the default.


Boost list run by bdawes at, gregod at, cpdaniel at, john at