JuliaMath / JuliaMath/ChangesOfVariables.jl

Fall back on AD?

Open
#10 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
12
Forks
3
PR merge metrics
No merged PRs in 30d

Description

This bit me today:
```julia
julia> with_logabsdet_jacobian(cbrt, 2.0)
NoLogAbsDetJacobian{typeof(cbrt), Float64}()
```

I could add a method for this, but there are so many other functions out there, maybe this could be automated?

This seems possible, since it's invertible:
```julia
julia> inverse(cbrt)
(::Base.Fix2{typeof(^), Int64}) (generic function with 1 method)
````
and AD-friendly:
```julia
julia> ForwardDiff.derivative(cbrt, 2.0)
0.2099868416491455
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.