HP 17B Solver - another ARCTAN(Y/X) approximation
|
05-31-2021, 07:30 PM
Post: #9
|
|||
|
|||
RE: HP 17B Solver - another ARCTAN(Y/X) approximation
For comparison, this is asin half-"angle" formula (we derive this the same way as atan):
\(\displaystyle\arcsin(x) = 2\arcsin\left( {x \over \sqrt{2\sqrt{1-x^2}+2}} \right)\) RC(1-y,1) = asin(√y)/(√y) = 1 + y/6 + 3/40*y² + 5/112*y³ + 35/1152*y4 + ... Code: from math import sqrt Redo atan(1.), atan(.5) examples: >>> x = 1. >>> myasin(x/sqrt(1+x*x), verbal=1) 2.0 * asin( 0.382683432365 ) 4.0 * asin( 0.195090322016 ) 8.0 * asin( 0.0980171403296 ) 16.0 * asin( 0.0490676743274 ) 32.0 * asin( 0.0245412285229 ) 0.78539816339744828 >>> x = .5 >>> myasin(x/sqrt(1+x*x), verbal=1) 2.0 * asin( 0.229752920547 ) 4.0 * asin( 0.115652519498 ) 8.0 * asin( 0.0579235119409 ) 16.0 * asin( 0.0289739201537 ) 0.46364760900080609 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)