-
Notifications
You must be signed in to change notification settings - Fork 53
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
Multivariate Taylor expansion with HypergeometricFunctions #336
Comments
This one is more complicated. So I'll explain you where I am. julia> using TaylorSeries, HypergeometricFunctions
julia> x, y = set_variables("x y", order=8);
julia> Base.float(t::HomogeneousPolynomial) = HomogeneousPolynomial(float.(t.coeffs))
julia> Base.float(t::TaylorN) = TaylorN(float.(t.coeffs), t.order)
julia> TaylorSeries.TaylorN{T}(a::S) where {T,S} = (R=promote_type(T,S); TaylorN(R(a), get_order()))
julia> Base.eps(::Type{TaylorN{T}}) where {T} = eps(one(T))
julia> Base.eps(a::TaylorN) = eps(constant_term(a))
julia> _₁F₁(2,3,x+0.5*y-1)
0.5284822353142297 + 0.32120558828564066 x + 0.16060279414282033 y + 0.11392894125311108 x² + 0.11392894125613448 x y + 0.02848223531327777 y² + 0.029278774897663628 x³ + 0.0439181620949485 x² y + 0.02195908104747425 x y² + 0.0036598468622079535 y³ + 0.005941825591207862 x⁴ + 0.01188368338042503 x³ y + 0.008912756962586393 x² y² + 0.0029709208451062577 x y³ + 0.00037136409945049136 y⁴ + 0.0010004169168939174 x⁵ + 0.002497931469181667 x⁴ y + 0.0024982484957348523 x³ y² + 0.0012491242478674261 x² y³ + 0.00031226124780728244 x y⁴ + 3.126302865293492e-5 y⁵ + 6.657557616881685e-5 x⁶ + 0.0003943810321619436 x⁵ y + 0.0005199235472231411 x⁴ y² + 0.0003170265531848421 x³ y³ + 0.00012617656816756717 x² y⁴ + 2.3222195020789684e-5 x y⁵ + 1.0402433776377632e-6 y⁶ + 0.00295215126325725 x⁷ + 0.0015420171546910721 x⁶ y - 0.0016231759523063917 x⁵ y² + 0.0007304291785378762 x⁴ y³ + 0.0006695600803263865 x³ y⁴ + 5.072424850957474e-5 x² y⁵ + 9.891228459367074e-5 x y⁶ + 2.3063681744197264e-5 y⁷ - 0.08602832547223875 x⁸ - 0.0389562228553534 x⁷ y + 0.17790008437278051 x⁶ y² + 0.11816720932790531 x⁵ y³ + 0.01753030028490903 x⁴ y⁴ + 0.00941442052337707 x³ y⁵ + 0.002597081523690227 x² y⁶ - 0.0018159280966427757 x y⁷ - 0.0003360481463759326 y⁸ + 𝒪(‖x‖⁹) Please check if this should be the expected output. |
It doesn't work Closest candidates are: |
One single hint: copy-pasting my code above, and including the following, shows the problem: julia> a = 2
2
julia> b = 2
2
julia> pfq1 = HypergeometricFunctions.pFq((1+a,), (b,),x*(y-1))
ERROR: AssertionError: !(iszero(constant_term(b)))
Stacktrace:
[1] /(a::TaylorN{Float64}, b::TaylorN{Float64})
@ TaylorSeries ~/.julia/dev/TaylorSeries/src/arithmetic.jl:662 You cannot divide two |
function tele_gf111(params,t,z) This works fine for me,!!!!! However,here is a little change,When I seperate TaylorN,so I define: Closest candidates are: |
I divide two TaylorN while the denominator doesn't contain a zero constant term.but get the error,I don't know how to solve it Closest candidates are: |
Is there anyone to help? Thanks. |
using TaylorSeries
using HypergeometricFunctions
function bbb(params)
x,y = params
return _₁F₁(2,3,x+0.5*y-1)
end
x, y = set_variables("x y", order=8)
bbb([x,y])
ERROR: MethodError: no method matching AbstractFloat(::TaylorN{Float64})
Closest candidates are:
(::Type{T})(::T) where T<:Number
@ Core boot.jl:792
(::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number}
@ Base char.jl:50
(::Type{T})(::Base.TwicePrecision) where T<:Number
@ Base twiceprecision.jl:266
...
Can anybody tell me how to solve it?
The text was updated successfully, but these errors were encountered: