diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2016-08-31 04:48:44 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2016-08-31 04:48:44 +0000 |
commit | e5330475929b10f2a15f0d7eb005e6f0dc461715 (patch) | |
tree | 05600692b7b531af1e15ddc90a9ad41b081f138b | |
parent | 2422c38fcb38f3544567eea9a84a9991a83e7b78 (diff) |
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.
-rw-r--r-- | games/primes/pattern.c | 4 | ||||
-rw-r--r-- | games/primes/primes.c | 16 |
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 */ |