summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/int_big_zeroone.py
Commit message (Collapse)AuthorAge
* py/mpz: Fix bugs with bitwise of -0 by ensuring all 0's are positive.Damien George2021-12-21
| | | | | | | | | | | | | This commit makes sure that the value zero is always encoded in an mpz_t as neg=0 and len=0 (previously it was just len=0). This invariant is needed for some of the bitwise operations that operate on negative numbers, because they cannot handle -0. For example (-((1<<100)-(1<<100)))|1 was being computed as -65535, instead of 1. Fixes issue #8042. Signed-off-by: Damien George <damien@micropython.org>
* py: Fix comparison of minus-zero long int.Damien George2015-01-27
|
* py: Fix rshift and not of zero/one edge cases in mpz.Damien George2014-12-31
Addresses issue #1027.