Skip to content

Incorrect root of function involving max #146

@perrutquist

Description

@perrutquist
julia> roots(x -> max(x,-x)+1, -2..2)
1-element Array{Root{Interval{Float64}},1}:
 Root([1, 1], :unique)

This seems like an incorrect result. The function (equivalent to abs(x)+1) does not have any roots.

Providing a derivative explicitly: roots(x -> max(x,-x)+1, sign, -2..2) or changing the contractor: roots(x -> max(x,-x)+1, -2..2, Bisection) makes the problem go away.

Maybe related to #98 ?

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