Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPerformance optimization of &-operator causes miscalculation #3258
Comments
|
Right, looks like there was a test missing for negative numbers. PR welcome. |
Commit 6d9daa0 causes a wrong result to be calculated in the example below. There seems to be something with the negative number, which makes it act unexpectedly.
This code snippet prints
1:Before the commit, the code above would print
255, which is also the case in CPython and PyPy without Cython.