There is no exact way to evaluate factorials except to calculate them by multiplication:
They turn out to be:
104!=102990167451456276238485838647650442830537724549990721823254917768878717324
75287174542709871683888003235965704141638377695179741979175588724736000000000000
000000000000
=1.0299016745145628*10^166 (approx.)
and
106!=114628056373470835453434738414834942870388487424139673389282723476762012382
44994625266036087184167347601629828709643514374735052822822430250631168000000000
0000000000000000
=1.1462805637347084*10^170 (approx.)
If only an approximation is required, Stirling's approximation could be used for large factorials (n>100):
n! ~ sqrt(2πn)(n/e)^n
where the error is of the order 1/n.
A closer approximation can be obtained by summing the series:
n! ~ sqrt(2πn)(n/e)^n(1+1/(12n)+1/(288n²)-139/(51840n³)-...)
For more information, see:
http://en.wikipedia.org/wiki/Stirling%27s_approximation
Evaluate each factorial expression.
106!
104!
1 answer