JuliaMath / Polynomials.jl

Polynomial manipulations in Julia
http://juliamath.github.io/Polynomials.jl/
Other
303 stars 75 forks source link

Throw DomainError for out-of-domain evaluation #538

Closed jishnub closed 1 year ago

jishnub commented 1 year ago

This PR changes ArgumentError to DomainError when ChebyshevT is evaluated outside the domain.

julia> x = ChebyshevT([0,1]);

julia> x(2)
ERROR: DomainError with 2:
evaluation point must lie in [-1..1]
[...]
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.13% :tada:

Comparison is base (8ed70d8) 75.51% compared to head (49e1230) 75.64%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #538 +/- ## ========================================== + Coverage 75.51% 75.64% +0.13% ========================================== Files 38 38 Lines 3998 3999 +1 ========================================== + Hits 3019 3025 +6 + Misses 979 974 -5 ``` | [Files Changed](https://app.codecov.io/gh/JuliaMath/Polynomials.jl/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMath) | Coverage Δ | | |---|---|---| | [src/polynomials/chebyshev.jl](https://app.codecov.io/gh/JuliaMath/Polynomials.jl/pull/538?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMath#diff-c3JjL3BvbHlub21pYWxzL2NoZWJ5c2hldi5qbA==) | `93.64% <100.00%> (+0.03%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/JuliaMath/Polynomials.jl/pull/538/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaMath)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jverzani commented 1 year ago

Thank you!