Online since 2002. Over 3300 puzzles, 2600 worldwide members, and 270,000 messages.

TwistyPuzzles.com Forum

It is currently Fri Apr 18, 2014 2:14 pm

All times are UTC - 5 hours



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Calculate log2(log2((2^128)!))
PostPosted: Tue Mar 01, 2011 9:34 pm 
Offline
User avatar

Joined: Thu Dec 31, 2009 8:54 pm
Location: Bay Area, California
I have something of a math/computational/calculational problem.

I would like to calculate the value of (2^128)! however I know that number is astronomical so I'd rather know it's size in bits. I think the size in bits also might be too astronomical so if that is the case I'd like to know the size in bits of the size in bits.

That is, log2(log2((2^128)!)).

I know any strategy that actually tries to compute the factorial of 2^128 will fail so I'm looking for a creative way such as using the Gamma() function.

Is there a reasonable way to do this?


Edit: I should have read the whole Wikipedia article more slowly. There is an ln(gamma(z)) approximation when z is large. The log2() of (2^128)! is roughly 4.3 * 10^40 and the log2() of that is only about 135.

In GP/PARI calculator syntax:

? (2^128) + 1
%1 = 340282366920938463463374607431768211457
? (((%1 - (1/2))*log(%1)) - %1 + ((1/2)*log(2*Pi)))/log(2)
%2 = 4.3065219282621326757565580404980237829 E40
? log(%2)/log(2)
%3 = 134.98364697279917304390801670742496091

_________________
Prior to using my real name I posted under the account named bmenrigh.


Top
 Profile  
 
 Post subject: Re: Calculate log2(log2((2^128)!))
PostPosted: Wed Mar 02, 2011 4:06 am 
Offline
User avatar

Joined: Wed Mar 15, 2000 9:11 pm
Location: Delft, the Netherlands
bmenrigh wrote:
Edit: I should have read the whole Wikipedia article more slowly. There is an ln(gamma(z)) approximation when z is large.


I was about to suggest Stirling's formula, but that seems to be equivalent to what you used.

_________________
Jaap

Jaap's Puzzle Page:
http://www.jaapsch.net/puzzles/


Top
 Profile  
 
 Post subject: Re: Calculate log2(log2((2^128)!))
PostPosted: Wed Mar 02, 2011 4:16 am 
Offline
User avatar

Joined: Mon Mar 30, 2009 5:13 pm
jaap wrote:
bmenrigh wrote:
Edit: I should have read the whole Wikipedia article more slowly. There is an ln(gamma(z)) approximation when z is large.


I was about to suggest Stirling's formula, but that seems to be equivalent to what you used.

This could be useful for calculating the number of permutations of Oskar's 17x17x17 cube. :D

_________________
If you want something you’ve never had, you’ve got to do something you’ve never done - Thomas Jefferson


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Forum powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group