summaryrefslogtreecommitdiffstats
path: root/games/primes
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2016-08-31 04:48:43 +0000
committertb <tb@openbsd.org>2016-08-31 04:48:43 +0000
commitd496e19d1130926a2bec10b227d83569f576cddf (patch)
tree582f1b14ccdc36552ce32442849a8ff6fa99f566 /games/primes
parentpool_setipl (diff)
downloadwireguard-openbsd-d496e19d1130926a2bec10b227d83569f576cddf.tar.xz
wireguard-openbsd-d496e19d1130926a2bec10b227d83569f576cddf.zip
Fix a bogus comment: "factors of" -> "coprime to". Replace the
nonsensical "if and only iff" with "if and only if" and zap some trailing whitespace.
Diffstat (limited to 'games/primes')
-rw-r--r--games/primes/pattern.c4
-rw-r--r--games/primes/primes.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/games/primes/pattern.c b/games/primes/pattern.c
index a3e2737f83b..dfce1a35d59 100644
--- a/games/primes/pattern.c
+++ b/games/primes/pattern.c
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -42,7 +42,7 @@
*
* 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[] = {
diff --git a/games/primes/primes.c b/games/primes/primes.c
index b8e2cad0f54..d17bc9e6747 100644
--- a/games/primes/primes.c
+++ b/games/primes/primes.c
@@ -1,4 +1,4 @@
-/* $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 $ */
/*
@@ -64,9 +64,9 @@
/*
* 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.
*/
@@ -75,16 +75,16 @@ char table[TABSIZE]; /* Eratosthenes sieve of odd numbers */
/*
* 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 */