@@ -64,9 +64,9 @@ cache2 = ForwardDiff.Dual{typeof(ForwardDiff.Tag(SparseDiffTools.DeivVecTag(), e
6464@test autonum_hesvec! (dy, g, x, v, cache1, cache2)≈ ForwardDiff. hessian (g, x) * v rtol= 1e-2
6565@test autonum_hesvec (g, x, v)≈ ForwardDiff. hessian (g, x) * v
6666
67- @test numback_hesvec! (dy, g, x, v)≈ ForwardDiff. hessian (g, x) * v rtol = 1e-6
68- @test numback_hesvec! (dy, g, x, v, similar (v), similar (v))≈ ForwardDiff. hessian (g, x) * v rtol = 1e-6
69- @test numback_hesvec (g, x, v)≈ ForwardDiff. hessian (g, x) * v rtol = 1e-6
67+ @test numback_hesvec! (dy, g, x, v)≈ ForwardDiff. hessian (g, x) * v
68+ @test numback_hesvec! (dy, g, x, v, similar (v), similar (v))≈ ForwardDiff. hessian (g, x) * v
69+ @test numback_hesvec (g, x, v)≈ ForwardDiff. hessian (g, x) * v
7070
7171cache3 = ForwardDiff. Dual{typeof (ForwardDiff. Tag (Nothing, eltype (x))), eltype (x), 1
7272 }. (x, ForwardDiff. Partials .(tuple .(v)))
@@ -181,7 +181,7 @@ update_coefficients!(g, x, 1.0, 1.0)
181181update_coefficients! (h, x, 1.0 , 1.0 )
182182@test L * x ≈ autonum_hesvec (g, x, x)
183183@test L * v ≈ numauto_hesvec (g, x, v)
184- @test mul! (dy, L, v)≈ numauto_hesvec (g, x, v) rtol = 1e-8
184+ @test mul! (dy, L, v)≈ numauto_hesvec (g, x, v)
185185dy= rand (N);_dy= copy (dy);@test mul! (dy,L,v,a,b)≈ a* numauto_hesvec (g,x,v)+ b* _dy
186186for op in (L, g, h) update_coefficients! (op, v, 3.0 , 4.0 ) end
187187@test mul! (dy, L, x)≈ numauto_hesvec (g, v, x)
0 commit comments