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>
devmotion
left a comment
There was a problem hiding this comment.
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?
This looks like it would make sense, given that the other functions dispatch on
Realargument, and it also fixes #44.