We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
t -> abs(t)^2
1 parent 50ec9a1 commit e3670ceCopy full SHA for e3670ce
test/MiscTest.jl
@@ -158,4 +158,7 @@ end
158
@test ForwardDiff.derivative(x -> rem2pi(x, RoundUp), rand()) == 1
159
@test ForwardDiff.derivative(x -> rem2pi(x, RoundDown), rand()) == 1
160
161
+# example from https://github.com/JuliaDiff/DiffRules.jl/pull/98#issuecomment-1574420052
162
+@test only(ForwardDiff.hessian(t -> abs(t[1])^2, [0.0])) == 2
163
+
164
end # module
0 commit comments