Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14399 > unrolled thread
| Started by | "Barrie Stokes" <Barrie.Stokes@newcastle.edu.au> |
|---|---|
| First post | 2013-05-03 07:49 +0000 |
| Last post | 2013-05-03 07:49 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Formula Stirlinga "Barrie Stokes" <Barrie.Stokes@newcastle.edu.au> - 2013-05-03 07:49 +0000
| From | "Barrie Stokes" <Barrie.Stokes@newcastle.edu.au> |
|---|---|
| Date | 2013-05-03 07:49 +0000 |
| Subject | Re: Formula Stirlinga |
| Message-ID | <klvq73$2dg$1@smc.vnet.net> |
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 top | Article view | comp.soft-sys.math.mathematica
csiph-web