Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
01-25-2020, 02:53 AM
Post: #15
 Gerson W. Barbosa Senior Member Posts: 1,487 Joined: Dec 2013
RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
(01-21-2020 09:01 PM)Gerson W. Barbosa Wrote:   difference: 477.667 µm

Not even NASA needs to compute the perimeter of an ellipse the shape and dimension of the orbit of Halley’s comet to a precision of less than half a millimeter.
So, in order to minimize program size I’ve worked out another approximation which will give reasonable results when combined with the AGM technique, despite its sloppiness.

p ≈ π(a + b)[(h² + 8)/8]²

where

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

Code:
 001:LBL A 002:©ENTER 003:× 004:STO I 005:√ 006:x⇆ T 007:RCL+ Y 008:R↓ 009:AGM 010:STO/ I 011:x⇆ Z  012:2 013:/ 014:RCL+ Y 015:RCL L 016:RCL- Z 017:RCL/ Y 018:x² 019:# 008 020:+  021:RCL/ L 022:x² 023:× 024:# π  025:STO× I 026:× 027:RCL- I 028:STO+ X 029:END

The difference in our usual example is now 122.324 km and the error in the perimeter of the orbit of Pluto is 19.256 fm (femtometer), still beyond any practical requirement. Anyway, the program fits in only 29 steps.

The longer version is now 53 steps long:

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

 Messages In This Thread Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 12-10-2019, 11:50 PM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Paul Dale - 12-11-2019, 01:47 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 12-13-2019, 04:08 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Ángel Martin - 01-29-2020, 11:44 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Paul Dale - 12-13-2019, 05:04 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 12-13-2019, 05:16 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-11-2020, 01:20 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-14-2020, 05:23 PM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Albert Chan - 01-14-2020, 11:47 PM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-15-2020, 12:59 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-16-2020, 04:18 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-18-2020, 01:14 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - grsbanks - 01-18-2020, 10:25 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-18-2020, 03:41 PM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-21-2020, 09:01 PM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 01-25-2020 02:53 AM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Paul Dale - 01-29-2020, 12:29 PM RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s) - Gerson W. Barbosa - 02-08-2020, 11:17 PM

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