Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Kahan variant adding final error to sum #13

Closed
RhysU opened this issue Dec 23, 2012 · 1 comment
Closed

Use Kahan variant adding final error to sum #13

RhysU opened this issue Dec 23, 2012 · 1 comment

Comments

@RhysU
Copy link
Owner

RhysU commented Dec 23, 2012

On page 791 of http://dx.doi.org/10.1137/0914050 Higham mentions a Kahan variant with slightly nicer behavior which can be had by simply using

s = s + e

at the end of the compensated loop. This merges the final accumulated loss into the total sum. Higham cites two works by Kaham (refs 17 and 18) but those refs look time consuming to dig up.

Try this out as the additional cost and coding is minimal.

@RhysU
Copy link
Owner Author

RhysU commented Jan 1, 2013

Done in 1e8e6cd on develop branch.

@RhysU RhysU closed this as completed Jan 1, 2013
RhysU added a commit that referenced this issue Jan 10, 2014
Closes #13.  Turns out to make no difference on some test cases
but seems like a not-bad-thing-to-do-anyhow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant