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
ENH: special: add log_wright_bessel
#20646
Conversation
- wb_large_a more numerically stabel - wb_small_a factored out C and X coefficients - comments improved
log_wright_bessel
72c9cf3
to
4523998
Compare
Thanks @lorentzenchr! This is excellent work. I'll give this a close sometime in the next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @lorentzenchr! Nice work getting all of the infrastructure stuff right before we've even documented it.
A[4] = X[1] * (C[0] + C[1] * b + C[2] * B[2] + C[3] * B[3] + C[4] * B[4]); | ||
A[3] = X[2] / 2. * (C[1] + C[2] * b + C[3] * B[2] + C[4] * B[3]); | ||
A[2] = X[3] / 6. * (C[2] + C[3] * b + C[4] * B[2]); | ||
A[1] = X[4] / 24. * (C[3] + C[4] * b); | ||
A[0] = X[5] / 120. * C[4]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does look nice lined up like this, but we've been using clang-format to format the code in this folder: https://github.com/scipy/scipy/blob/main/scipy/special/special/.clang-format. I think it's fine to merge it like this, but just giving you a heads up that the formatting here is likely to be automatically changed back in the future.
Reference issue
Closes gh-20598
What does this implement/fix?
This PR adds the special function
log_wright_bessel
, i.e. the logarithm of Wright's Bessel function.Additional information
Simply put, this might be (one of) the hardest to evaluate special function in scipy.special. Taking the logarithm makes the possible domain of the 3 parameters even larger.