[Ecm-commits] r2587 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Sat Feb 7 11:31:08 CET 2015


Author: zimmerma
Date: 2015-02-07 11:31:07 +0100 (Sat, 07 Feb 2015)
New Revision: 2587

Modified:
   trunk/b1_ainc.c
   trunk/ecm-ecm.h
   trunk/ecm.1
   trunk/main.c
Log:
removed -i option


Modified: trunk/b1_ainc.c
===================================================================
--- trunk/b1_ainc.c	2015-02-07 10:07:53 UTC (rev 2586)
+++ trunk/b1_ainc.c	2015-02-07 10:31:07 UTC (rev 2587)
@@ -20,11 +20,9 @@
 #include "ecm-ecm.h"
 #include <math.h>
 
-/* return a new value of B1:
-   if calcInc = 0 (-i n option), return cur_B1 + incB1val
-   if calcInc = 1 (-I f option), return cur_B1 + incB1val * sqrt(cur_B1) */
+/* return a new value of B1: cur_B1 + incB1val * sqrt(cur_B1) */
 double
-calc_B1_AutoIncrement (double cur_B1, double incB1val, int calcInc)
+calc_B1_AutoIncrement (double cur_B1, double incB1val)
 {
-  return cur_B1 + ((calcInc == 0) ? incB1val : incB1val * sqrt (cur_B1));
+  return cur_B1 + incB1val * sqrt (cur_B1);
 }

Modified: trunk/ecm-ecm.h
===================================================================
--- trunk/ecm-ecm.h	2015-02-07 10:07:53 UTC (rev 2586)
+++ trunk/ecm-ecm.h	2015-02-07 10:31:07 UTC (rev 2587)
@@ -115,7 +115,7 @@
 #define FREE_PRIME_TABLE -1.0
 
 /* b1_ainc.c */
-double calc_B1_AutoIncrement(double cur_B1, double incB1val, int calcInc);
+double calc_B1_AutoIncrement(double cur_B1, double incB1val);
 
 /* resume.c */
 int  read_resumefile_line (int *, mpz_t, mpz_t, mpcandi_t *, 

Modified: trunk/ecm.1
===================================================================
--- trunk/ecm.1	2015-02-07 10:07:53 UTC (rev 2586)
+++ trunk/ecm.1	2015-02-07 10:31:07 UTC (rev 2587)
@@ -355,15 +355,6 @@
 curves for the second one and so on\&. This is the default mode with standard input\&.
 .RE
 .PP
-\fB\-i \fR\fB\fIn\fR\fR
-.RS 4
-In loop mode, increment
-\fIB1\fR
-by
-\fIn\fR
-after each curve\&.
-.RE
-.PP
 \fB\-I \fR\fB\fIn\fR\fR
 .RS 4
 In loop mode, multiply

Modified: trunk/main.c
===================================================================
--- trunk/main.c	2015-02-07 10:07:53 UTC (rev 2586)
+++ trunk/main.c	2015-02-07 10:31:07 UTC (rev 2587)
@@ -126,7 +126,6 @@
     printf ("  -maxmem n    use at most n MB of memory in stage 2\n");
     printf ("  -stage1time n add n seconds to ECM stage 1 time (for expected time est.)\n");
 
-    printf ("  -i n         increment B1 by this constant on each run\n");
     printf ("  -I f         increment B1 by f*sqrt(B1) on each run\n");
     printf ("  -inp file    Use file as input (instead of redirecting stdin)\n");
     printf ("  -one         Stop processing a candidate if a factor is found (looping mode)\n");
@@ -382,7 +381,6 @@
   int resume_wasPrp = 0; /* 1 if resume_lastN/resume_lastfac is a PRP */
   int primetest = 0, saveappend = 0;
   double autoincrementB1 = 0.0, startingB1;
-  unsigned int autoincrementB1_calc = 0;
   unsigned int count = 1; /* number of curves for each number */
   unsigned int cnt = 0;   /* number of remaining curves for current number */
   int deep=1;
@@ -712,21 +710,9 @@
 	  argv += 2;
 	  argc -= 2;
 	}
-      else if ((argc > 2) && (strcmp (argv[1], "-i") == 0))
-	{
-	  autoincrementB1 = strtod (argv[2], NULL);
-	  if (autoincrementB1 < 1.0)
-	    {
-	      fprintf (stderr, "Error, the -i n option requires n >= 1\n");
-	      exit (EXIT_FAILURE);
-  	    }
-	  argv += 2;
-	  argc -= 2;
-	}
       else if ((argc > 2) && (strcmp (argv[1], "-I") == 0))
 	{
 	  autoincrementB1 = strtod (argv[2], NULL);
-	  autoincrementB1_calc = 1;
 	  if (autoincrementB1 <= 0.0)
 	    {
 	      fprintf (stderr, "Error, the -I f option requires f > 0\n");
@@ -1542,8 +1528,7 @@
       if (autoincrementB1 > 0.0)
         {
           double NewB1;
-          NewB1 = calc_B1_AutoIncrement (B1, autoincrementB1, 
-                                                        autoincrementB1_calc);
+          NewB1 = calc_B1_AutoIncrement (B1, autoincrementB1);
           if (mpz_cmp_d (B2min, B1) <= 0) /* <= might be better than == */
               mpz_set_d (B2min, NewB1);
           B1 = NewB1;



More information about the Ecm-commits mailing list