TITLE: How accurately can huge factorials be calculated?
QUESTION [6 upvotes]: Given a number like $10^{20}!$, what can I, in a reasonable amount of time, figure out about it?  Can I figure out how many digits it has, and/or what the first digit is?  I found Striling's approximation, but I'm not aware of a realistic way to calculate something raised to the nth where n = $10^{20}$

REPLY [12 votes]: Specifically, for large $x$, $$\ln(x!) = (\ln(x)-1) x + \frac{1}{2} \ln(x)+\frac{1}{2} \ln(2\pi)+\frac{1}{12 x}-\frac{1}{360x^3}+\frac{1}{1260 x^5}-\frac{1}{1680 x^7} + \frac{t}{1188 x^9}$$ for some $t \in (0,1)$.   For $x = 10^{20}$, the uncertainty in the number (if calculated with a few hundred digits of precision) is about $10^{-183}$.
The result is that we can say $(10^{20})!$ has 
$$1956570551809674817246$$
decimal digits, of which the first 100 are 
$$1932849514310097712837014080536242806874079839409160617974884639778977403427259721535932189240606200...$$