Skip to content

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