# Obtaining the Poisson distribution in the calculator.

I want to calculate a Poisson that involves the calculation of $100!$ Does anyone know how to program it in a Casio calculator?

Your calculator may overflow at $10^{100}$ while $100!\approx 9.3\times 10^{157}$.
If so, and assuming you want to use $100!$ in multiplication, one approach would be to use logarithms, as $\log(100!)=\log(1)+\log(2)+\cdots+\log(100)$.
I leave the programming to you, but as a check, $\log_{10}(100!)\approx 157.97$ and $\ln(100!)\approx 363.74$.
• How good is Stirling in that case? $100!\approx\dfrac{100^{100+1/2}\sqrt{2\pi}}{e^{100}}$. ${}\qquad{}$ – Michael Hardy Dec 17 '14 at 18:31
• @Michael Hardy: about $0.999167$ of the actual value, so not bad. You could still need logarithms. – Henry Dec 17 '14 at 18:33
• BTW, it was de Moivre who first showed that $\dfrac{n^n\sqrt{n}}{n!e^n}$ converges to a limit strictly between $0$ and $\infty$, and computed it numerically. It was Stirling who showed that the limit is $1/\sqrt{2\pi\,{}}$. ${}\qquad{}$ – Michael Hardy Dec 17 '14 at 18:33
• A better approximation is $$\ln(n!) \approx (\ln(n)-1) n + \dfrac{1}{2}\ln(2 \pi n) + \dfrac{1}{12n} - \dfrac{1}{360 n^3} + \ldots$$ For $n = 100$, the terms shown give $\ln(100!) \approx 363.73937555556341078$ while the correct value is $363.73937555556349014$. – Robert Israel Dec 17 '14 at 19:33