Post Reply 
HP 17B Solver - another ARCTAN(Y/X) approximation
06-01-2021, 03:16 PM
Post: #11
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 17B Solver - another ARCTAN(Y/X) approximation - Martin Hepperle - 06-01-2021 03:16 PM



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