Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MArray inputs cause NaNs #228

Open
ChrisRackauckas opened this issue Jan 2, 2020 · 1 comment
Open

MArray inputs cause NaNs #228

ChrisRackauckas opened this issue Jan 2, 2020 · 1 comment

Comments

@ChrisRackauckas
Copy link
Contributor

using NLsolve, StaticArrays

function f!(F, x)
    F[1] = (x[1]+3)*(x[2]^3-7)+18
    F[2] = sin(x[2]*exp(x[1])-1)
end

function j!(J, x)
    J[1, 1] = x[2]^3-7
    J[1, 2] = 3*x[2]^2*(x[1]+3)
    u = exp(x[1])*cos(x[2]*exp(x[1])-1)
    J[2, 1] = x[2]*u
    J[2, 2] = u
end

nlsolve(f!, j!, @MArray [ 0.1; 1.2])

Gives NaNs for the zero.

XRef: SciML/DifferentialEquations.jl#542

@pkofod
Copy link
Member

pkofod commented Jan 11, 2020

Interesting. I'll have to dig in to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants