Skip to content

Commit ace0678

Browse files
authored
UInt exponents in JacobiWeight defaultConversion (#90)
1 parent 9fe3832 commit ace0678

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/JacobiWeightOperators.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,23 +306,26 @@ conversion_rule(A::JacobiWeight, B::Space{<:IntervalOrSegmentDomain}) =
306306
function defaultConversion(A::JacobiWeight{<:Any,<:IntervalOrSegmentDomain},
307307
B::JacobiWeight{<:Any,<:IntervalOrSegmentDomain})
308308

309-
@assert isapproxinteger(A.β-B.β) && isapproxinteger(A.α-B.α)
309+
Aβ, Aα = A.β, A.α
310+
Bβ, Bα = B.β, B.α
310311

311-
if isapprox(A.β,B.β) && isapprox(A.α,B.α)
312+
@assert isapproxinteger(Aβ-Bβ) && isapproxinteger(Aα-Bα)
313+
314+
if isapprox(Aβ,Bβ) && isapprox(Aα,Bα)
312315
ConversionWrapper(SpaceOperator(Conversion(A.space,B.space),A,B))
313316
else
314-
@assert A.βB.β && A.αB.α
317+
@assert &&
315318
# first check if a multiplication by JacobiWeight times B.space is overloaded
316319
# this is currently designed for Jacobi multiplied by (1-x), etc.
317-
βdif,αdif=round(Int,A.β-B.β),round(Int,A.α-B.α)
320+
βdif,αdif=round(Int,-),round(Int,-)
318321
d=domain(A)
319322
M=Multiplication(jacobiweight(βdif,αdif,d), A.space)
320323

321324
if rangespace(M)==JacobiWeight(βdif,αdif,A.space)
322325
# M is the default, so we should use multiplication by polynomials instead
323326
x=Fun(identity,d)
324327
y=mobius(d,x) # we use mobius instead of tocanonical so that it works for Funs
325-
m=(1+y)^βdif*(1-y)^αdif
328+
m = (1+y)^UInt(βdif) * (1-y)^UInt(αdif)
326329
MC=promoterangespace(Multiplication(m,A.space), B.space)
327330

328331
ConversionWrapper(SpaceOperator(MC,A,B))# Wrap the operator with the correct spaces

0 commit comments

Comments
 (0)