Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
|
01-25-2020, 02:53 AM
Post: #15
|
|||
|
|||
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:
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:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)