[Ecm-commits] r2577 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Tue Feb 3 07:38:12 CET 2015


Author: zimmerma
Date: 2015-02-03 07:38:12 +0100 (Tue, 03 Feb 2015)
New Revision: 2577

Modified:
   trunk/auxarith.c
   trunk/ecm-impl.h
Log:
removed unused code


Modified: trunk/auxarith.c
===================================================================
--- trunk/auxarith.c	2015-02-02 16:20:18 UTC (rev 2576)
+++ trunk/auxarith.c	2015-02-03 06:38:12 UTC (rev 2577)
@@ -87,47 +87,6 @@
   return k;
 }
 
-
-/* Simple, slow methods for testing / finding primes */
-int 
-is_prime (const unsigned long n)
-{
-  unsigned long i;
-
-  if (n < 2UL)
-    return 0;
-
-  if (n % 2UL == 0UL)
-    return n == 2UL;
-
-  for (i = 3UL; i*i <= n; i += 2UL)
-    if (n % i == 0UL)
-      return 0;
-  
-  return 1;
-}
-
-
-/* Returns the smallest prime larger than n */
-unsigned long
-next_prime (const unsigned long n)
-{
-  unsigned long m;
-
-  if (n < 2UL)
-    return 2UL;
-  
-  if (n == 2UL)
-    return 3UL;
-
-  m = n + 2UL;
-  while (! is_prime (m))
-    m += 2UL;
-
-  return m;
-}
-
-
 /* Returns the smallest prime factor of N. If N == 1, return 1. */
 unsigned long
 find_factor (const unsigned long N)

Modified: trunk/ecm-impl.h
===================================================================
--- trunk/ecm-impl.h	2015-02-02 16:20:18 UTC (rev 2576)
+++ trunk/ecm-impl.h	2015-02-03 06:38:12 UTC (rev 2577)
@@ -681,10 +681,6 @@
 unsigned long eulerphi (unsigned long);
 #define ceil_log2 __ECM(ceil_log2)
 unsigned int  ceil_log2  (unsigned long);
-#define is_prime __ECM(is_prime)
-int           is_prime (const unsigned long);
-#define next_prime __ECM(next_prime)
-unsigned long next_prime (const unsigned long);
 #define find_factor __ECM(find_factor)
 unsigned long find_factor (const unsigned long);
 



More information about the Ecm-commits mailing list