Skip to content

Commit

Permalink
Type-stable ChebyshevT multiplication (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored Sep 13, 2023
1 parent 8ed70d8 commit 9f6b745
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Polynomials"
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
license = "MIT"
author = "JuliaMath"
version = "4.0.3"
version = "4.0.4"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 1 addition & 1 deletion src/polynomials/chebyshev.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function Base.:*(p1::MutableDensePolynomial{B,T,X}, p2::MutableDensePolynomial{B
z2 = _c_to_z(coeffs(p2))
prod = fastconv(z1, z2)
cs = _z_to_c(prod)
ret = ChebyshevT(cs,X)
ret = ChebyshevT(cs, Var(X))
return ret
end

Expand Down
2 changes: 1 addition & 1 deletion test/ChebyshevT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ end
target[abs(i - j) + 1] += 0.5
c1 = ChebyshevT(vcat(zeros(i), 1))
c2 = ChebyshevT(vcat(zeros(j), 1))
@test c1 * c2 ChebyshevT(target)
@test @inferred(c1 * c2) ChebyshevT(target)

# divrem
target = c1 + c2
Expand Down

0 comments on commit 9f6b745

Please sign in to comment.