Velocity Reviews > not a homework question

# not a homework question

user923005
Guest
Posts: n/a

 03-17-2008
On Mar 15, 6:26*pm, Three Headed Monkey <(E-Mail Removed)>
wrote:
> Noob wrote:
> > Three Headed Monkey wrote:

>
> >> write a program in "C" language that computes
> >> 9^(8^(7^(6^(5^(4^(3^(2^1)))))))

>
> > (I know your post was written tongue-in-cheek, but it's an interesting

>
> * * * * * * * * * * * * * * * * ^^^^^^^^^^^^^^^
> What does that mean?

http://en.wikipedia.org/wiki/Tongue-in-cheek

> > problem nonetheless.)

>
> > Let u1 = 1 and u(n) = n ^ u(n-1)

>
> > Assume base 10.

>
> > u1 = 1
> > u2 = 2
> > u3 = 9
> > u4 = 262144
> > u5 = a number with 183231 digits
> > u6 = a number with (roughly) 10^183231 digits

>
> > u9 might be larger than one googolplex.

>
> So some people say it's to big for C, other people say bigger numbers
> have been used on computers.
>
> Can problem be expressed in "spinoza" programming language?
> (Author says it can handle unlimited numbers and unlimited strings)

A combination of spinoza and pasm would be ideal. But only Herbert
Schildt could code something as complicated as that, with the
assistance of Scott Nudds.

> It probably beyond my imagination, but when printing this number
> on screen, how much time can I expect? If printed on paper, how many
> sheets will it needs?

Grind up the entire universe and turn it into paper. It's not nearly
enough even to get started.

> Another idea, if I rearrange above expression so it calculate
> n-th digit of result, like
>
> int n_th_digit(int n);
>
> can this be done so formula is not to big for C language?

The formula is small. It's the answer that's the problem.

santosh
Guest
Posts: n/a

 03-17-2008
user923005 wrote:
> Three Headed Monkey wrote:
>> > Three Headed Monkey wrote:

>>
>> >> write a program in "C" language that computes
>> >> 9^(8^(7^(6^(5^(4^(3^(2^1)))))))

<snip>

>> It probably beyond my imagination, but when printing this number
>> on screen, how much time can I expect? If printed on paper, how many
>> sheets will it needs?

>
> Grind up the entire universe and turn it into paper. It's not nearly
> enough even to get started.

<snip>

What if you could employ compression on the sequence on the fly?

Sjouke Burry
Guest
Posts: n/a

 03-17-2008
santosh wrote:
> user923005 wrote:
>> Three Headed Monkey wrote:
>>>> Three Headed Monkey wrote:
>>>>> write a program in "C" language that computes
>>>>> 9^(8^(7^(6^(5^(4^(3^(2^1)))))))

>
> <snip>
>
>>> It probably beyond my imagination, but when printing this number
>>> on screen, how much time can I expect? If printed on paper, how many
>>> sheets will it needs?

>> Grind up the entire universe and turn it into paper. It's not nearly
>> enough even to get started.

>
> <snip>
>
> What if you could employ compression on the sequence on the fly?
>

You can compress the output sequence as
9^(8^(7^(6^(5^(4^(3^(2^1)))))))

CBFalconer
Guest
Posts: n/a

 03-17-2008
Richard Heathfield wrote:
> Wolfgang Riedel said:
>

.... snip ...
>
>> your system has a 255624-bit integer type?

>
> Well, not unless I use my bignum library - but it isn't necessary
> for this program. (Try it!)

[1] c:\c\junk>cat junk.c
#include <stdio.h>

int main(void) {
printf("%d\n", 9^(8^(7^(6^(5^(4^(3^(2^1))))))));
return 0;
}

[1] c:\c\junk>cc junk.c

[1] c:\c\junk>a
1

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

user923005
Guest
Posts: n/a

 03-17-2008
On Mar 17, 12:23*pm, santosh <(E-Mail Removed)> wrote:
> user923005 wrote:
> > Three Headed Monkey wrote:
> >> > Three Headed Monkey wrote:

>
> >> >> write a program in "C" language that computes
> >> >> 9^(8^(7^(6^(5^(4^(3^(2^1)))))))

>
> <snip>
>
> >> It probably beyond my imagination, but when printing this number
> >> on screen, how much time can I expect? If printed on paper, how many
> >> sheets will it needs?

>
> > Grind up the entire universe and turn it into paper. *It's not nearly
> > enough even to get started.

>
> <snip>
>
> What if you could employ compression on the sequence on the fly?

Sjouke Burry took my snappy answer.

But as far as digits are concerned, I have seen an estimate that there
are about 10^87 elementary particles in the observable universe.
Supposing it is a factor of 1000 too low, then there would be 10^90
elementary particles. If we could encode a 10^10 digits on each
elementary particle and we had 10^90 of them, that would only be a
googol of digits (10^100) which is utterly dwarfed by this number
(which resembles in its construction Archimedian Cycles).

user923005
Guest
Posts: n/a

 03-17-2008
On Mar 17, 12:42*pm, Sjouke Burry <(E-Mail Removed)>
wrote:
> santosh wrote:
> > user923005 wrote:
> >> Three Headed Monkey wrote:
> >>>> Three Headed Monkey wrote:
> >>>>> write a program in "C" language that computes
> >>>>> 9^(8^(7^(6^(5^(4^(3^(2^1)))))))

>
> > <snip>

>
> >>> It probably beyond my imagination, but when printing this number
> >>> on screen, how much time can I expect? If printed on paper, how many
> >>> sheets will it needs?
> >> Grind up the entire universe and turn it into paper. *It's not nearly
> >> enough even to get started.

>
> > <snip>

>
> > What if you could employ compression on the sequence on the fly?

>
> You can compress the output sequence as
> 9^(8^(7^(6^(5^(4^(3^(2^1)))))))

Which lead one man to exclaim:
"I couldn't see the forest for the threes!"