Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14399
| From | "Barrie Stokes" <Barrie.Stokes@newcastle.edu.au> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Formula Stirlinga |
| Date | 2013-05-03 07:49 +0000 |
| Message-ID | <klvq73$2dg$1@smc.vnet.net> (permalink) |
| References | <20130502014311.555F56A80@smc.vnet.net> |
| Organization | Time-Warner Telecom |
It works correctly. Try this n = 1000 Log[n!] // N n Log[n] - n // N n Log[n] - n + 1 // N Sqrt[2 \[Pi] n] (n/E)^n // N n! // N %% - % n!/(Sqrt[2 \[Pi] n] (n/E)^n) // N The proportional error at n=1000 is (n! - Sqrt[2*Pi*n]*(n/Exp[1])^n)/n! // N = -0.000083329858430 and check out http://en.wikipedia.org/wiki/Stirling%27s_approximation where the ratio n!/(Sqrt[2 \[Pi] n] (n/E)^n) is given limits. Cheers Barrie >>> On 02/05/2013 at 11:43 am, in message <20130502014311.555F56A80@smc.vnet.net>, <karchevskymi@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?
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Formula Stirlinga "Barrie Stokes" <Barrie.Stokes@newcastle.edu.au> - 2013-05-03 07:49 +0000
csiph-web