Skip to content

Commit

Permalink
tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Oct 22, 2023
1 parent 2e2e2ef commit d022e60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/chebyshevtransform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,14 @@ function mul!(y::AbstractArray{T}, P::IChebyshevUTransformPlan{T,1,K,false}, x::
isempty(x) && return y
_plan_mul!(y, P.plan, x)
_ichebu1_postscale!(P.plan.region, y)
for d in P.plan.region
size(y,d) == 1 && lmul!(2, y) # fix doubling
end
y
end

function _ichebu2_rescale!(d::Number, x::AbstractArray{T}) where T
_chebu2_prescale!(d, x)
_chebu2_postscale!(d, x)
ldiv!(2, x)
x
end
Expand Down
4 changes: 2 additions & 2 deletions test/chebyshevtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ using FastTransforms, Test

= x -> [sin((k+1)*acos(x))/sin(acos(x)) for k=0:n-3]' * g
@test (0.1) exp(T(0.1))
@test @inferred(ichebyshevutransform(g, Val(2))) exp.(p_2)
@test @inferred(ichebyshevutransform(g, Val(2))) f exp.(p_2)

fcopy = copy(f)
gcopy = copy(g)
Expand Down Expand Up @@ -418,7 +418,7 @@ using FastTransforms, Test
plan_chebyshevutransform(X,Val(1),2), plan_chebyshevutransform(X, Val(2),2),
plan_ichebyshevutransform(X,Val(1),1), plan_ichebyshevutransform(X, Val(2),1),
plan_ichebyshevutransform(X,Val(1),2), plan_ichebyshevutransform(X, Val(2),2))
@test_broken F \ (F*X) F * (F\X) X
@test F \ (F*X) F * (F\X) X
end
end
end

0 comments on commit d022e60

Please sign in to comment.