Closed
Description
julia> using IntervalArithmetic, ForwardDiff, StaticArrays
julia> f(X) = ( (x, y) = X; x^2 + y^2 )
f (generic function with 2 methods)
julia> ForwardDiff.hessian(f, SVector(0..0, 0..0))
2×2 SArray{Tuple{2,2},Interval{Float64},2,4} with indices SOneTo(2)×SOneTo(2):
[0, 2] [0, 0]
[0, 0] [0, 2]
(Note that these are intervals being printed, not arrays.)
The diagonal entries are incorrect: they should be 2..2
.
Cf. the same problem in
JuliaDiff/SparseDiffTools.jl#67
Metadata
Metadata
Assignees
Labels
No labels