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)!: Add a lookup table to Numbr.sin to improve trig accuracy #2032

Closed

Conversation

spotandjake
Copy link
Member

This pr adds a lookup table to the sin function which increases the accuracy of sin, cos and tan technically this is breaking as our results are going to be different.

This isn't a long term solution as if we are not using a special angle there is still some inaccuracy, especially as numbers get larger.

work for: #1478

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this inaccurate in the first place?

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this hack. @spotandjake can you fix these correctly by the next community meeting? Otherwise I think we back out the broken math functions for the release

@phated
Copy link
Member

phated commented Feb 22, 2024

Closing this as @spotandjake says he won't be able to implement the full fix before v0.6. Instead, we are removing the functions (which is breaking) so we can re-add them as a non-breaking feature with the full fix.

@phated phated closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants