Add some regression tests.
[u/mdw/catacomb] / tests / mpmont
index a537ede..d7fc0af 100644 (file)
@@ -1,6 +1,6 @@
 # Test vectors for Montgomery reduction
 #
-# $Id: mpmont,v 1.4 1999/11/23 00:06:17 mdw Exp $
+# $Id: mpmont,v 1.6 2002/01/13 13:43:20 mdw Exp $
 
 create {
   340809809850981098423498794792349    # m
@@ -14,6 +14,11 @@ mul {
   234324324
   6456542564
   10807149256;
+
+  51518627314818829164222247085233898246715229794943812733936714788310185005015428803253311691709787911812368198649776769324928993075889524373913555618270874746833913595051625422038974326537979654635530320271853851973343513053953211672797425464186157719021174955241645388345195723368057041032310152242301620397
+  7041548659011846562361842096561083537784928869240554198760844555642215260669458833049231069318370838770180094409088437631986867239713464317243824963669990014087444248250948204574690463940534304651099653802302150197753463246181762684347288736386534346725039618007392334267637262008343417972878515511486456037
+  21451817224897484023627307128311082613304580637202546848860538836010530320943159719981586919811151828606838777812233053319458755053306547823820900602281867134174742586071226220962576712633552196944784360512851517812225731562588375896089193406088239903885470354101095713609394462435076126493339021945199401247
+  48192532305912989641372170084506981675917951543147719789775743631071830656350879578731578070582102149232280305157616093002880139716311910835926678896882798493523792373475521651115163420137602661060123597773253524671874189844988793471524978853764238038494563159505836018994860909028653670132922744758133798212;
 }
 
 exp {
@@ -70,6 +75,13 @@ exp {
   25906467774034212974484417859588980567136610347807401817990462701
   514778499400157641662814932021958856708417966520837469125919104431
   123456789012345678901234567890123456789012345678901234567890;
+
+  # --- Regression ---
+
+  3986624077014487421577005607434178981611827907415414229383186257799185035259267946499319317546248903815958429965343062841026732183070884484415037389112766124480881891335541864933360040451772640848433986354946570483859801429553601029855169093153120649968457991955067742589996787220443833463413655161718521778024152687493646856649224308444934694934177848997119462792993163729623894124424825605063456003809024630116233635811919734143467917391222413748618664640084816819791040047135721631646389562380726980090637225607902904093720467390446340147754975063914238763877962986901317873962501987398883284691263121949707967483
+  2169501609694605731113683435915932024263931111070470928071742781553833481227229665038394569450673541955381439893533586899516369125587996614390351130855433932967123352056637148142399218614659226596196082977912512097782590337133839376057748669786776861900003976657975002808400242688631641605350346310303557783077961976578644612942618488786721156576047036803063809499458142391930097492829437793780428298460587910313123127299017105180518995858168981798364124607742910479678852164938149352363613709839015911625193499208078080300810729238501127706236236987807659841302058153641198634312186169690290317377895433013774581020
+  51190650099377934681679689372059155651634030541122059023228371179527051284414
+  2182336244564627050476203952083643687109210844491929333865487949231032236266424033053219865356293652087346833773990958617081657598928894294027838097457060132084513275728637155311686562443969707442331856969523833049082440569661820589637161378175422424940183890787723213162895088451684485064228413121825045190532424942855250521728705814032313019282814300698512615465322506857392325469773301168485302267577566759375501214494771698910873834970265937979350795050000891405548412798945017578510891723221844676960980502437259841806090144299798005080365645221451715661064400809603224286845878809241930399832108000526121054958;
 }
 
 # --- Simultaneous exponentiation ---