|
Boost : |
Subject: Re: [boost] accurate sum accumulator (kahan)
From: David Abrahams (dave_at_[hidden])
Date: 2010-07-27 14:29:19
At Tue, 27 Jul 2010 17:17:18 +0100,
John Maddock wrote:
>
> >>> 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?
> >
> > I tend to agree with Dave, so long as the kahan sum accumulator is a
> > drop-in replacement for what we already have. Does it Just Work for
> > integral types, too?
>
> It's not required for integral types as these don't suffer from cancelation
> errors.
And I'm loathe to disagree with John and Matthias on matters of
numerics.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk