Perimeter of the Ellipse (HP-15C)
|
06-06-2021, 07:07 AM
(This post was last modified: 06-07-2021 07:25 PM by C.Ret.)
Post: #27
|
|||
|
|||
RE: Perimeter of the Ellipse (HP-15C)
(06-05-2021 08:00 PM)Gerson W. Barbosa Wrote: A better option for both 10 and 12-digit results is to discard even the 1/3 constant: (06-05-2021 10:35 PM)Albert Chan Wrote: Try replacing last constant 1 as (19/18)/y. This keep rel error below 1 ppm, well until h = ((a-b)/(a+b))^2 > 0.9616 Code: 001- ►LBL E \( P(a,b)\approx\pi(a-b)(y+1/(4y-1/(4y-3/(4y-3/(4y-11/(12y-(4/(2y-19/18y)))))))) \) \( P(a,b)\approx\pi(a-b)\frac{110592y^8-122880y^6+18704y^4+7488y^2-627}{110592y^7-150528y^5+54608y^3-4244y} \) with \( y=\frac{a+b}{a-b} \) \( P(a,b)\approx\pi(a+b)\frac{110592-122880h+18704h^2+7488h^3-627h^4}{110592-150528h+54608h^2-4244h^3} \) with \( h=\left(\frac{a-b}{a+b}\right)^2 \) Code: a b P(a,b) Calc'Lap 7 DATA 19,18, 4,2, 11,12, 3,4, 3,4, 1,4, 1,4 10 INPUT "Elps Radii A,B ";A,B @ IF A<>B THEN Y=(A+B)/(A-B) ELSE P=2*PI*A @ GOTO 30 20 C=0 @ FOR I=1 TO 7 @ READ N,D @ C=N/(D*Y-C) @ NEXT I @ P=PI*(A-B)*(Y+C) 30 DISP USING 40;A,B,P 40 IMAGE "P("K",",K")=",4D.8D |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)