-
Notifications
You must be signed in to change notification settings - Fork 20
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 fallbacks for log1pmx
and logmxp1
#45
Conversation
This looks like it would make sense, given that the other functions dispatch on `Real` argument, and it also fixes JuliaStats#44.
As I mentioned in #44, I think this PR is not the correct fix for #44, and hence the motivation is a bit different. Regardless of that, I think it is reasonable to extend these functions to |
I see. I need to look a bit into the floating-point issues here. |
Given that the PR JuliaDiff/DiffRules.jl#82 is missing this fallback, I would propose to merge this and release a new version, open a separate issue for optimizations, and add those in a future PR. EDIT: I opened #46 |
We don't need the Float32 support in DiffRules, it's just a part of the tests that we can skip (or check that it errors). |
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
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.
Seems fine in principle, I guess we can optimize the generic implementation in follow-up PRs if needed.
Can you add some tests with non-Float64 types (eg some Float32 values and compare their results with Float64 results) and update the version number?
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.
LGTM, thanks!
This looks like it would make sense, given that the other functions dispatch on
Real
argument, and it also fixes #44.