I crunched some
primes, forty million of them.
If you want a copy of the file, I'll be happy to sell you a CD.
In addition to the file with the prime numbers in it, there are a few other
programs that I include on the CD:
- NTHPRIME.EXE - give it a
number and it will return that entry in the list
(1st, 2nd, 3rd... 40,000,000th, etc.)
- PRIMETST.EXE - It doesn't
really test for 'prime-ness', but it does check
(quickly) to see if any primes in the list that are greater than two are
even, and it also tests to see if any number in the list is smaller than
the number before it in the list. I use it as a quick check to see if the
file got corrupted when it was transfered to new
media.
- PRIMFLT.EXE - Run this
program and it will use the 40,000,000-line-long file to produce 40
sequential files that are each 1,000,000 lines long. I include this
because some editors choke on huge files. If your editor chokes on a
mega-line file, let me know and I can make a variation of this program
that will reduce the size of the produced files by another order of
magnitude.
- (Coming soon) ISPRIME.EXE -
Pass a number to this program and it will compare it against the list of
primes, then return true if the number is listed,
or false if the number is not.
Also included are the appropriate .DOC files (MSWORD2K format) for each of
the programs.
CDs are shipped in jewel cases.
The source code for these programs was written in PBCC
2.0 and if you want to see it, you'll have to tell me why you want to look at
it. In some cases I don't mind sharing it, but if you are not a PBCC programmer, you probably wouldn't understand it. For
what it's worth, PBCC has virtually nothing to do
with the 'C' language.
If you have suggestions for other programs that would be of use in this
area, please let me know what you think they should be. It's possible that I
might write the program even if I don't think it would be usefull.
Terms: US$9.95 + $2.50 for domestic S&H Send me an e-mail here
before sending me any money; include your desired shipping address.