Skip to content

Commit 3de2cec

Browse files
committed
promote types in cjt (#37)
1 parent c0e4a54 commit 3de2cec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cjt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ given the Jacobi expansion coefficients ``c`` with parameters ``\alpha`` and ``\
120120
{\rm CJT} : \sum_{n=0}^N c_n^{\rm jac}P_n^{(\alpha,\beta)}(x) \to \sum_{n=0}^N c_n^{\rm cheb}T_n(x).
121121
```
122122
"""
123-
cjt(c,α,β) = plan_cjt(c,α,β)*c
123+
cjt(c::AbstractVector{T},α,β) where T = plan_cjt(c,real(T)(α),real(T)(β))*c
124124

125125
doc"""
126126
Computes the Jacobi expansion coefficients with parameters ``\alpha`` and ``\beta``

test/chebyshevjacobitests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ using Compat.Test
121121
cL32 = cjt(c32,0.f0,0.f0)
122122

123123
@test norm(cL32-cL64,Inf) < 20eps(Float32)
124+
@test cL32 == cjt(c32,0.,0.)
124125

125126
println("Testing for Matrix of coefficients")
126127

0 commit comments

Comments
 (0)