[Ecm-commits] r2638 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Thu Feb 26 07:55:40 CET 2015


Author: zimmerma
Date: 2015-02-26 07:55:39 +0100 (Thu, 26 Feb 2015)
New Revision: 2638

Modified:
   trunk/auxi.c
   trunk/testlong.pp1
Log:
improve coverage of auxi.c


Modified: trunk/auxi.c
===================================================================
--- trunk/auxi.c	2015-02-25 15:15:21 UTC (rev 2637)
+++ trunk/auxi.c	2015-02-26 06:55:39 UTC (rev 2638)
@@ -141,14 +141,14 @@
     /* When GPU is not used, the factor should divide n->n */
     if (gpu == 0)
       ASSERT_ALWAYS(mpz_cmp (g, f) == 0);
-    else if (mpz_cmp (g, f) != 0 && gpu != 0 && mpz_cmp_ui (f, 1) == 0)
-    /* On GPU all factors of g were already found */
+    else if (mpz_cmp (g, f) != 0 && mpz_cmp_ui (f, 1) == 0)
+    /* GPU case: all factors of g were already found */
       {
         /* FIXME Maybe print something in very verbose mode */
         mpz_clear (f);
         return returncode;
       }
-    else /* g = f (gpu or not gpu) or g != 1 with gpu */
+    else /* g = f (gpu) or f != 1 */
       {
         if (verbose > 0)
             printf ("********** Factor found in step %u: ", ABS (result));
@@ -182,10 +182,7 @@
       
       /* 1 for display warning if factor does not divide the current 
       candidate */
-      if (gpu)
-          mpcandi_t_addfoundfactor (n, f, 0);
-      else
-          mpcandi_t_addfoundfactor (n, f, 1);
+      mpcandi_t_addfoundfactor (n, f, gpu == 0);
 
       if (resumefile != NULL)
         {

Modified: trunk/testlong.pp1
===================================================================
--- trunk/testlong.pp1	2015-02-25 15:15:21 UTC (rev 2637)
+++ trunk/testlong.pp1	2015-02-26 06:55:39 UTC (rev 2638)
@@ -106,5 +106,9 @@
 
 echo 3960666914072777038869829205072430197479 | $PP1 -x0 5 16534249 21802223243; checkcode $? 8
 
+# check champion number
+echo 884764954216571039925598516362554326397028807829 | $PP1 -x0 1 80105797 2080952771
+checkcode $? 14
+
 echo "All P+1 tests are ok."
 echo ""



More information about the Ecm-commits mailing list