summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/builtin_divmod_intbig.py
blob: 758e834151ef5291d0ada6d7c5789314aee78015 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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))