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

Test effect of Kahan accumulators #84

Open
kostrzewa opened this issue Dec 13, 2018 · 2 comments
Open

Test effect of Kahan accumulators #84

kostrzewa opened this issue Dec 13, 2018 · 2 comments

Comments

@kostrzewa
Copy link
Member

Our correlators at a given source-sink separation are a sum of some

(n_r!/ (n_v! (n_r-n_v)!) ) x L_t x D_ev x 4

terms, where n_r is the number of random vectors and n_v is the number of vertices in the diagram. L_t is the time extent, D_ev is the number of dilution indices in eigenvector space and 4 comes from the spin trace. Some more factors due to complex multiplications are sure to be missing here, correct?

Are we certain that we don't have any roundoff issues here? It would be interesting, now that the code has been cleaned up significantly, to add an optional Kahan accumulator to see how the correlators behave in the "intermediate signal to noise" region, where we seem to be having some fitting issues.

There is a further (much larger) sum in the momentum projection of course, where it might also be prudent to try to minimize accumulation roundoff, although this will be much harder to implement efficiently.

@martin-ueding
Copy link
Contributor

See Pull Request #87.

@martin-ueding
Copy link
Contributor

See the comments on this question. It sounds like quad precision has better accuracy than Kahan summation with two double precision variables used internally.

Somewhere else I read that Kahan summation was invented before even single precision floating point numbers were standardized. So it seems that if we have quad precision on the target platform, it would be the natural thing to do.

Shall we then drop the Kahan summation pull request and instead use a simple using Real = double and using Real = long double and replace double with Real except in IO?

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

2 participants