-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add compound
function
#161
Comments
Admittedly, I'm not terribly familiar with the However, it seems to me that this function might fit well with the naming scheme of the other I think, even if |
Yes, I think that's an excellent suggestion, given the There's also an interesting question of whether or not the better operation to provide would actually be (1+x)ⁿ - 1, which is less often what people think they want but numerically more useful in some ways. |
I’d support this. The straightforward name Also worth considering if we should include the For placement, I think this operation naturally belongs on |
Here are two Wikipedia pages explaining the concept, that might be helpful to others: |
IEEE 754 recommends (but does not require) a
compound
function, which is in the process of being standardized for C and C++; we should expose it in swift-numerics. The simplest, most literal translation of the operation into Swift would be:A good implementation is somewhat subtle, but we can come up with a good solution. I'm initially mainly interested in feedback on what the API should look like for this operation, both the naming and whether to put it on RealFunctions or ElementaryFunctions (where it can also be defined).
The text was updated successfully, but these errors were encountered: