You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're right, this gives an error, but there is a good reason. The result is created from integers, but the output of the function is promoted to float.
Enforcing that the result keeps the same number types is a good thing for type-stability, and that's why I don't think it would be a good idea to change that
l(xu) = sum(sqrt(i^2 + 1) for i in xu)
xu = Vector(1:6)
result = DiffResults.HessianResult(xu)
result = ForwardDiff.hessian!(result, l, xu)
will giveInexactError: Int64(Int64, 22.11744686954993)
Problem will be solve if
xu = Vector{Float64}(1:6)
The text was updated successfully, but these errors were encountered: