JuliaMath / JuliaMath/Calculus.jl
Disallow second_derivative and hessian functions to be called without g
Open
- Dominant language
- Julia
- Stars
- 285
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
Currently, `derivative.jl` has the two following definintions
``` .jl
second_derivative(f::Function) = second_derivative(f, derivative(f), :scalar, :central)
hessian(f::Function) = second_derivative(f, gradient(f), :vector, :central)
```
however we discussed that by estimating the first derivative to hand to the second derivative is error prone and subject to possibly large round off error.
I think it's simple enough for a user to input `second_derivavitve(f,derivative(f))` explicitly if they want to take this risk.
Thoughts?
@johnmyleswhite
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.