DAVID W. DELEY
[.DAVID.PRIMES] (OS independent. Code should be easily transportable
to other systems. Both FORTRAN and
C versions are given.)
Routines for generating prime numbers and for finding the prime
factors of a given number.
FACTOR.FOR - Routine for finding the prime factors of a given
number. (Also provided as FACTOR.C)
NEXTPRIME.FOR - Function to round a number up to the next prime.
See file NEXTPRIME.DOC for further details. (Also
provided as NEXTPRIME.C)
MAKEPRIMES.FOR - Routine which generates all primes up to a specified
number of primes. This uses a modified version of
NEXTPRIME.FOR to generate all primes up to a given
number of primes and print them out on unit #3 (file
FOR003.DAT). Change parameter NUMPRIMES to the
number of primes you wish to generate. (Also provided
as MAKEPRIMES.C)
------------------------------------------------------------------------
THE FILES THEIR PURPOSE
------------------------------------------------------------------------
NEXTPRIME.HTM Documentation on program NEXTPRIME.FOR
FACTOR.FOR Source code - find prime factors
MAKEPRIMES.FOR Source code - round up to next prime
NEXTPRIME.FOR Source code - generate all primes
FACTOR.C Source code (C version) - find prime factors
MAKEPRIMES.C Source code (C version) - round up to next prime
NEXTPRIME.C Source code (C version) - generate all primes