Post Reply 
Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
01-18-2020, 01:14 AM (This post was last modified: 01-18-2020 01:19 AM by Gerson W. Barbosa.)
Post: #11
RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
Here is another approximation that relies only on basic arithmetic operations and takes up less than 40 steps on HP-42S/Free42, not counting the final END:

p ≈ π(a + b){h²[h²(-93h² + 224) + 2304] - 4096}/{h²[h²(7h² - 544) + 3328] - 4096}

00 { 80-Byte Prgm }
01▸LBL "EL"
02 RCL+ ST Y
03 STO 01
04 X<>Y
05 LASTX
06 RCL- ST Y
07 X<>Y
08 RCL+ ST L
09 ÷
10 X↑2
11 ENTER
12 ENTER
13 ENTER
14 -93
15 ×
16 224
17 +
18 ×
19 2304
20 +
21 ×
22 4096
23 -
24 STO× 01
25 R↓
26 7
27 ×
28 544
29 -
30 ×
31 3328
32 +
33 ×
34 4096
35 -
36 X<> 01
37 RCL÷ 01
38 PI
39 ×
40 END


The error in the usual example (orbit of Halley’s comet) is 477.529 km, the flight distance from Rome to Milan.
Use the formula or the program to check the error in the orbit of former planet Pluto (a = 5906376272 km, b = 5720637952.8 km).
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-18-2020 01:14 AM



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