summaryrefslogtreecommitdiffstats
path: root/primes/primes.h
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1995-03-23 08:28:00 +0000
committercgd <cgd@NetBSD.org>1995-03-23 08:28:00 +0000
commit94b5353c71e7246077d468afe68d51ce85fc213d (patch)
tree0b6f70b8110f5d6650a6083460424df854c415f8 /primes/primes.h
parent1c0b80f0fe7a28cd947ace3e69f5fd2ac8ed47cb (diff)
downloadbsdgames-darwin-94b5353c71e7246077d468afe68d51ce85fc213d.tar.gz
bsdgames-darwin-94b5353c71e7246077d468afe68d51ce85fc213d.tar.zst
bsdgames-darwin-94b5353c71e7246077d468afe68d51ce85fc213d.zip
merge with Lite, new RCS id conventions, etc.
Diffstat (limited to 'primes/primes.h')
-rw-r--r--primes/primes.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/primes/primes.h b/primes/primes.h
index 72504c75..3197d271 100644
--- a/primes/primes.h
+++ b/primes/primes.h
@@ -1,6 +1,8 @@
+/* $NetBSD: primes.h,v 1.4 1995/03/23 08:35:58 cgd Exp $ */
+
/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Landon Curt Noll.
@@ -33,25 +35,20 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * from: @(#)primes.h 5.2 (Berkeley) 6/1/90
- * $Id: primes.h,v 1.3 1994/03/01 01:07:51 cgd Exp $
+ * @(#)primes.h 8.2 (Berkeley) 3/1/94
*/
/*
* primes - generate a table of primes between two values
*
- * By: Landon Curt Noll chongo@toad.com, ...!{sun,tolsoft}!hoptoad!chongo
+ * By: Landon Curt Noll chongo@toad.com, ...!{sun,tolsoft}!hoptoad!chongo
*
- * chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\
+ * chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\
*/
/* ubig is the type that holds a large unsigned value */
-typedef unsigned long ubig; /* must be >=32 bit unsigned value */
+typedef unsigned long ubig; /* must be >=32 bit unsigned value */
+#define BIG ULONG_MAX /* largest value will sieve */
-/*
- * sieve parameters
- */
-#define BIG ULONG_MAX /* highest value we will sieve */
-#define SEMIBIG ((ubig)LONG_MAX) /* highest signed value */
-#define NEG_SEMIBIG ((ubig)LONG_MIN) /* lowest signed value */
-#define TABSIZE 256*1024 /* bytes in sieve table (must be > 3*5*7*11) */
+/* bytes in sieve table (must be > 3*5*7*11) */
+#define TABSIZE 256*1024