

                            Users Documention Guide
                               for: SIEVE.EXE


-=HOW THE PROGRAM WORKS=-
Seive is one of the faster programs I have made.  This program is used to
generate a list of prime numbers provided a list of prime numbers up to the
32 prime number is already available.  This will be explained in the prime
method section.  The file "PRIMES.LST" must exist and contain at least the
first 32 prime numbers for SIEVE.EXE to work.  After typing in "SIEVE.EXE"
at the dos prompt, Sieve begins to generate a list of prime numbers VERY
FAST.  If the list is not stopped by pressing ctrl+break, it will continue
until you run out of hard disk space!  I would not recommend running this
program on a floppy disk!


-=THE METHOD USED TO DETERMINE PRIME NUMBERS=-
The method used to determine whether the number is prime or not is a very
simple one but DIFFERENT from the other methods I have used.  The method does
the same function as "PRIME.EXE" and "PRIMLIST.EXE" but it utilizes an
already available list of prime numbers to figure out whether a number is
prime or not.  A number is prime if it is not devisible by all the prime
numbers small than or equal to it's square root.  So if you have the number
x and it's square (squarex), in order for x to be prime, it must not be
evenly divisible by all the prime numbers below squarex or squarex.  This
program utilizes a special technique involving an array.  An array is like
a large spreadsheet.  In my spreadsheet I fill if full of 1000 numbers and
then I use the method described above to determine if the numbers are prime
or not.  If they are then I set that value in the array to zero (0) and
later it is not saved to the hard disk.


-=COMMON QUESTIONS, ANSWERS, AND PROBLEMS=-
If you did not recieve the PRIMES.LST it is still possible to run the
program.  To generate a list of primes you will need to use the PRIMLIST.EXE.
READ the documentation on PRIMLIST.TXT BEFORE EXECUTING the program!  Once
you have a list of 32 primes or more and it is saved as PRIMES.LST you can
run SIEVE.EXE

One common question is: Is there a way to change the name of the textfile
containing the outputted list of primes or the last prime number found.
Short of rewriting the code and recompiling the program, no.

One other thing that often occurs is that the user ends up with a huge text
file containg all the prime numbers.  WARNING: the primes list can become
VERY VERY LARGE if the program is not stopped.  You can stop the program at
any time by pressing the CTRL-BREAK key combination.  This will also occur
with "PRIMLIST.EXE".

Some may ask why I include two programs that produce essentially the same
data?  Well, for one, SIEVE is much faster than PRIMLIST and I actually don't
know of a faster method of determining whether a number is prime or not.
Another thing is, SIEVE does not require the file LASTPRIM.LST because it
automatically finds the last prime number in PRIMES.LST.  SIEVE also
demonstrates how to use an array and better use of for loops.

I am not currently aware of any other problems with the program but you can
contact me if you encounter any ( see the bottom of the file ).


-=HOW SIEVE.EXE WAS WRITTEN=-
SIEVE.EXE was written and compiled in MICROSOFT C (not c++).  I believe it
follows the standard C language and is ANSI C compliant.  To gain more
insight into the program... try reading the commented source code
("SEIVE.C").  If you would like more information or would like to contact
the author to offer suggestions, please feel free to do so!
You can reach me at:

Austin.C.J.Fowler@worldnet.att.net      (main address)
fone_phreak78@hotmail.com               (never read this mail)
HTTP://HOME.ATT.NET/~Austin.C.J.Fowler  (home page)
DALNET:  THe ICe_SurFer                 (irc registered screen name)
