We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
In the following code:
int calc(int x) { return ((x ~% -3) <= 0); } int calc3(int x, int y, int z) { return ((x ~% y) <= z); }
calling calc(1) produces -1 (meaning true). But calling calc3(1,-3,0) produces 0 (meaning false).
calc(1)
-1
true
calc3(1,-3,0)
0
false
It was expected that calc(1) = calc3(1,-3,0), since calc is just a specialization of calc3.
calc(1) = calc3(1,-3,0)
calc
calc3
The text was updated successfully, but these errors were encountered:
The same happens with comparison operators: <=>, !=, and ==. The following expressions also produce differing results:
<=>
!=
==
((x ~% -3) <=> 1)
((x ~% y) <=> z)
cal3
calc(1) = -1
calc3(1,-3,1) = 0
((x ~% -3) != 1)
((x ~% y) != z)
((x ~% -3) == 1)
((x ~% y) == z)
calc(1) = 0
calc3(1,-3,1) = -1
Sorry, something went wrong.
No branches or pull requests
In the following code:
calling
calc(1)
produces-1
(meaningtrue
). But callingcalc3(1,-3,0)
produces0
(meaningfalse
).Expected behavior
It was expected that
calc(1) = calc3(1,-3,0)
, sincecalc
is just a specialization ofcalc3
.The text was updated successfully, but these errors were encountered: