From 379829cb2ac6ab1e6f23ee5b5bfa16c96f111c3a Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 9 Nov 2019 00:41:46 +0000 Subject: [PATCH] math/t/{mpx,mpmont}: Add some extra tests for flushing out `mul4' bugs. --- math/t/mpmont | 10 ++++++++++ math/t/mpx | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/math/t/mpmont b/math/t/mpmont index d6539636..eef6a236 100644 --- a/math/t/mpmont +++ b/math/t/mpmont @@ -30,6 +30,11 @@ mul { 4309747041023999857206910900081 4309747041023999857206910900081; + 170141183460469231731687303715884105727 + 2 + 2 + 4; + 6277101735386680763835789423207666416083908700390324961279 2455155546008943817740293915197451784769108058161191238065 340282366920938463500268095579187314689 @@ -50,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 diff --git a/math/t/mpx b/math/t/mpx index f5caed27..39a58cc4 100644 --- a/math/t/mpx +++ b/math/t/mpx @@ -637,6 +637,12 @@ umul { 6c03f5958677efd383509141bf257375 03bbd76f19ba19e3f255c24063f6384d4ac913d9e582392589a525195bcc547c; + # --- Slightly larger test for mul4 --- + + b9d339d524b35abfa21cb0c129ca1800c2286025af766b8b3296495bf1013104 + c8c7133a4bc7978ef439dc5607715d7f0f23d3d6d6bc704535bef33bb1dff7f0 + 91bd86557783557ba3fa69cfff6453f930b4db501c21317c8bd10c76c321ee2736b6a565c36bd42e2a6ea27495d182f0c4730b604a1e5c01c82a56938de4cfc0; + # --- Karatsuba regression --- # # This bug was caused by kmul (a) choosing the split point too low on -- 2.11.0