"Jerry Coffin" <jc*****@taeus.com> wrote in message

news:MP************************@news.clspco.adelph ia.net...

In article <2e*************************@posting.google.com> ,

de*****@verizon.net says... Hello!

I have been doing some research to see if C++ has some sort of

function to work with prime numbers.

None that's particular to prime numbers, and not really much that's any

more than a building-block toward working with large numbers in general.

For example, I would like to input integers and have the program check

to see if the integers are prime numbers.

Depending on how big of numbers you want to deal with, that's anywhere

from trivial (e.g. < 20 digits) to a massive project (e.g. the General

Number Field Sieve is one of the most complex algorithms ever devised by

man).

I have been unsuccessful in finding anything. I am sure I can probably

figure out a long way to do it, but I was curious to see if C++ had

something available.

The MIRACL library has quite a nice factoring program as a free demo of

its capabilities. You can get the library (with the demo) from:

ftp://ftp.computing.dcu.ie/pub/crypto/miracl.zip

--

Later,

Jerry.

Not to forget the nice "Miller Rabin probabilistic primality" test, which

IMHO is just a piece of art.

Cheers

Chris