JuliaIntervals / IntervalConstraintProgramming.jl

Calculate rigorously the feasible region for a set of real-valued inequalities with Julia
Other
63 stars 16 forks source link

StackOverflow with sin #213

Closed dpsanders closed 5 months ago

dpsanders commented 5 months ago

With PR https://github.com/JuliaIntervals/IntervalConstraintProgramming.jl/pull/212 we get the following rather unhelpful error message:

julia> S = Separator(sin(x) < 0.5, vars)
Separator(in(-0.5 + sin(x), [-∞, 0]), vars=x, y)

julia> S(X)
ERROR: StackOverflowError:
dpsanders commented 5 months ago

This is coming from calling S.f

dpsanders commented 5 months ago

This seems to be coming from calling NanMath.sin on an Interval, but it's not clear why NanMath is being used at all.

dpsanders commented 5 months ago

NanMath is used within Symbolics.jl...

dpsanders commented 5 months ago

Seems to be fixed by passing nanmath=false to build_function.