-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
BUG: special: fix algorithmic error in ratevl
in cephes/polevl.h
#20730
Conversation
ratevl
in cephes/polevl.h
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.
Thanks @ZhibingSun
and congrats on your first contribution to SciPy! |
@@ -115,6 +116,7 @@ namespace cephes { | |||
|
|||
/* Evaluate a rational function. See [1]. */ | |||
|
|||
/* The function ratevl is only used once in cephes/lanczos.h. */ |
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.
I think it's fine to keep this comment here, but just want to point out that this may change in the future, especially as we work on unifying the cephes
, amos
, specfun
, cdflib
, faddeeva
, etc. codebases.
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.
Sure. I just checked the code for special/Faddeeva.cc
, which I think have better performance than the ones in cephes/ndtr.h
, so is it possible to improve the performance of the functions in cephes/ndtr.h
in the future, i.e.,
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.
We actually found that cephes
has better accuracy for real valued ndtr
, erf
, and erfc
. See #19492 (comment).
I just meant that it's not unlikely that ratevl
will end up being used again in another function, and I want to make sure to keep in mind that if so, this comment will need to be updated.
Reference issue
Closes #20697.
What does this implement/fix?
It fixed an algorithmic error in
ratevl
incephes/polevl.h
.Additional information