Advanced Math/FACT (N) Excel
Expert: Ahmed Salami - 3/4/2006
QuestionI am attempting to calculate 100! and 200! and also trying to figure out what is the biggest factorial i.e. the largest n! that Excel can handle.
Thanks,
Steve
AnswerHi Steve,
I'm sorry i can't determine the limit of calculation the
Excel package can do for you on factorials. But i would,
however, give you something that would always come in
handy when dealing with large numbers.
For large n,
n! ~= sqrt(2#n) . n^n. e^(-n)
where # = pi and e is the base of the natural logarithm.
And so
100! ~= sqrt(200#) . 100^100. e^(-100)
How do we evaluate this?
Its simple, we employ logarithms.
log(100!) ~= log[sqrt(200#)]+log(100^100)+log[e^(-100)]
= log[sqrt(200#)] + 100log100 - 100loge
= log(25.07) + 100(2) - 100(0.4343)
= 1.40 + 200 - 43.43
= 244.83
100! = 10^244.83
= 10^244 . 10^(0.83)
10^(0.83) is simply the antilog of 0.83
100! = 6.76 x 10^244
(A number with 255 digits, this might determine the limit of the results possible with a package)
This is the Stirling's formula. The larger the n, the
more accurate it becomes.
I hope i have helped. You can always get back to me.
Regards.