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

additional functionality #8

Open
2 tasks
simonbyrne opened this issue Dec 13, 2017 · 1 comment
Open
2 tasks

additional functionality #8

simonbyrne opened this issue Dec 13, 2017 · 1 comment

Comments

@simonbyrne
Copy link
Member

Part of my reason for #7 was to make it easier to extend. Some other functions we should provide:

  • dot_kbn: compute the dot-products using double-double, then sum up using Kahan summation
  • mean_kbn: divide the extended-precision sum using a 2-div style, so that mean_kbn(fill(0.1,10)) == 0.1
@goerch
Copy link
Contributor

goerch commented Feb 5, 2022

I'm interested in #7, because it allows simple parallelization with something like

psum_kbn(f, X) = singleprec(Folds.mapreduce(f, InitialValues.asmonoid(plus_kbn), X))
psum_kbn(X) = psum_kbn(identity, X)

Is there anything wrong with the PR besides the fact that singleprec(x::TwicePrecisionN{T}) where {T} = x.hi - x.nlo is better suited for AD?

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