-
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
Arithmetic with big constants should not promote #229
Comments
I think promotion rules are ok, simply because following them is consistent with Base; then, one has to rely on the explicit conversion if You are right that the result of julia> IntervalArithmetic.atomic(Interval{Float64}, factorial(big(100)))
Interval(9.332621544394415e157, 9.332621544394416e157) |
We are free to define our own promotion rules. I think the fact that we are working with |
I agree with you that we are free to define the promotion behavior. Yet, as pointed out above, the default behavior should be consistency with Base. In my opinion, in the example with |
Probably we would prefer the following to return an
Interval{Float64}
. This is happening due to the automatic promotion rules:We can get around it by an explicit conversion:
Note also that
Interval{Float64}(factorial(big(100)))
does not give an enclosure, which is a bug:The text was updated successfully, but these errors were encountered: