Skip to content

Commit

Permalink
Merge pull request #129 from baggepinnen/patch-1
Browse files Browse the repository at this point in the history
Use precalculated function value
  • Loading branch information
ChrisRackauckas committed Jan 19, 2021
2 parents d977967 + 0e5899a commit 32bff4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/differentiation/jaches_products.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function num_jacvec(f,x,v,f0=nothing)
T = eltype(x)
# Should it be min? max? mean?
ϵ = sqrt(eps(real(T))) * max(one(real(T)), abs(minimum(x)))
(f(x.+ϵ.*v) .- f(x))./ϵ
(f(x.+ϵ.*v) .- _f0)./ϵ
end

function num_hesvec!(du,f,x,v,
Expand Down

0 comments on commit 32bff4d

Please sign in to comment.