Open
Description
It'd be nice to use the existing DiffBase.DiffResult
API to get higher-order scalar derivatives via derivative!
.
For example, it would be cool if you could do the following:
julia> using ForwardDiff: derivative!
julia> using DiffBase: DiffResult
julia> derivative!(DiffResult(0., 0., 0.), sin, 1.0)
DiffBase.DiffResult{2,Float64,Tuple{Float64,Float64}}(0.8414709848078965,(0.5403023058681398,-0.8414709848078965))
Currently, derivative!
will just calculate the first derivative:
julia> derivative!(DiffResult(0., 0., 0.), sin, 1.0)
DiffBase.DiffResult{2,Float64,Tuple{Float64,Float64}}(0.8414709848078965,(0.5403023058681398,0.0))
cc @YingboMa
Metadata
Metadata
Assignees
Labels
No labels