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 constant divisions #89

Merged
merged 1 commit into from
Mar 11, 2025
Merged

fix constant divisions #89

merged 1 commit into from
Mar 11, 2025

Conversation

anzdaddy
Copy link
Member

@anzdaddy anzdaddy commented Mar 11, 2025

Constant divisions were optimised using multiplications, but the result was sometimes off in the least significant digit. Reverting to a slower but more precise algo.

Also fix a bug in divrem64, which checked the wrong input for lo == 0. This was previously benign, since the input and output arguments were always the same variable.

@anzdaddy anzdaddy merged commit 514601a into master Mar 11, 2025
3 checks passed
@anzdaddy anzdaddy deleted the fix-div branch March 11, 2025 05:10
anzdaddy added a commit that referenced this pull request Mar 11, 2025
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.

1 participant