int_big_add.py 268 B

12345678910111213141516
  1. # tests transition from small to large int representation by addition
  2. # 31-bit overflow
  3. i = 0x3fffffff
  4. print(i + i)
  5. print(-i + -i)
  6. # 47-bit overflow
  7. i = 0x3fffffffffff
  8. print(i + i)
  9. print(-i + -i)
  10. # 63-bit overflow
  11. i = 0x3fffffffffffffff
  12. print(i + i)
  13. print(-i + -i)