Skip to content

Commit 48aa6eb

Browse files
committed
fix multiplication bug
1 parent 35db45d commit 48aa6eb

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/Spaces/Ultraspherical/UltrasphericalOperators.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Base.stride(M::ConcreteMultiplication{U,V}) where {U<:Ultraspherical,V<:Chebyshe
2626
Base.stride(M::ConcreteMultiplication{U,V}) where {U<:Ultraspherical,V<:Ultraspherical} =
2727
stride(M.f)
2828

29-
@inline function _Multiplication(f::Fun{<:Chebyshev}, sp::Ultraspherical)
29+
@inline function _Multiplication(f::Fun{<:Chebyshev}, sp::Ultraspherical{Int})
3030
if order(sp) == 1
3131
cfs = f.coefficients
3232
MultiplicationWrapper(f,
@@ -40,10 +40,10 @@ Base.stride(M::ConcreteMultiplication{U,V}) where {U<:Ultraspherical,V<:Ultrasph
4040
end
4141
end
4242
@static if VERSION >= v"1.8"
43-
Base.@constprop aggressive Multiplication(f::Fun{<:Chebyshev}, sp::Ultraspherical) =
43+
Base.@constprop aggressive Multiplication(f::Fun{<:Chebyshev}, sp::Ultraspherical{Int}) =
4444
_Multiplication(f, sp)
4545
else
46-
Multiplication(f::Fun{<:Chebyshev}, sp::Ultraspherical) = _Multiplication(f, sp)
46+
Multiplication(f::Fun{<:Chebyshev}, sp::Ultraspherical{Int}) = _Multiplication(f, sp)
4747
end
4848

4949

test/UltrasphericalTest.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,11 @@ using ApproxFunOrthogonalPolynomials: jacobip
153153
end
154154
end
155155
end
156+
157+
@testset "Multiplication" begin
158+
M = Multiplication(Fun(), Ultraspherical(0.5))
159+
f = Fun(Ultraspherical(0.5))
160+
f2 = Fun(x->x^2, Ultraspherical(0.5))
161+
@test M * f f2
162+
end
156163
end

0 commit comments

Comments
 (0)