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
Conform Complex to Elementary Functions #162
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Renamed scaled/unscaled to multiplied/divided - Adopted new Real module name - Adopted expMinusOne, log(onePlus:) names
Rebased on master, then cleaned up exp and expm1. New algorithm for expm1 that gives good componentwise accuracy as well as normwise. I _think_ that this is fundamentally new; I can't recall seeing it anywhere before, though it's simple enough that I expect someone has thought of it before. Also beefed up testing for exp and expm1. Left sketches of log/pow/sqrt/root in place, though I'm still working on filling out the testing for those.
First pass over hyperbolics and trig functions for Complex.
- Renamed scaled/unscaled to multiplied/divided - Adopted new Real module name - Adopted expMinusOne, log(onePlus:) names
Rebased on master, then cleaned up exp and expm1. New algorithm for expm1 that gives good componentwise accuracy as well as normwise. I _think_ that this is fundamentally new; I can't recall seeing it anywhere before, though it's simple enough that I expect someone has thought of it before. Also beefed up testing for exp and expm1. Left sketches of log/pow/sqrt/root in place, though I'm still working on filling out the testing for those.
…cs into complex-elfns
These significantly improve on the state of the art for arguments close to the circle where the result vanishes, producing good componentwise relative accuracy as well as relative accuracy in the complex norm. Also drops the argument parser dependency, which is desirable to avoid possible circular dependencies in the future with algorithms.
Augmented arithmetic implementations of log and log(onePlus:) for enhanced accuracy close to the circle where the real part of the result vanishes.
texasmichelle
added a commit
to tensorflow/swift-apis
that referenced
this pull request
Nov 9, 2020
The CMake build is currently broken on `main`, so use a commit prior to the addition of `Augmented` in apple/swift-numerics#162. Resolves the error: swift-numerics/Sources/ComplexModule/ElementaryFunctions.swift:304:17: error: cannot find 'Augmented' in scope let (a,b) = Augmented.twoProdFMA(u, u) ^~~~~~~~~
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This retains a few todos, and additional testing coverage is needed, but constitutes a basically sane first pass on elementary functions support for Complex.