Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14400
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Formula Stirlinga |
| Date | 2013-05-03 07:50 +0000 |
| Message-ID | <klvq7a$2dl$1@smc.vnet.net> (permalink) |
| References | <20130502014311.555F56A80@smc.vnet.net> |
| Organization | Time-Warner Telecom |
It works fine in the ratio form. The difference form appears to be
numerically unstable unless you use Log.
$Version
"9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"
Clear[n];
Limit[
n!/(Sqrt[2*Pi*n]*(n/E)^n),
n -> Infinity]
1
With[{n = 1000},
N[n!/(Sqrt[2*Pi*n]*(n/E)^n)]]
1.00008
Limit[
Log[n!] - Log[Sqrt[2*Pi*n]*(n/E)^n],
n -> Infinity]
0
With[{n = 1000},
N[Log[n!] - Log[Sqrt[2*Pi*n]*(n/E)^n]]]
0.0000833333
Bob Hanlon
On Wed, May 1, 2013 at 9:43 PM, <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 Bob Hanlon <hanlonr357@gmail.com> - 2013-05-03 07:50 +0000
csiph-web