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

Improve the accuracy of the degree unit. #1203

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Mar 1, 2025

Currently the factor of a the base radian unit is hard coded with accuracy to 9 signigicant digits. This changes to computing the factor from the variable $PI defined in Units.pm to be 4 atan2(1, 1) which gives as good of accuracy as can be obtained (seems to be 15 significant digits of accuracy).

I have seen propogation of rounding error occur too frequently with the current estimate. That of course can still happen, but this makes it better at least.

Currently the factor of a the base radian unit is hard coded with
accuracy to 9 signigicant digits. This changes to computing the factor
from the variable `$PI` defined in `Units.pm` to be `4 atan2(1, 1)`
which gives as good of accuracy as can be obtained (seems to be 15
significant digits of accuracy).

I have seen propogation of rounding error occur too frequently with the
current estimate. That of course can still happen, but this makes it
better at least.
@pstaabp pstaabp merged commit 8613565 into openwebwork:develop Mar 4, 2025
3 checks passed
@drgrice1 drgrice1 deleted the degree-unit-more-accurate branch March 4, 2025 01:25
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.

3 participants