-
Notifications
You must be signed in to change notification settings - Fork 71
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
Float interval + BigFloat interval should be Float interval? #326
Comments
Thanks for bringing this up, it is really a good point. I think that if a user takes the time to create an |
If the result is larger than |
This is (partially) analogous to a similar discussion in TaylorSeries.jl about the degree of the sum of two polynomials of different degrees. If one of the intervals is a Float64 then you can only have information at the precision level of a Float64. The point about julia> interval(0, prevfloat(typemax(Float64))) + Interval{Float64}(interval(big(1), big(2)))
Interval(1.0, Inf) |
I would argue that the precision of a Float64 is infinite in this context, since results are always rounded in the right direction. (The numbers that are stored are not approximations of the bounds. They are the bounds, albeit not always the tightest possible bounds.) For example, if I write |
I see your point, but while you might know that you meant an exact interval, Julia has no way of knowing that. The fact that you chose to use an |
Discussed in triage, there are two reason have
|
x::Interval{Float64}
+y::Interval{BigFloat}
should giveInterval{Float64}
?The text was updated successfully, but these errors were encountered: