|
-
Dec 17th, 2003, 05:52 PM
#1
Thread Starter
Hyperactive Member
Large Number Handling in C
I'm trying to find to prime numbers that when multiplied equal a large number. I have the program written in C. Currently it uses Integers. When I try to use a float, it gives of odd results. It doesn't loop correctly or do anything correctly. I don't think a float is large enough anyway. I need to be able to work with 100+ digit numbers... Any ideas?
(Yes, if you want to guess this is for the RSA Challange._I have no chance but I can dream...)
-
Dec 17th, 2003, 06:17 PM
#2
Frenzied Member
the finding prime number site gives you the code
(and yes i believe they do work with a large number of digits)
have a look at __int64
-
Dec 19th, 2003, 11:32 AM
#3
Even unsigned 64-bit integers can only store up to (2^64)-1 - not enough.
You'll have to write your own large-number class or get one from the web.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 19th, 2003, 01:01 PM
#4
Frenzied Member
The Dartmouth MPI library is designed for working with integers of VERY large precision - it's free and is meant to work with C on
under Windows and a bunch of *nix boxes.
http://thayer.dartmouth.edu/~sting/mpi/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|