micropython/tests/basics/int_divmod_intbig.py

10 lines
167 B
Python

# test integer floor division and modulo
# this tests bignum modulo
a = 987654321987987987987987987987
b = 19
print(a % b)
print(a % -b)
print(-a % b)
print(-a % -b)