You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I use a combination of multiplication and bitwise Negationm, the following output function will not work correctly.
Here is an example.
def void main(){
uint32_bl a = 32u;
uint32_bl b = 31u;
output(CLIENT, b);
uint32_bl c = (~ (b * 73u)); (*The statement that triggers output error*)
output(CLIENT, c); (*The output shows a random number*)
output(CLIENT, a); (*The output shows a random number*)
output(CLIENT, b); (*The output shows b + 1, however, no mutation of b should happen*)
output(CLIENT, b); (*The output now works correctly*)
}
The output is shown below.
Value of b:
31
Value of c:
3258983666
Value of a:
1035981765
Value of b:
32
Value of b:
31
It seems that this problem is triggered by a specific combination of operations. If a combination of addition and bitwise negation is applied, there will be no unexpected behavior. Could you help me by explaining this?
The text was updated successfully, but these errors were encountered:
Hi, when I use a combination of multiplication and bitwise Negationm, the following output function will not work correctly.
Here is an example.
The output is shown below.
It seems that this problem is triggered by a specific combination of operations. If a combination of addition and bitwise negation is applied, there will be no unexpected behavior. Could you help me by explaining this?
The text was updated successfully, but these errors were encountered: