diff options
Diffstat (limited to 'tests/test3.lua')
-rw-r--r-- | tests/test3.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test3.lua b/tests/test3.lua index aeea660..f52099b 100644 --- a/tests/test3.lua +++ b/tests/test3.lua @@ -7,4 +7,10 @@ function test3() if z == 6912 then error "bigint2" end -- this is the proper comparison. if z ~= BigInt.new(6912) then error "bigint3" end + + x = BigInt.new "2570928358736459287364501827645832746923875623845" + y = BigInt.new "52934875203984750192837512983750192582348756" + local m = BigInt.new "6971908475092834619032845610238976458374561729345017823461297384" + z = x:modpow(y, m) + if tostring(z) ~= "2205750725547192694097770347478670564947020421824213327486286017" then error "bigint4" end end |