parent
cc97446ca5
commit
561e425903
4
py/mpz.c
4
py/mpz.c
@ -213,8 +213,8 @@ STATIC uint mpn_and(mpz_dig_t *idig, const mpz_dig_t *jdig, uint jlen, const mpz
|
|||||||
*idig = *jdig & *kdig;
|
*idig = *jdig & *kdig;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; jlen > 0; --jlen, ++idig) {
|
// remove trailing zeros
|
||||||
*idig = 0;
|
for (; idig > oidig && *idig == 0; --idig) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return idig - oidig;
|
return idig - oidig;
|
||||||
|
8
tests/basics/int-big-and.py
Normal file
8
tests/basics/int-big-and.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
print(0 & (1 << 80))
|
||||||
|
print(0 & (1 << 80) == 0)
|
||||||
|
print(bool(0 & (1 << 80)))
|
||||||
|
|
||||||
|
#a = 0xfffffffffffffffffffffffffffff
|
||||||
|
#print(a & (1 << 80))
|
||||||
|
#print((a & (1 << 80)) >> 80)
|
||||||
|
#print((a & (1 << 80)) >> 80 == 1)
|
Loading…
Reference in New Issue
Block a user