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 f128 remainder division bug #1142

Merged
merged 1 commit into from Jun 20, 2018
Merged

fix f128 remainder division bug #1142

merged 1 commit into from Jun 20, 2018

Conversation

bnoordhuis
Copy link
Contributor

The modulo operation computed rem(b+rem(a,b), b) which produces -1
for a=1 and b=2.

Switch to a - b * trunc(a/b) which produces the expected result, 1.

closes #1137

The modulo operation computed rem(b+rem(a,b), b) which produces -1
for a=1 and b=2.

Switch to a - b * trunc(a/b) which produces the expected result, 1.

closes #1137
@andrewrk andrewrk merged commit eb6a8e6 into ziglang:master Jun 20, 2018
@andrewrk
Copy link
Member

wonderful, thank you very much

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.

comptime f128 remainder division doesn't work
2 participants