Skip to content

Derivative lost in 3-arg mul #536

@antoine-levitt

Description

@antoine-levitt
julia> a = randn(3,3)
b =3×3 Matrix{Float64}:
 ra  0.0237017   1.62282  -1.28889
 -0.186575   -2.00309   0.502572
 -0.413123   -1.99718  -0.174593

julia> b = randn(3,3)
3×3 Matrix{Float64}:
 -0.40664   1.80043     1.2399
  1.22559  -0.828653    1.38103
  1.40994  -0.0784539  -0.127629

julia> ForwardDiff.derivative(x -> sum(x*a*b), 0.0)
0.0

julia> ForwardDiff.derivative(x -> sum(x*(a*b)), 0.0)
-6.900806270529478

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions