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

Cos returns invalid interval #683

Closed
antoine-levitt opened this issue Oct 2, 2024 · 2 comments · Fixed by #684
Closed

Cos returns invalid interval #683

antoine-levitt opened this issue Oct 2, 2024 · 2 comments · Fixed by #684

Comments

@antoine-levitt
Copy link

Reduced after much effort:

k = [interval(0.0,0.0625), interval(0.0625,0.125), interval(0.0,0.125)]
@show x = (k[1] * 4 + k[2] * 4 + k[3] * 4)
@show cos(2 * π * x)
@show cospi(2x)
x = k[1] * 4 + k[2] * 4 + k[3] * 4 = [0.25, 1.25001]_com_NG
cos(2 * π * x) = [3.06161e-16, 6.12324e-17]_com_NG
cospi(2x) = [-1.0, 1.0]_com_NG

Cos is just plainly wrong here. Cospi appears to be fine.

@OlivierHnt OlivierHnt mentioned this issue Oct 2, 2024
@OlivierHnt
Copy link
Member

Thx for reporting this issue!

@antoine-levitt
Copy link
Author

Thanks for the quick fix!

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 a pull request may close this issue.

2 participants