diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-20 16:28:41 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-20 16:28:41 +0000 |
commit | 2d7ff071755f869bff1814dd886add1fe7000062 (patch) | |
tree | f7b60495037a609b243767fb851e4d59f4a2fc47 /tests/basics/int-big-mod.py | |
parent | c412998c491dcad3d6fa9f7c9797fedaebd25798 (diff) | |
download | micropython-2d7ff071755f869bff1814dd886add1fe7000062.tar.gz micropython-2d7ff071755f869bff1814dd886add1fe7000062.zip |
py: Add mpz modulo operation.
Diffstat (limited to 'tests/basics/int-big-mod.py')
-rw-r--r-- | tests/basics/int-big-mod.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/basics/int-big-mod.py b/tests/basics/int-big-mod.py new file mode 100644 index 0000000000..77c0ffc468 --- /dev/null +++ b/tests/basics/int-big-mod.py @@ -0,0 +1,10 @@ +# test % operation on big integers + +delta = 100000000000000000000000000000012345 + +for i in range(11): + for j in range(11): + x = delta * (i)# - 5) # TODO reinstate negative number test when % is working with sign correctly + y = delta * (j)# - 5) # TODO reinstate negative number test when % is working with sign correctly + if y != 0: + print(x % y) |