Re: how to add two no. of 100 digits or more?




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


.



Relevant Pages

  • Re: Calculating Wishes (was hpcatalog.com)
    ... But compared to modern computers, ... Sun-Earth distance useful even if it's know to a precision clearly ... digits of precision. ... > If a calculator offerred say 19 or more digits of precision, ...
    (comp.sys.hp48)
  • Re: BigNum -- Floating Point
    ... I require lossless precision. ... You need an infinite number of digits to accurately represent ... The calculator mentioned above uses a Digits class that does have ... > the rounding mode flag as well. ...
    (comp.programming)
  • Re: Another weirdest hp50g thing...
    ... a limitation on the number of significant digits that the calculator is ... That's eleven digits of precision. ... if instead I run the emulator full speed, ...
    (comp.sys.hp48)
  • Re: Another weirdest hp50g thing...
    ... a limitation on the number of significant digits that the calculator is ... That's eleven digits of precision. ... if instead I run the emulator full speed, ...
    (comp.sys.hp48)
  • Re: float bug? perl 5.8, DBI and oracle 10.2.0
    ... precision numbers in oracle, you've got 38 decimal digits to play ... and with minimal coaxing perl will handle them as ... digits from a 32 bit floating point number - I'll go out on a limb ... and hazard that one can expect 12 or so digits from a 64 bit floating ...
    (perl.dbi.users)

Loading