This is an archive of the discontinued LLVM Phabricator instance.

[flang] Use a "double-double" accumulator in SUM
ClosedPublic

Authored by klausler on Jun 15 2021, 4:34 PM.

Details

Summary

Use a "double-double" accumulator, a/k/a Kahan summation,
in the SUM intrinsic in the runtime for real & complex.
This seems to be the best-recommended technique for reducing
error, as opposed to the initial implementation of SUM's
distinct accumulators for positive and negative items.

Diff Detail

Event Timeline

klausler created this revision.Jun 15 2021, 4:34 PM
klausler requested review of this revision.Jun 15 2021, 4:34 PM
This revision is now accepted and ready to land.Jun 16 2021, 2:33 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2021, 2:29 PM