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

fix(stdlib): Correct sign bit in _rempio when computing trig reduction #2181

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

spotandjake
Copy link
Member

@spotandjake spotandjake commented Oct 25, 2024

I noticed that we were getting a little bit of extra error when computing trig functions, which I traced the values against the c implementation I noticed that the sign bit was not working correctly, this changes the sign to be calculated before clearing the high bits.

For anyone concerned this was not affecting accuracy very much compared to most use cases of trig functions but it is important that we are producing an accurate output if we are using the trig functions to compute other math functions where the error stacks more.

@ospencer ospencer added this pull request to the merge queue Oct 26, 2024
Merged via the queue into grain-lang:main with commit 6a78502 Oct 26, 2024
12 checks passed
@github-actions github-actions bot mentioned this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants