Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw DomainError for out-of-domain evaluation #538

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Sep 13, 2023

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
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

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

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

Additional details and impacted files
@@            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 Coverage Δ
src/polynomials/chebyshev.jl 93.64% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jverzani jverzani merged commit 6da2557 into JuliaMath:master Sep 13, 2023
20 of 21 checks passed
@jverzani
Copy link
Member

Thank you!

@jishnub jishnub deleted the domainerrorchebyshev branch September 13, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants