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 in sum of large intervals #82

Closed
dpsanders opened this issue Jun 30, 2017 · 1 comment
Closed

Bug in sum of large intervals #82

dpsanders opened this issue Jun 30, 2017 · 1 comment
Labels

Comments

@dpsanders
Copy link
Member

julia> Interval(prev_float(Inf), Inf) + Interval(prev_float(Inf), Inf)
ERROR: ArgumentError: Must satisfy `a < Inf` and `b > -Inf` to construct Interval(a, b).

It's trying to construct Interval(Inf, Inf).

This seems to be a bug with FastRounding, since

julia 0.6> setrounding(Interval, :slow)
:slow

julia 0.6> Interval(prevfloat(Inf), Inf) + Interval(prevfloat(Inf), Inf)
[1.79769e+308, ∞]
@dpsanders dpsanders added the bug label Jun 30, 2017
@dpsanders
Copy link
Member Author

This seems to have been fixed by JeffreySarnoff/FastRounding.jl#12:

using FastRounding: prev_float

julia> Interval(prev_float(Inf), Inf) + Interval(prev_float(Inf), Inf)
[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

No branches or pull requests

1 participant