Re: how to add two no. of 100 digits or more?
- From: "Robbie Hatley" <bogus.address@xxxxxxx>
- Date: Fri, 01 Jun 2007 16:41:08 GMT
James Dow Allen wrote:
Robbie Hatley wrote:
I just got through writing functions to add,
subtract, and multiply integers ...
(The greatest expressible number is well over
10^2000000000, which, in case
you don't realize, is so big it's no
longer "astronomical".
Here's a program at Robert Munafo's site:
http://home.earthlink.net/~mrob/pub/perl/hypercalc.txt
which operates on *much* bigger numbers than the
tiny ones you mention :-) It's written in perl;
sorry if that makes it off-topic here.
Much, much larger than 10^2000000000? Sheesh, that's one
damn big number!
::: looks at site :::
The biggest number that calculator can handle is...
10^(10^(... ^(10^300) ...)) (with 10000000000 10s).
Exponential recursion 10000000000 levels deep. Wow.
I can't even comprehend how big that is.
And yet, I wonder how many of those digits are significant?
Probably about 10 digits of actual precision.
My system, on the other hand, offers 2147483647 significant
digits of precision. (Or it would if I had at least three
1-gibibyte RAM modules in my machine, instead of just one,
as I currently have.)
I was able to calculate the first 10,000 digits of the
fibonacci sequence -- out to 2092 sig figs -- in about
1 second last night. :-)
A very brief sample:
7654090467756936378415884538348976340768064993978954512095813
12384578529797304192493293627316781267732493780359086838016392
20038668997554240570909178165665757608500558774338041350112205
32423247527351544763402471792982538876233052554697128188128597
52461916524905785334311649958648296484733611329035169538240802
84885164052257330097714121751630835360966663883732297726369399
137347080577163115432025771710279131845700275212767467264610201
222232244629420445529739893461909967206666939096499764990979600
359579325206583560961765665172189099052367214309267232255589801
For a good time, browse around at Mr. Munafo's
site. He has some interesting pages, including
mention of some integers which are too
large even for his hypercalc program.
Like I say, the precision of that calculator doesn't impress me.
The SIZE of the numbers, yes; but not the precision (number of
SIGNIFICANT digits). I doubt the calculator could handle
even the nine integers above.
Now, as for Mr. Munafo's web site...
http://home.earthlink.net/~mrob/pub/math/largenum.html
::: looks at site :::
Hmmm... He looks a lot like my coworker, Ron. Is receding
hairlines genetically linked to computer-programming ability? ;-)
Nice chart combining both the SI and IEC-binary prefixes.
I think I want a 1-ZettaHertz computer with 37 YobiBytes of RAM.
Cool site altogether. I bookmarked it for future reference.
Thanks for the link.
--
Cheers,
Robbie Hatley
East Tustin, CA, USA
lonewolf aatt well dott com
triple-dubya dott tustinfreezone dott org
.
- References:
- Re: how to add two no. of 100 digits or more?
- From: James Dow Allen
- Re: how to add two no. of 100 digits or more?
- Prev by Date: Re: how to add two no. of 100 digits or more?
- Next by Date: assigning const char* to char*
- Previous by thread: Re: how to add two no. of 100 digits or more?
- Next by thread: how to do graphics in 32 bit environment
- Index(es):
Relevant Pages
|
Loading