-
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
Make @interval return a Float64 interval #127
Comments
I think it already does that by default. Consider the following: julia> using IntervalArithmetic
julia> a = big"0.1"
1.000000000000000000000000000000000000000000000000000000000000000000000000000002e-01
julia> f(x) = @interval a + x
f (generic function with 1 method)
julia> g(x) = @biginterval a + x
g (generic function with 1 method)
julia> @format full
6
julia> f(0.0)
Interval(0.09999999999999999, 0.1)
julia> g(0.0)
Interval(9.999999999999999999999999999999999999999999999999999999999999999999999999999914e-02, 1.000000000000000000000000000000000000000000000000000000000000000000000000000002e-01) Or do you mean something else? |
julia> @macroexpand @interval 0.1
:((IntervalArithmetic.Interval)((IntervalArithmetic.atomic)((IntervalArithmetic.Interval){IntervalArithmetic.parameters.precision_type}, 0.1)))
julia> @macroexpand @floatinterval 0.1
:((IntervalArithmetic.Interval)((IntervalArithmetic.atomic)((IntervalArithmetic.Interval){Float64}, 0.1)))
|
20 tasks
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since Float64 is the most common case, I suggest that
@interval
do what@floatinterval
does now.The text was updated successfully, but these errors were encountered: