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

shakewake: Slightly improve accuracy #1726

Conversation

FintasticMan
Copy link
Member

@FintasticMan FintasticMan commented Apr 5, 2023

The (accumulated) speed was calculated by dividing first and multiplying/adding after, which results in more rounding errors than if you multiply/add first and then divide. The values aren't big enough to overflow.

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

Build size and comparison to main:

Section Size Difference
text 409252B -16B
data 996B 0B
bss 63356B 0B

@FintasticMan FintasticMan added the maintenance Background work label Apr 5, 2023
@FintasticMan FintasticMan requested a review from a team April 5, 2023 08:52
@JF002
Copy link
Collaborator

JF002 commented Apr 16, 2023

@FintasticMan What improvement does this PR bring to the user? Or how should we test it?

@FintasticMan
Copy link
Member Author

This change doesn't affect the user much, if at all. It's just a small change that makes the maths closer what was intended according to the comment in the code.

@FintasticMan FintasticMan force-pushed the improve_shakewake_accuracy branch from 1e2f58f to 68aa58c Compare May 21, 2023 11:31
@FintasticMan FintasticMan force-pushed the improve_shakewake_accuracy branch from 68aa58c to 0009e03 Compare June 17, 2023 16:09
The accumulated speed was calculated by dividing first and multiplying
after, which results in more rounding errors than if you multiply first
and then divide. The values aren't big enough to overflow.
@FintasticMan FintasticMan force-pushed the improve_shakewake_accuracy branch from 0009e03 to 00a59e8 Compare June 25, 2023 14:21
@FintasticMan
Copy link
Member Author

Merged with #826.

@FintasticMan FintasticMan added this to the 1.14.0 milestone Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Background work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants