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

More precision required for intermediate terms #17

Open
div5252 opened this issue Aug 20, 2021 · 3 comments
Open

More precision required for intermediate terms #17

div5252 opened this issue Aug 20, 2021 · 3 comments

Comments

@div5252
Copy link
Collaborator

div5252 commented Aug 20, 2021

Consider the following failing test -

a = real("3.11");
result = real::acos(real::cos(a));  // acos(cos(3.11)) = 3.110000000000000
lower_limit = real("3.109999999999999");
upper_limit = real("3.110000000000001");
CHECK(result > lower_limit);
CHECK(result < upper_limit);

There is loss of precision while computing Taylor expansion and using divide and conquer approach. So it is necessary to call the intermediate terms with more precision in math functions.

@Parna2000
Copy link

I can fix this issue. Please assign me this issue and allow me to work on it @div5252

@div5252
Copy link
Collaborator Author

div5252 commented Oct 23, 2021

There is no need for me to assign the issue. You can work on it and make a PR.

@GYuvanShankar
Copy link

GYuvanShankar commented Jan 16, 2022

This could be due to calling the sin functions with same precision as that of the number itself. For eg.
auto [sin_lower, cos_lower] = sin_cos(ro.get_lhs_itr().get_interval().lower_bound.up_to(_precision, false), _precision, false);
I think calling functions with higher precision should help with this issue.

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

No branches or pull requests

3 participants