calculating Really big numbers

Sep 9, 2010 at 9:43pm
Ahoy, I've got question concerning really big numbers. How do you calculate them?? How do those libraries GMP and BigInt calculate the values. The way I do them, because I don't use libraries is, to convert a number to a string and then do additions or whatever on them, but it's a bit complicated, so I'm wondering how do you guys do it.

Ooohh and another thing, I've seen languages like ruby, python, lisp, APL, having no problems with it, I'm guessing it's simply because they have a built in library, the same as if I downloaded BigInt or GMP, am I right??

PS: the numbers I'm talking about are 2^1032014094012940blablaooomygoosh, or whatever, I don't mean like 4000000000.

thanks guys.
Sep 9, 2010 at 9:58pm
Why don't you use libraries?
They use arrays to hold all the data
Sep 9, 2010 at 10:03pm
No reason, I liked doing the calculations my own way, with a little head bashing, but now that I've done them a couple of times, it got old, so yes now I'll be checking into the libraries (any recommendations?).

Does anybody know how they work (I did all my calculations with strings, how do they do it), any info about the matter??
Sep 9, 2010 at 10:08pm
Well, I have one; others may post more.
http://www.ttmath.org/
Sep 9, 2010 at 10:10pm
You can download GMP sourcecode if you really want to know how they work
ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2
Sep 9, 2010 at 10:27pm
Thanks to both, I'll check out TTMath on Windows, and GMP under cygwin (can't find a way to get it under Windows).

Cheers.
Sep 10, 2010 at 1:30am
GMP under cygwin (can't find a way to get it under Windows)
I had this issue too, but someone gave me this link recently: http://cs.nyu.edu/exact/core/gmp/
Topic archived. No new replies allowed.