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

Bug casting Inf to Interval #209

Closed
dpsanders opened this issue Sep 15, 2018 · 2 comments · Fixed by #567
Closed

Bug casting Inf to Interval #209

dpsanders opened this issue Sep 15, 2018 · 2 comments · Fixed by #567
Labels

Comments

@dpsanders
Copy link
Member

dpsanders commented Sep 15, 2018

julia> convert(Interval, ∞)
[∞, ∞]
@dpsanders
Copy link
Member Author

Also

julia> Interval{Float64}(∞)
[∞, ∞]

This is a prohibited interval. We could either throw an error or return Interval(prevfloat(Inf), Inf).

@lbenet
Copy link
Member

lbenet commented Dec 12, 2018

I'm in favor of throwing an error here; in whatever interpretation of an Interval, it simply makes no sense.

In pass, note that atomic yields your last solution

julia> IntervalArithmetic.atomic(Interval{Float64}, ∞)
[1.79769e+308, ∞]

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

Successfully merging a pull request may close this issue.

3 participants