What is the scope of complex number support in NLSolve?
I found an example in this issue, Allow complex numbers · Issue #112 · JuliaNLSolvers/NLsolve.jl · GitHub
using NLsolve
function f!(x, fvec)
fvec[1] = (x[1]+3)*(x[2]^3-7)+18
fvec[2] = sin(x[2]*exp(x[1])-1)
end
function g!(x, fjac)
fjac[1, 1] = x[2]^3-7
fjac[1, 2] = 3*x[2]^2*(x[1]+3)
u = exp(x[1])*cos(x[2]*exp(x[1])-1)
fjac[2, 1] = x[2]*u
fjac[2, 2] = u
end
nlsolve(f!, g!, [ 0.1+im; 1.2])
Which seems to be resolved. However throws this error,
ERROR: BoundsError: attempt to access 2-element Array{Complex{Float64},1} at index [1, 2]
in julia v1.4, NLsolve v4.3