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

Unhelpful return code for IntervalNonlinearProblem #452

Open
TomRottier opened this issue Jul 9, 2024 · 2 comments
Open

Unhelpful return code for IntervalNonlinearProblem #452

TomRottier opened this issue Jul 9, 2024 · 2 comments

Comments

@TomRottier
Copy link

Trying to solve the following IntervalNonlinearProblem:

f(t,p) = sin(t) - 10.0
prob = IntervalNonlinearProblem(f, [0.0, 2pi])
sol = solve(prob, ITP())

gives a FloatingPointLimit return code and the solution as 0.0. Which according to the docs (https://docs.sciml.ai/SciMLBase/stable/interfaces/Solutions/#retcodes) means a successful solve:

ReturnCode.FloatingPointLimit
The success state of the solver. If this return code is given, then the solving process was successful, and the closest floating point value to the solution was given.

Given this equation cannot be solved this return code doesn't seem appropiate. It also feels like the "closest floating point value to the solution" should be pi/2 rather than 0.0.

On Julia 1.10.4 and:

(jl_ajmNJc) pkg> st
Status `/tmp/jl_ajmNJc/Project.toml`
  [8913a72c] NonlinearSolve v3.13.1
@oscardssmith
Copy link
Contributor

it should probably be an initialfailure since I think intervalproblem requires opposite signs on the boundary

@ChrisRackauckas
Copy link
Member

Yes, it should give an initial failure with a warning about not being an enclosing interval.

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

3 participants