MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Formula Stirlinga

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130705] Re: Formula Stirlinga
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sat, 4 May 2013 03:17:41 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

On 5/1/13 at 9:43 PM, karchevskymi at gmail.com wrote:

>n = 1000; N[n! - Sqrt[2*Pi*n]*(n/Exp[1])^n] = 3.35308734163*10^2563
>Why does Stirling's formula works incorrect?

Stirling's formula is a valid approximation. But the way you are
trying to demonstrate that isn't effective. Note

In[1]:= n = 1000;
N[(Sqrt[2*Pi*n]*(n/E)^n)/n!]

Out[2]= 0.999917

In[3]:= 100 (1 - %)

Out[3]= 0.00833299

That is there is an error of about 0.008%

and

In[4]:= Log[10, n!] + Log[10, %/100]

Out[4]= 2563.53

That is an error of 0.008 amounts to a difference of 10^2563




  • Prev by Date: A minimization problem with variable length
  • Next by Date: Re: memory issue
  • Previous by thread: Re: Formula Stirlinga
  • Next by thread: MarcumQ function