Skip to content

Unhelpful return code for IntervalNonlinearProblem #452

Closed
SciML/SimpleNonlinearSolve.jl
#158
@TomRottier

Description

@TomRottier

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions