Post Reply 
(12C) Stirling's approximation
11-04-2017, 02:01 PM
Post: #3
RE: (12C) Stirling's approximation
(11-04-2017 05:26 AM)Gamo Wrote:  N! approximation using Forsyth's formula with shorter program steps.

Instead of 2 [y^x] you should use [ENTER] [x] which is much faster (and sometimes even more accurate). And why don't you simply use 6 [1/x] instead of 0,1667 ?-) Finally, once again the ENTER is not required and should be omitted.

This leads to the following version, here with a few more digits in sqrt(2pi) and without any registers:

Code:
ENTER
ENTER
x
LastX
+
6
1/x
+
√x
1
e^x
/
X<>Y
0.5
+
Y^X
2.5066283
x
GTO 00

This gets even a tiiiny bit closer to the true results:

2.34 [R/S] => 2.7971...
4.32 [R/S] => 39.2931...
5.43 [R/S] => 254.0287...

And it accurately overflows for x > 69,95757445

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Stirling's approximation - Gamo - 10-24-2017, 05:35 AM
RE: (12C) Stirling's approximation - Gamo - 11-04-2017, 05:26 AM
RE: (12C) Stirling's approximation - Dieter - 11-04-2017 02:01 PM
RE: (12C) Stirling's approximation - Gamo - 11-05-2017, 07:39 AM



User(s) browsing this thread: 1 Guest(s)