-
Notifications
You must be signed in to change notification settings - Fork 51
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
Division is not properly defined for some cases of Taylor1{TaylorN{Float64}} #92
Comments
A solution for this is proposed in #93; Once I get the green lights I'll merge. |
Thanks for looking into this! I checked out the julia> using TaylorSeries
julia> x = 1.0 + TaylorN(Float64,1,order=5)
1.0 + 1.0 x₁ + 𝒪(‖x‖⁶)
julia> y = Taylor1(x, 16)
1.0 + 1.0 x₁ + 𝒪(‖x‖⁶) + 𝒪(t¹⁷)
julia> y/y
1.0 + 𝒪(‖x‖⁶) + 𝒪(t¹⁷)
julia> y/1.0
Segmentation fault: 11 So the division of two /{T<:Real}(a::Taylor1{TaylorN{T}}, b::T) = a * inv(b) to solve this; what do you think? |
I've just pushed another commit which solves the second case. There is still a problem though, and it is indeed due to |
I'm working with
Taylor1{TaylorN{Float64}}
variables in Julia 0.5 using TaylorSeries latest master, but are having some trouble with two cases for the division:Taylor1{TaylorN{Float64}}
'sTaylor1{TaylorN{Float64}}
by aFloat64
It seems that in order to properly define division of two
Taylor1{TaylorN{Float64}}
's, either a methodisinf(::TaylorSeries.TaylorN{Float64})
ordivfactorization{T<:Real}(a1::Taylor1{TaylorN{T}}, b1::Taylor1{TaylorN{T}})
must be defined. Also, in order to define the division of aTaylor1{TaylorN{Float64}}
by aFloat64
, a specialized method/{T<:Real}(a::Taylor1{TaylorN{T}}, b::T)
must be defined. Currently, what I'm doing to work around this is:And then (although the
divfactorization
method lacks some checks), everything works smoothly:With this workaround, some more elaborate cases work. As stated above, it seems that the division of two
Taylor1{TaylorN{Float64}}
's may also be fixed by definingisinf(::TaylorSeries.TaylorN{Float64})
.The text was updated successfully, but these errors were encountered: