-
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
Remove pi_interval #285
Comments
Also we can use |
Seems like something is different, julia> pi_interval(Float64)
Interval(3.141592653589793, 3.1415926535897936) julia> Interval{Float64}(pi)
Interval(3.141592653589793, 3.141592653589793) |
Ah, oops. Could you fix this please? |
(Please quote code inside triple backticks with ```jl |
I think pi_interval is a function which we have defined but Interval{T}(pi) is a type conversion of a rational number pi in to an Interval of type T. So what do we want at the end? Is it that pi_interval should be interval of one absolute value of pi or should it an interval containing pi and nearby values. |
Of course we want it to be the smallest interval containing julia> convert(Interval, pi)
Interval(3.141592653589793, 3.1415926535897936) (although who knows how efficient that is). [Please quote code inline as `(code)`.] |
The idea is always that interval arithmetic should give results that are guaranteed to contain the true results. In this case |
Hmmm. It seems that |
Sorry about the typo. Yes we should retain |
I am saying that this is the smallest interval for
You can test this: julia> nextfloat(x.lo) == x.hi
true |
Ah, I see that |
But we should define |
I think |
In #271 I plan to get rid of Interval{T}(::Irrational{:π}) where T = atomic(Interval{T}, π)
Interval(::Irrational{:π}) = Interval{Float64}(π) If further optimisation is required, the methods are specific enough to have them there. |
Closed by #338 |
pi_interval(T)
is the same asInterval{T}(pi)
.cc @yashrajgupta
The text was updated successfully, but these errors were encountered: