Skip to content

Commit

Permalink
Fix a precision bug (#5)
Browse files Browse the repository at this point in the history
* Update PolynomialSpace.jl

* Update SpacesTest.jl
  • Loading branch information
putianyi889 authored and dlfivefifty committed Jul 2, 2019
1 parent 51f505e commit 77904ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Spaces/PolynomialSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ clenshaw(sp::PolynomialSpace,c::AbstractMatrix,x) = clenshaw(c,x,ClenshawPlan(pr
clenshaw!(sp::PolynomialSpace,c::AbstractVector,x::AbstractVector)=clenshaw!(c,x,ClenshawPlan(promote_type(eltype(c),eltype(x)),sp,length(x)))

function clenshaw(sp::PolynomialSpace,c::AbstractVector,x)
N,T = length(c),promote_type(eltype(c),typeof(x))
N,T = length(c),promote_type(prectype(sp),eltype(c),typeof(x))
TT = eltype(T)
if isempty(c)
return zero(T)
Expand Down
3 changes: 3 additions & 0 deletions test/SpacesTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import ApproxFunBase: space, SpaceOperator,
testfunctional

@testset "Spaces" begin
@testset "evaluate" begin
@test evaluate([1],Legendre(),0)==evaluate([1.0],Legendre(),0)
end
@testset "ChebyshevDirichlet" begin
testtransforms(ChebyshevDirichlet{1,1}())

Expand Down

0 comments on commit 77904ee

Please sign in to comment.