[Ecm-commits] r958 - trunk

ecm-commits at lists.gforge.inria.fr ecm-commits at lists.gforge.inria.fr
Tue Dec 12 13:32:34 CET 2006


Author: zimmerma
Date: 2006-12-12 12:32:34 +0000 (Tue, 12 Dec 2006)
New Revision: 958

Modified:
   trunk/mpmod.c
Log:
moved "using special division" from mpmod_init to mpmod_init_base2
(the latter is called directly from ecm.c, thus the message was not
displayed, as noticed by Peter Montgomery)


Modified: trunk/mpmod.c
===================================================================
--- trunk/mpmod.c	2006-10-10 10:45:57 UTC (rev 957)
+++ trunk/mpmod.c	2006-12-12 12:32:34 UTC (rev 958)
@@ -431,13 +431,10 @@
 mpmod_init (mpmod_t modulus, mpz_t N, int repr)
 {
   int base2;
-  
+
   if ((repr != -1) && (base2 = isbase2 (N, BASE2_THRESHOLD)))
     {
       int r;
-      outputf (OUTPUT_VERBOSE,
-	       "Using special division for factor of 2^%d%c1\n",
-	       abs (base2), (base2 < 0) ? '-' : '+');
       r = mpmod_init_BASE2 (modulus, base2, N);
       ASSERT (r == 0); /* error should not happen if isbase2 is correct */
     }
@@ -481,6 +478,9 @@
 {
   int Nbits;
   
+  outputf (OUTPUT_VERBOSE,
+           "Using special division for factor of 2^%d%c1\n",
+           abs (base2), (base2 < 0) ? '-' : '+');
   mpz_init_set (modulus->orig_modulus, N);
   modulus->repr = ECM_MOD_BASE2;
   modulus->bits = base2;






More information about the Ecm-commits mailing list