-
Notifications
You must be signed in to change notification settings - Fork 17
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
Unexpected evaluate
behavior with non-Float64 numbers
#158
Comments
Thanks for reporting; that is indeed weird. I'll have a look, and I'll get back here. Note that since lot is going on in IntervalArithmetic, and that has consequences in TaylorSeries, lots of changes will occur here... |
The problem seems to be in TaylorSeries: julia> D32 = interval(-1f0, 1f0)
[-1f0, 1f0]
julia> D = interval(-1.0, 1.0)
[-1, 1]
julia> t = Taylor1(3)
1.0 t + 𝒪(t⁴)
julia> q₁ = 1 + 2*t + 2*t^2
1.0 + 2.0 t + 2.0 t² + 𝒪(t⁴)
julia> q₁(D)
[-1, 5]
julia> q₁(D32)
[-3, 5]
julia> evaluate(t^2, D)
[0, 1]
julia> evaluate(t^2, D32)
[-1, 1] |
Noup, the problem is in IntervalArithmetic v0.20.9: somehow, squaring doesn't work for julia> D^2
[0, 1]
julia> D32^2
[-1f0, 1f0]
julia> @which D32^2
^(x::Number, p::Integer)
@ Base intfuncs.jl:311 The problem is solved in current master of IntervalArithmetic. |
Thanks for working this out! Then there is nothing we can do for now and this should eventually get resolved when the new version is supported. |
Is it expected that
evaluate
gives vastly different results when using non-Float64
numbers?The text was updated successfully, but these errors were encountered: