| View previous topic :: View next topic |
| Author |
Message |
t Guest
|
Posted: Thu Apr 28, 2005 12:55 pm Post subject: Huge numbers in cpp |
|
|
Hello,
I am going to write a program to search for prime numbers. There will be a
lot of clients participating in this searching so I have to operate on very
huge numbers, bigger than can be stored in double...
I wonder how can I deal with this numbers? Do I have to create an array of
doubles or ints? How could I make calculations on numbers stored in such an
array?
Could you give me some ideas? Or maybe you could send me source of any
program which operates on enormous numbers stored in arrays?
Thanks in advance,
Tomek
|
|
| Back to top |
|
 |
Karl Heinz Buchegger Guest
|
Posted: Thu Apr 28, 2005 1:02 pm Post subject: Re: Huge numbers in cpp |
|
|
t wrote:
| Quote: |
Hello,
I am going to write a program to search for prime numbers. There will be a
lot of clients participating in this searching so I have to operate on very
huge numbers, bigger than can be stored in double...
I wonder how can I deal with this numbers? Do I have to create an array of
doubles or ints? How could I make calculations on numbers stored in such an
array?
Could you give me some ideas? Or maybe you could send me source of any
program which operates on enormous numbers stored in arrays?
|
Why reinvent the weel.
Google is your friend. Search for 'Big number library C++ download'
and choose one.
--
Karl Heinz Buchegger
[email]kbuchegg (AT) gascad (DOT) at[/email]
|
|
| Back to top |
|
 |
Alf P. Steinbach Guest
|
Posted: Thu Apr 28, 2005 1:02 pm Post subject: Re: Huge numbers in cpp |
|
|
* t:
| Quote: |
Could you give me some ideas? Or maybe you could send me source of any
program which operates on enormous numbers stored in arrays?
|
<url: http://www.swox.com/gmp/>
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
|
|
| Back to top |
|
 |
Alex Vinokur Guest
|
Posted: Thu Apr 28, 2005 3:13 pm Post subject: Re: Huge numbers in cpp |
|
|
"t" <tkaczmarczyk (AT) poczta (DOT) onet.pl> wrote
| Quote: | Hello,
I am going to write a program to search for prime numbers. There will be a
lot of clients participating in this searching so I have to operate on very
huge numbers, bigger than can be stored in double...
I wonder how can I deal with this numbers? Do I have to create an array of
doubles or ints? How could I make calculations on numbers stored in such an
array?
Could you give me some ideas? Or maybe you could send me source of any
program which operates on enormous numbers stored in arrays?
Thanks in advance,
Tomek
|
Try to use C++ BigInt class
[url]https://sourceforge.net/projects/cpp-bigint/[/url]
[url]http://groups-beta.google.com/group/sources/msg/496e8d3ae812abbb[/url]
--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
|
|
| Back to top |
|
 |
Krzysztof Zelechowski Guest
|
Posted: Wed May 04, 2005 9:22 pm Post subject: Re: Huge numbers in cpp |
|
|
Uzytkownik "Karl Heinz Buchegger" <kbuchegg (AT) gascad (DOT) at> napisal w wiadomosci
news:4270DECE.5D48D20A (AT) gascad (DOT) at...
| Quote: | t wrote:
Hello,
I am going to write a program to search for prime numbers. There will be
a
lot of clients participating in this searching so I have to operate on
very
huge numbers, bigger than can be stored in double...
I wonder how can I deal with this numbers? Do I have to create an array
of
doubles or ints? How could I make calculations on numbers stored in such
an
array?
Could you give me some ideas? Or maybe you could send me source of any
program which operates on enormous numbers stored in arrays?
Why reinvent the weel.
Google is your friend. Search for 'Big number library C++ download'
and choose one.
|
Search for "Search for prime numbers" and choose GIMPS.
Chris
|
|
| Back to top |
|
 |
|