{"action":"created","issue":{"url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions/issues/87","repository_url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions","labels_url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions/issues/87/comments","events_url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions/issues/87/events","html_url":"https://github.com/HISKP-LQCD/sLapH-contractions/pull/87","id":395082333,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNjMzMzg0","number":87,"title":"Kahan accumulator","user":{"login":"martin-ueding","id":976924,"node_id":"MDQ6VXNlcjk3NjkyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/976924?v=4","gravatar_id":"","url":"https://api.github.com/users/martin-ueding","html_url":"https://github.com/martin-ueding","followers_url":"https://api.github.com/users/martin-ueding/followers","following_url":"https://api.github.com/users/martin-ueding/following{/other_user}","gists_url":"https://api.github.com/users/martin-ueding/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-ueding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-ueding/subscriptions","organizations_url":"https://api.github.com/users/martin-ueding/orgs","repos_url":"https://api.github.com/users/martin-ueding/repos","events_url":"https://api.github.com/users/martin-ueding/events{/privacy}","received_events_url":"https://api.github.com/users/martin-ueding/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2019-01-01T13:19:21Z","updated_at":"2019-01-03T17:04:49Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions/pulls/87","html_url":"https://github.com/HISKP-LQCD/sLapH-contractions/pull/87","diff_url":"https://github.com/HISKP-LQCD/sLapH-contractions/pull/87.diff","patch_url":"https://github.com/HISKP-LQCD/sLapH-contractions/pull/87.patch"},"body":"I have added a `KahanAccumulator` and a `NativeAccumulator` which is just a fancy wrapper for plain accumulation. Using a CMake option one can switch between the two.\r\n\r\nThere is one issue that I am unsure about: What happens if I add two Kahan accumulators? Is that the right thing to do?\r\n\r\n```cpp\r\n  KahanAccumulator operator+=(KahanAccumulator const right) {\r\n    sum_ += right.sum_;\r\n    c_ += right.c_;\r\n    return *this;\r\n  }\r\n```\r\n\r\nNot all intermediate results are accumulators. This means that we are sometimes discarding this correction term `c`. Shall we use the accumulators all the way or is it sufficient to have it on the same level only?\r\n\r\nCouln't we also just use `long double` and have quad precision much easier?"},"comment":{"url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions/issues/comments/451208798","html_url":"https://github.com/HISKP-LQCD/sLapH-contractions/pull/87#issuecomment-451208798","issue_url":"https://api.github.com/repos/HISKP-LQCD/sLapH-contractions/issues/87","id":451208798,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTIwODc5OA==","user":{"login":"martin-ueding","id":976924,"node_id":"MDQ6VXNlcjk3NjkyNA==","avatar_url":"https://avatars3.githubusercontent.com/u/976924?v=4","gravatar_id":"","url":"https://api.github.com/users/martin-ueding","html_url":"https://github.com/martin-ueding","followers_url":"https://api.github.com/users/martin-ueding/followers","following_url":"https://api.github.com/users/martin-ueding/following{/other_user}","gists_url":"https://api.github.com/users/martin-ueding/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-ueding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-ueding/subscriptions","organizations_url":"https://api.github.com/users/martin-ueding/orgs","repos_url":"https://api.github.com/users/martin-ueding/repos","events_url":"https://api.github.com/users/martin-ueding/events{/privacy}","received_events_url":"https://api.github.com/users/martin-ueding/received_events","type":"User","site_admin":false},"created_at":"2019-01-03T17:04:49Z","updated_at":"2019-01-03T17:04:49Z","author_association":"MEMBER","body":"I just messed up the algorithm, I copied Neumaiers version from Wikipedia and it works just fine now. Also the test with `double` and `long double` fails to see any difference between the two. Seems like they store 128 bit but only compute 64 bits. What a scam!\r\n\r\nAnyway, it works now. I think that I have added the accumulators everywhere I could sensibly. Then we can take this for a test perhaps tomorrow."}}
{"actor":{"display_login":"martin-ueding"}}