3ab6aa3a6d
Tests which don't work with small ints are suffixed with _intbig.py. Some of these may still work with long long ints and need to be reclassified later.
14 lines
231 B
Python
14 lines
231 B
Python
# test builtin divmod
|
|
|
|
try:
|
|
divmod(1 << 65, 0)
|
|
except ZeroDivisionError:
|
|
print("ZeroDivisionError")
|
|
|
|
# bignum
|
|
l = (1 << 65) + 123
|
|
print(divmod(3, l))
|
|
print(divmod(l, 5))
|
|
print(divmod(l + 3, l))
|
|
print(divmod(l * 20, l + 2))
|