diff options
| author | Rachel Dowdall <rjdowdall@gmail.com> | 2014-03-22 20:19:24 +0000 |
|---|---|---|
| committer | Rachel Dowdall <rjdowdall@gmail.com> | 2014-03-22 20:19:24 +0000 |
| commit | 56402796d87f75fbb9e42fc9e3c0adc027fb7c98 (patch) | |
| tree | 0e0c0b1effb4a86ec2f5c0326626db2061f3cb8a /tests/basics/modulo.py | |
| parent | cde8631f15db9941986f8d04534e52462a76094b (diff) | |
Fixed floor division on mp ints and small ints. Added a floordivide test case.
Diffstat (limited to 'tests/basics/modulo.py')
| -rw-r--r-- | tests/basics/modulo.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/basics/modulo.py b/tests/basics/modulo.py index ce7ed2578..4d83db6ec 100644 --- a/tests/basics/modulo.py +++ b/tests/basics/modulo.py @@ -1,5 +1,5 @@ # check modulo matches python definition - +# This test compiler version print(123 % 7) print(-123 % 7) print(123 % -7) @@ -7,7 +7,6 @@ print(-123 % -7) a = 321 b = 19 - print(a % b) print(a % -b) print(-a % b) @@ -21,3 +20,17 @@ print(a % b) print(a % -b) print(-a % b) print(-a % -b) + +if False: + print(1.23456 % 0.7) + print(-1.23456 % 0.7) + print(1.23456 % -0.7) + print(-1.23456 % -0.7) + + a = 1.23456 + b = 0.7 + print(a % b) + print(a % -b) + print(-a % b) + print(-a % -b) + |
