Closed
Description
ForwardDiff: v0.10.38
Julia: v1.11.3
julia> function f(ε)
A = [1 ε; 2ε 2]
inv(A) * A
end
f (generic function with 1 method)
julia> ForwardDiff.derivative(f, 0)
2×2 Matrix{Float64}:
0.0 0.0
1.0 0.0
inv(A) * A
is an identity, so its derivative should be 0.
On my Julia version, what is happening is that the inv
version will see that istriu(A)
evaluates to true and pick an optimized path for that - completely ignoring the dual components on the lower diagonal part.
Metadata
Metadata
Assignees
Labels
No labels