HP 17B Solver - another ARCTAN(Y/X) approximation
06-01-2021, 03:16 PM
Post: #11
 Martin Hepperle Senior Member Posts: 396 Joined: May 2014
RE: HP 17B Solver - another ARCTAN(Y/X) approximation
(05-31-2021 09:51 PM)Albert Chan Wrote:
Code:
from math import sqrt def myatan(x, k=1):     y = x*x     if y > 1e-3: return myatan(x/(sqrt(1+y)+1), k+k)     return k*(x - x*y*(1/3 - y*(1/5 - y*(1/7 - y*(1/9)))))

Ah, that's quite compact and accurate!

Unfortunately, the HP-17B Solver cannot do recursion, but has a Sum() function which might be useable for an iteration.
 « Next Oldest | Next Newest »

 Messages In This Thread HP 17B Solver - another ARCTAN(Y/X) approximation - Martin Hepperle - 05-15-2021, 09:14 AM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-15-2021, 11:01 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Martin Hepperle - 05-16-2021, 08:42 AM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-16-2021, 01:03 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-16-2021, 05:04 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-17-2021, 12:43 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-31-2021, 04:42 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-31-2021, 07:30 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-31-2021, 09:51 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Martin Hepperle - 06-01-2021 03:16 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 06-01-2021, 04:38 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 08-29-2021, 11:39 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 05-17-2021, 06:01 PM RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Albert Chan - 08-19-2021, 02:42 AM

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