X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/0e70bd46b0d4f50d5ec23e23e646d58f5ba0b23d..551a5729aff083d8cc56c092dacc9936e96a1435:/math/t/mpmont diff --git a/math/t/mpmont b/math/t/mpmont index 81fbe634..eef6a236 100644 --- a/math/t/mpmont +++ b/math/t/mpmont @@ -1,5 +1,12 @@ # Test vectors for Montgomery reduction +mul { + 6277101735386680763835789423207666416083908700390324961279 + 2455155546008943817740293915197451784769108058161191238065 + 340282366920938463500268095579187314689 + 5646741895976341600220572388698743135318229029826089708489; +} + create { 340809809850981098423498794792349 # m 266454859 # -m^{-1} mod b @@ -18,6 +25,16 @@ mul { 6456542564 10807149256; + 4325987397987458979875737589783 + 1 + 4309747041023999857206910900081 + 4309747041023999857206910900081; + + 170141183460469231731687303715884105727 + 2 + 2 + 4; + 6277101735386680763835789423207666416083908700390324961279 2455155546008943817740293915197451784769108058161191238065 340282366920938463500268095579187314689 @@ -38,6 +55,11 @@ exp { 8745435676786567758678547 2439674515119108242643169132064; + 170141183460469231731687303715884105727 + 2 + 170141183460469231731687303715884105727 + 2; + # --- Bizarre bug --- # # This was caused by omission of the test-and-subtract step in the