Post Reply 
Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
01-21-2020, 09:01 PM
Post: #14
RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
(01-18-2020 03:41 PM)Gerson W. Barbosa Wrote:  p ≈ π(a + b){h²[h²(-93h² + 224) + 2304] - 4096}/{h²[h²(7h² - 544) + 3328] - 4096}

where

h = [(a - b)/(a + b)]


...

1) The wp34s program can fit in 40 steps, including LBL and END;

Actually it does fit in 38 steps:

Code:


001:LBL A
002:⇆ XYYY
003:STO+ Y
004:©-
005:RCL/ I
006:x²
007:x³
008:STO J
009:x⇆ L
010:FILL
011:# 007
012:× 
013:# 072
014:+ 
015:XEQ 00
016:# 093
017:RCL× J
018:-
019:RCL× I
020:# 104
021:# 017
022:RCL× T
023:-
024:XEQ 00
025:# 007
026:RCL× J
027:+
028:/
029:# π  
030:× 
031:RTN
032:LBL 00
033:RCL× Z
034:# 128
035:- 
036:# 032
037:× 
038:END

Since this is the only wp34s program which is more or less optimized, I will use it as the basis for the AGM method present by Albert Chan here:

Code:


001:LBL A
002:RCL× Y
003:z⇆ L 
004:# π
005:x⇆ Y 
006:×
007:STO 01
008:x⇆ L
009:√
010:⇆ ZYYX
011:AGM
012:STO/ 01
013:x⇆ L
014:+
015:2
016:/
017:⇆ XYYY
018:STO+ Y
019:©-
020:RCL/ I
021:x²
022:x³
023:STO J
024:x⇆ L
025:FILL
026:# 007
027:× 
028:# 072
029:+ 
030:XEQ 00
031:# 093
032:RCL× J
033:-
034:RCL× I
035:# 104
036:# 017
037:RCL× T
038:-
039:XEQ 00
040:# 007
041:RCL× J
042:+
043:/
044:# π  
045:× 
046:RCL- 01
047:STO+ X
048:RTN
049:LBL 00
050:RCL× Z
051:# 128
052:- 
053:# 032
054:× 
055:END

Example:

Halley’s comet orbit

a = 2667950000 km

b = 678281900 km


2667950000 ENTER 678281900 A ->

p ≈ 11464318984.10299492347510528221642 km

p = 11464318984.10299540114254189105734 km

difference: 477.667 µm
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-21-2020 09:01 PM



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