Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
|
01-18-2020, 03:41 PM
(This post was last modified: 01-19-2020 02:09 AM by Gerson W. Barbosa.)
Post: #13
|
|||
|
|||
RE: Hypergeometric function – Perimeter of an Ellipse and other applications (wp34s)
(01-18-2020 10:25 AM)grsbanks Wrote: Could you enclose your listings in "code" tags? It makes the whole post shorter and tidier. As you please, but you’ll have to scroll down to see the new HP-42S/Free42 version is now 36 steps long, LBL and END included :-) Code:
The corresponding wp34s version is 41 steps longs – too many constants, remove a few and it will be perfect! :-) Perhaps someone has a trick to save a step or two... wp34s version: Code:
p ≈ π(a + b){h²[h²(-93h² + 224) + 2304] - 4096}/{h²[h²(7h² - 544) + 3328] - 4096} where h = [(a - b)/(a + b)] Thanks for your suggestion. This indeed looks cleaner now. Edited after saving one step in the wp34s program. PS: 1) The wp34s program can fit in 40 steps, including LBL and END; 2) The following is even more accurate, giving an error of only 116.385 km for our usual example – that’s about the distance from Milan to Parma. p ≈ π(a + b){h²[h²(-381h² + 548) + 8448] - 13312}/{h²[h²(34h² - 2188) + 11776] - 13312} Same number of steps on Free42/HP-42S, taking up a few more bytes. Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)