summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/int_big_add.py
blob: b64b76ff0bfdaf488ccb1111d9e0952c2d2191fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# tests transition from small to large int representation by addition

# 31-bit overflow
i = 0x3fffffff
print(i + i)
print(-i + -i)

# 47-bit overflow
i = 0x3fffffffffff
print(i + i)
print(-i + -i)

# 63-bit overflow
i = 0x3fffffffffffffff
print(i + i)
print(-i + -i)