floordivide.py 509 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# check modulo matches python definition

# This tests compiler version
print(123 // 7)
print(-123 // 7)
print(123 // -7)
print(-123 // -7)

a = 10000001
b = 10000000
print(a // b)
print(a // -b)
print(-a // b)
print(-a // -b)

if True:
    a = 987654321987987987987987987987
    b = 19

    print(a // b)
    print(a // -b)
    print(-a // b)
    print(-a // -b)
    a = 10000000000000000000000000000000000000000000
    b = 100
    print(a // b)
    print(a // -b)
    print(-a // b)
    print(-a // -b)