C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Prime Numbers

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Chris
Guest





PostPosted: Fri Oct 31, 2003 4:04 am    Post subject: Prime Numbers Reply with quote



Hello!

I have been doing some research to see if C++ has some sort of
function to work with prime numbers.

For example, I would like to input integers and have the program check
to see if the integers are prime numbers.

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.

Thanks!
Chris
Back to top
Victor Bazarov
Guest





PostPosted: Fri Oct 31, 2003 4:10 am    Post subject: Re: Prime Numbers Reply with quote



"Chris" <del.pic (AT) verizon (DOT) net> wrote...
Quote:
I have been doing some research to see if C++ has some sort of
function to work with prime numbers.

For example, I would like to input integers and have the program check
to see if the integers are prime numbers.

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 Standard library does NOT have such a function. If it did,
all those seekers of the largest number would have nothing to
do, would they?

Try www.google.com.

Victor



Back to top
Jerry Coffin
Guest





PostPosted: Fri Oct 31, 2003 5:40 am    Post subject: Re: Prime Numbers Reply with quote



In article <2e86a889.0310302004.bd42bfe (AT) posting (DOT) google.com>,
[email]del.pic (AT) verizon (DOT) net[/email] says...
Quote:
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.

Quote:
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).

Quote:
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.

The universe is a figment of its own imagination.

Back to top
Chris Theis
Guest





PostPosted: Fri Oct 31, 2003 8:29 am    Post subject: Re: Prime Numbers Reply with quote


"Jerry Coffin" <jcoffin (AT) taeus (DOT) com> wrote

Quote:
In article <2e86a889.0310302004.bd42bfe (AT) posting (DOT) google.com>,
[email]del.pic (AT) verizon (DOT) net[/email] 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



Back to top
Josephine Schafer
Guest





PostPosted: Fri Oct 31, 2003 8:58 am    Post subject: Re: Prime Numbers Reply with quote


Quote:

Not to forget the nice "Miller Rabin probabilistic primality" test, which
IMHO is just a piece of art.

Yes.

Rabin's work was based on randomized algorithms.
It shows how sometimes randomized algorithms solve problems much more easily
over their deterministic counterparts.





Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.