-/* $OpenBSD: pattern.c,v 1.5 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: pattern.c,v 1.6 2016/08/31 04:48:43 tb Exp $ */
/* $NetBSD: pattern.c,v 1.3 1995/03/23 08:35:47 cgd Exp $ */
/*
*
* To avoid excessive sieves for small factors, we use the table below to
* setup our sieve blocks. Each element represents a odd number starting
- * with 1. All non-zero elements are factors of 3, 5, 7, 11 and 13.
+ * with 1. All non-zero elements are coprime to 3, 5, 7, 11 and 13.
*/
const char pattern[] = {
-/* $OpenBSD: primes.c,v 1.22 2016/03/07 12:07:56 mestre Exp $ */
+/* $OpenBSD: primes.c,v 1.23 2016/08/31 04:48:43 tb Exp $ */
/* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */
/*
/*
* Eratosthenes sieve table
*
- * We only sieve the odd numbers. The base of our sieve windows are always
- * odd. If the base of table is 1, table[i] represents 2*i-1. After the
- * sieve, table[i] == 1 if and only iff 2*i-1 is prime.
+ * We only sieve the odd numbers. The base of our sieve windows is always odd.
+ * If the base of the table is 1, table[i] represents 2*i-1. After the sieve,
+ * table[i] == 1 if and only if 2*i-1 is prime.
*
* We make TABSIZE large to reduce the overhead of inner loop setup.
*/
/*
* prime[i] is the (i+1)th prime.
*
- * We are able to sieve 2^32-1 because this byte table yields all primes
+ * We are able to sieve 2^32-1 because this byte table yields all primes
* up to 65537 and 65537^2 > 2^32-1.
*/
extern const ubig prime[];
extern const ubig *pr_limit; /* largest prime in the prime array */
/*
- * To avoid excessive sieves for small factors, we use the table below to
- * setup our sieve blocks. Each element represents a odd number starting
- * with 1. All non-zero elements are factors of 3, 5, 7, 11 and 13.
+ * To avoid excessive sieves for small factors, we use the table below to
+ * setup our sieve blocks. Each element represents an odd number starting
+ * with 1. All non-zero elements are coprime to 3, 5, 7, 11 and 13.
*/
extern const char pattern[];
extern const int pattern_size; /* length of pattern array */