diff --git a/src/chebyshevtransform.jl b/src/chebyshevtransform.jl index 5303868e..7920e6d0 100644 --- a/src/chebyshevtransform.jl +++ b/src/chebyshevtransform.jl @@ -598,7 +598,7 @@ ichebyshevutransform(x, dims...; kwds...) = plan_ichebyshevutransform(x, dims... ## Code generation for integer inputs for func in (:chebyshevtransform,:ichebyshevtransform,:chebyshevutransform,:ichebyshevutransform) - @eval $func(x::AbstractVector{T}, dims...; kwds...) where {T<:Integer} = $func(convert(AbstractVector{Float64},x), dims...; kwds...) + @eval $func(x::AbstractVector{T}, dims...; kwds...) where {T<:Integer} = $func(convert(AbstractVector{float(T)},x), dims...; kwds...) end @@ -742,4 +742,4 @@ for pln in (:plan_chebyshevtransform!, :plan_chebyshevtransform, $pln(x::AbstractArray, dims...; kws...) = $pln(x, Val(1), dims...; kws...) $pln(::Type{T}, szs, dims...; kwds...) where T = $pln(Array{T}(undef, szs...), dims...; kwds...) end -end \ No newline at end of file +end diff --git a/test/chebyshevtests.jl b/test/chebyshevtests.jl index 3112472d..614f9c6d 100644 --- a/test/chebyshevtests.jl +++ b/test/chebyshevtests.jl @@ -443,6 +443,10 @@ using FastTransforms, Test @test plan_chebyshevtransform!(x)copy(x) ≈ chebyshevtransform(x) @test plan_ichebyshevtransform!(x)copy(x) ≈ ichebyshevtransform(x) end + @testset "BigInt" begin + x = big(10)^400 .+ BigInt[1,2,3] + @test ichebyshevtransform(chebyshevtransform(x)) ≈ x + end @testset "immutable vectors" begin F = plan_chebyshevtransform([1.,2,3])