Post Reply 
Arduino BigNumber library port and ATAN
03-06-2016, 10:17 PM
Post: #2
RE: Arduino BigNumber library port and ATAN
The 34S uses a different approach.

Reduce range to 0 <= a < 1, using:
atan(x) = pi/2 - atan(1/x)

Then repeatedly apply:
tan(x/2) = tan(x)/(1+sqrt(1+tan(x)^2))
to get the argument under 0.1, this takes at most three iterations.

Apply the Taylor series expansion:
tan(x) = x(1-x^2/3+x^4/5-x^6/7...)
convergence is very rapid due to the small x.

Undo the halving and the range reduction steps.


- Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Arduino BigNumber library port and ATAN - Paul Dale - 03-06-2016 10:17 PM



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