JuliaNLSolvers / NLsolve.jl

Julia solvers for systems of nonlinear equations and mixed complementarity problems
Other
329 stars 66 forks source link

fixedpoint doesn't work with autodiff #268

Open amrods opened 3 years ago

amrods commented 3 years ago

Both of these throw an error:

fixedpoint(x -> 0.5*(2/x + x), [1.0]; autodiff=:true)
ERROR: TypeError: in keyword argument autodiff, expected Symbol, got a value of type Bool

fixedpoint(x -> 0.5*(2/x + x), [1.0]; autodiff=true)
ERROR: TypeError: in keyword argument autodiff, expected Symbol, got a value of type Bool
amrods commented 3 years ago

I think what happens is that fixedpoint calls nlsolve, but the latter takes autodiff=:forward as an option, rather than autodiff=:true as the documentation states. Specifically, this sentence in the Fixed Points section needs to be fixed: