1# tests transition from small to large int representation by multiplication
2for rhs in range(2, 11):
3    lhs = 1
4    for k in range(100):
5        res = lhs * rhs
6        print(lhs, '*', rhs, '=', res)
7        lhs = res
8
9# below tests pos/neg combinations that overflow small int
10
11# 31-bit overflow
12i = 1 << 20
13print(i * i)
14print(i * -i)
15print(-i * i)
16print(-i * -i)
17
18# 63-bit overflow
19i = 1 << 40
20print(i * i)
21print(i * -i)
22print(-i * i)
23print(-i * -i)
24