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

sum() should use full precision summation algorithm #4

Open
1st1 opened this issue Dec 11, 2014 · 1 comment
Open

sum() should use full precision summation algorithm #4

1st1 opened this issue Dec 11, 2014 · 1 comment
Assignees
Labels

Comments

@1st1
Copy link

1st1 commented Dec 11, 2014

 > F.sum([1, 1e100, 1, -1e100])
 0 // incorrect, should be 2.

Some information about Kahan algorithm http://en.wikipedia.org/wiki/Kahan_summation_algorithm

@1st1
Copy link
Author

1st1 commented Dec 11, 2014

Here's a gist with a proof of concept implementation: https://gist.github.com/1st1/1199936ef171a3696886

@driscollwebdev driscollwebdev self-assigned this Dec 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants