JuliaApproximation / ApproxFun.jl

Julia package for function approximation
http://juliaapproximation.github.io/ApproxFun.jl/
Other
542 stars 70 forks source link

Fun(function,Legendre(BigFloat interval)) never returns #670

Open putianyi889 opened 5 years ago

putianyi889 commented 5 years ago
> using ApproxFun

> @time Fun(BigFloat(1),Legendre())
0.000463 seconds (316 allocations: 23.984 KiB)
Fun(Legendre(),BigFloat[1.0])

> @time Fun(1,Chebyshev(BigFloat(-1)..1))
0.000060 seconds (31 allocations: 1.125 KiB)
Fun(Chebyshev(-1.0..1.0),BigFloat[1.0])

> @time Fun(1,Legendre(BigFloat(-1)..1))
never returns
dlfivefifty commented 5 years ago

Killing it it looks like it might be a bug in FastTransforms:

julia> Fun(1,Legendre(BigFloat(-1)..1))
^CERROR: InterruptException:
Stacktrace:
 [1] _string_n at ./strings/string.jl:60 [inlined]
 [2] (::getfield(Base.MPFR, Symbol("##BigFloat#3#4")))(::Int64, ::Type) at ./mpfr.jl:115
 [3] Type at ./mpfr.jl:112 [inlined]
 [4] *(::BigFloat, ::BigFloat) at ./mpfr.jl:371
 [5] reinsch_f1!(::Array{BigFloat,1}, ::Int64, ::BigFloat, ::FastTransforms.RecurrencePlan{BigFloat}) at /Users/solver/.julia/packages/FastTransforms/IvwBW/src/recurrence.jl:124
 [6] forward_recurrence!(::Array{BigFloat,1}, ::Int64, ::BigFloat, ::BigFloat, ::BigFloat, ::FastTransforms.RecurrencePlan{BigFloat}) at /Users/solver/.julia/packages/FastTransforms/IvwBW/src/recurrence.jl:60
 [7] cheb2ultra(::Array{BigFloat,1}, ::BigFloat, ::FastTransforms.ChebyshevUltrasphericalPlan{false,BigFloat,FFTW.r2rFFTWPlan{Float64,(3,),true,1},FFTW.r2rFFTWPlan{Float64,(7,),true,1},SubArray{BigFloat,1,Array{BigFloat,1},Tuple{UnitRange{Int64}},true}}) at /Users/solver/.julia/packages/FastTransforms/IvwBW/src/cheb2ultra.jl:63
 [8] icjt(::Array{BigFloat,1}, ::FastTransforms.ChebyshevUltrasphericalPlan{false,BigFloat,FFTW.r2rFFTWPlan{Float64,(3,),true,1},FFTW.r2rFFTWPlan{Float64,(7,),true,1},SubArray{BigFloat,1,Array{BigFloat,1},Tuple{UnitRange{Int64}},true}}) at /Users/solver/.julia/packages/FastTransforms/IvwBW/src/cjt.jl:81
 [9] * at /Users/solver/.julia/packages/FastTransforms/IvwBW/src/cjt.jl:94 [inlined]
 [10] *(::ApproxFunOrthogonalPolynomials.JacobiTransformPlan{BigFloat,FastTransforms.ChebyshevTransformPlan{BigFloat,1,false,Nothing},FastTransforms.ChebyshevUltrasphericalPlan{false,BigFloat,FFTW.r2rFFTWPlan{Float64,(3,),true,1},FFTW.r2rFFTWPlan{Float64,(7,),true,1},SubArray{BigFloat,1,Array{BigFloat,1},Tuple{UnitRange{Int64}},true}}}, ::Array{BigFloat,1}) at /Users/solver/.julia/packages/ApproxFunOrthogonalPolynomials/OM7o1/src/Spaces/Jacobi/jacobitransform.jl:14
 [11] transform(::Jacobi{Interval{:closed,:closed,BigFloat},BigFloat}, ::Array{BigFloat,1}) at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/Space.jl:427
 [12] default_Fun(::Type{BigFloat}, ::Function, ::Jacobi{Interval{:closed,:closed,BigFloat},BigFloat}, ::Array{BigFloat,1}, ::Type{Val{false}}) at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/constructors.jl:44
 [13] default_Fun(::ApproxFunBase.DFunction, ::Jacobi{Interval{:closed,:closed,BigFloat},BigFloat}, ::Int64, ::Type{Val{false}}) at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/constructors.jl:57
 [14] default_Fun(::Function, ::Jacobi{Interval{:closed,:closed,BigFloat},BigFloat}, ::Int64) at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/constructors.jl:72
 [15] default_Fun(::ApproxFunBase.DFunction, ::Jacobi{Interval{:closed,:closed,BigFloat},BigFloat}) at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/constructors.jl:121
 [16] Type at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/constructors.jl:177 [inlined]
 [17] ones at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/constructors.jl:152 [inlined]
 [18] Fun(::Int64, ::Jacobi{Interval{:closed,:closed,BigFloat},BigFloat}) at /Users/solver/.julia/packages/ApproxFunBase/pgZx6/src/constructors.jl:96
 [19] top-level scope at none:0