Post Reply 
(35S) Perimeter of ellipse (Ramanujan 2nd Approximation)
07-03-2021, 08:26 AM (This post was last modified: 07-03-2021 03:47 PM by J-F Garnier.)
Post: #6
RE: (35S) Perimeter of ellipse (Ramanujan 2nd Approximation)
Here is an alternate version, using no registers, that runs on any scientific RPN machine:

Code:
 01*LBL "P"
 02 +
 03 ENTER^
 04 ENTER^
 05 ENTER^
 06 LASTX
 07 -
 08 LASTX
 09 -
 10 X<>Y
 11 /
 12 X^2
 13 3
 14 *
 15 ENTER^
 16 ENTER^
 17 4
 18 X<>Y
 19 -
 20 SQRT
 21 10
 22 +
 23 /
 24 1
 25 +
 26 *
 27 PI
 28 *
 29 RTN

Example with y=4, x=6:
41C: 31.73087918
32S: 31.7308791784
true: 31.730879178581...

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (35S) Perimeter of ellipse (Ramanujan 2nd Approximation) - J-F Garnier - 07-03-2021 08:26 AM



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