We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f6b745 commit 6da2557Copy full SHA for 6da2557
src/polynomials/chebyshev.jl
@@ -135,7 +135,8 @@ julia> c.(-1:0.5:1)
135
```
136
"""
137
function evalpoly(x::S, ch::ChebyshevT) where {S}
138
- x ∉ domain(ch) && throw(ArgumentError("$x outside of domain"))
+ d = domain(ch)
139
+ x ∉ d && throw(DomainError(x, "evaluation point must lie in $d"))
140
evalpoly(x, ch, false)
141
end
142
test/ChebyshevT.jl
@@ -16,6 +16,8 @@
16
@test size(p, 1) == size(coeff, 1)
17
@test typeof(p).parameters[2] == eltype(coeff)
18
@test eltype(p) == eltype(coeff)
19
+
20
+ @test_throws DomainError p(2)
21
22
23
0 commit comments