From 50f6ca146c0b810982ad5b42eea84ee0b6d26f8a Mon Sep 17 00:00:00 2001 From: Ajax Date: Fri, 13 Jan 2017 17:26:52 +0100 Subject: Modint: add tests for big int --- test/expression/modint.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/expression/modint.py') diff --git a/test/expression/modint.py b/test/expression/modint.py index f353bc21..17c12907 100644 --- a/test/expression/modint.py +++ b/test/expression/modint.py @@ -61,3 +61,12 @@ assert(c % -3 == 1) print e + c, c + e, c - e, e - c print 1000 * a print hex(a) + +define_int(128) +define_uint(128) +h = uint128(0x11223344556677889900AABBCCDDEEFF) +i = int128(-0x9900AABBCCDDEEFF1122334455667788) + +assert(i / h == 6) +assert(i % h == 0x3221aa32bb43cd58d9cc54dd65ee7e) + -- cgit 1.4.1