1. Rather large number
- Posted by Molasses <molasses at ALPHALINK.COM.AU>
Nov 24, 1998
-
Last edited Nov 25, 1998
------=_NextPart_000_000E_01BE17EF.95A69EE0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
Could anyone please help me in a large calculation?
Let me specify 'large':
(480000^16777216) / 756864000
That's 480000 to the power of 16777216, divided by 756864000.
What's it for?
It's the number of years it would take to watch a screen 800x600 24bit =
color go through every possible combination at 24 frames per second.
Just curious.
-molasses
------=_NextPart_000_000E_01BE17EF.95A69EE0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hi all,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>Could anyone please help me in a =
large=20
calculation?</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Let me specify 'large':</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>(480000^16777216) </FONT><FONT =
color=3D#000000=20
size=3D2>/ 756864000</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>That's 480000 to the power of =
16777216, divided=20
by 756864000.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>What's it for?</FONT></DIV>
<DIV><FONT size=3D2>It's the number of years it would take to watch a =
screen=20
800x600 24bit color go through every possible combination at 24 frames =
per=20
second.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Just curious.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>-molasses</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
------=_NextPart_000_000E_01BE17EF.95A69EE0--
2. Re: Rather large number
Molasses wrote:
>
> Hi all,
>
> Could anyone please help me in a large calculation?
> Let me specify 'large':
>
> (480000^16777216) / 756864000
>
> That's 480000 to the power of 16777216, divided by 756864000.
>
> What's it for?
> It's the number of years it would take to watch a screen 800x600 24bit
> color go through every possible combination at 24 frames per second.
>
> Just curious.
>
>
> -molasses
>
>
>
You will get with Eu only the log. Here the code:
--
--
-- d = (480000^16777216) / 756864000
--
-- using log: log(d) = 16777216 *log(480000) - log(756864000)
-- dec. log: dlog(d) = log(d)/log(10)
--
constant cE = 2.718281828459045
----------------------------------------------------------------
function exp( object x) -- Exponential function
return power(cE,x)
end function
----------------------------------------------------------------
atom a, b, c
atom ln, ld
a = 480000
b = 16777216
c = 756864000
ln = b * log(a) - log(c)
ld = ln/log(10)
printf(1,"Nat. log: %25.15e\n", ln)
printf(1,"Dec. log: %25.15e\n", ld)
Hope it helps, Rolf
3. Re: Rather large number
On Tue, 24 Nov 1998, Rolf Schroeder wrote:
> Molasses wrote:
> > Could anyone please help me in a large calculation?
> > Let me specify 'large':
> >
> > (480000^16777216) / 756864000
> >
> > It's the number of years it would take to watch a screen 800x600 24bit
> > color go through every possible combination at 24 frames per second.
>
> You will get with Eu only the log. Here the code:
> --
> -- d = (480000^16777216) / 756864000
> --
> constant cE = 2.718281828459045
> ----------------------------------------------------------------
> function exp( object x) -- Exponential function
> return power(cE,x)
> end function
> ----------------------------------------------------------------
>
> atom a, b, c
> atom ln, ld
>
> a = 480000
> b = 16777216
> c = 756864000
>
> ln = b * log(a) - log(c)
> ld = ln/log(10)
> printf(1,"Nat. log: %25.15e\n", ln)
> printf(1,"Dec. log: %25.15e\n", ld)
The maths looks good. This, according to a non-Euphoria package I'm using
(Maple V3) yields (for the decimal log):
95315402.49 (approx)
So that means the answer is roughly 3.1e+95315402 years.
By comparison, the universe is roughly 1.5e+10 years old. :)
Function time!
function split_antilog10(atom log10_x)
-- Expects log10_x to be the log (base 10) of x (Unsurprisingly)
-- returns {mantissa, exponent}
atom mantissa
integer exponent
exponent = floor(log_x)
mantissa = power(10,(log_x - exponent))
return {mantissa, exponent}
end function
Use this in the above program with:
printf(1, "%1.15ge+%d", split_antilog10(ld))
--
Carl R White -- Final Year Computer Science at the University of Bradford
E-mail...: cyrek- at -bigfoot.com -- Remove the hyphens before mailing. Ta :)
URL......: http://www.bigfoot.com/~cyrek/
Ykk rnyllaqur rgiokc cea nyemdok ymc giququezka caysgr -- B.Q.Vgesa
4. Re: Rather large number
> Molasses wrote:
> Could anyone please help me in a large calculation?
> Let me specify 'large':
> (480000^16777216) / 756864000
> That's 480000 to the power of 16777216, divided by 756864000.
> What's it for?
> It's the number of years it would take to watch a screen 800x600 24bit
> color go through every possible combination at 24 frames per second.
ummmm, to do what you are saying, you can move
*much* faster than 24fps... *MUCH* faster...
since you are basically only changing one pixel
at any given moment.... you can simply walk around
the screen using whatever pixel() command there is in
that library... and, you can set, likely, several hundred
pixels in a second... depending on the machine, easily
thousands per second...
in fact....
you're setting 480000*24 pixels/sec
which is 11520000...
so, instead of multiplying 24*60*60*24*365 to get the
divisor, you *should* be multiplying 11520000*60*60*24*365
ie: 60*60*24*365=sec/year = 31536000
you multiplied 24fps*31536000sec/year = 756864000
you should have done 11520000pix/sec*31536000sec/year
= 3.6329472e14 for your divisor...
this way, you can see your units matching and
crossing out...
pix/sec * sec/year = pix/year
you needed to have pix/year on the right side
of the equation because you had pix on the left
and were trying to solve for year...
once you bring over the divisor, you have
pix/pix = year which is what you're after...
ie:
480000^16.7M pix / 3.63e14 pix/year = ? year
remembering that division is inverse multiplication,
it becomes pix/1 * 1/(pix/yr) and pix then cancels...
hard to show this way...
lets try:
pix 1
--- * --------
1 pix
---
yr
=
pix * yr
--- -----
1 pix
=
years
i think that was better...
the answer to your question then becomes solving:
480000^16.7M / 3.63e14
now, thats the same as:
480000^3^255/3.63e14
which is 1.11e17^255/3.63e14
which is 1.11e17^5^51/3.63e14
=1.(11*5)e(17*5)^51/3.63e14
which is 1.65e85^51/3.63e14
and i can tell you right now...
this is going to be a *lot* of years...
1.65e85^51 = 1.(65*51)e(85*51) = 1.3315e4335/3.63e14
which, best i can figure :), is....
(if you move the decimal of the divisor, it makes it
much easier to calculate...)
1.3315e4335/0.363e15
1.(3315-363)e(4335-15)
=
***********************
* 1.2952e4320 years *
***********************
that's a 4K document holding like 99% zeros :)
anyone see any math mistakes? ;)
> Just curious.
> molasses
ummmm that's an awfully big curious, 4300 decimal places of curious...
:O
--Hawke'