Discussion in 'Math' started by Alberto, Aug 19, 2009.
DELETED! End of my partecipation to AAC forum.
To make life simpler, we can first restrict the range
to the case where the value lies between 0 and 1 by
using the identities
Note that these formulae, and the ones to follow all
give the arc tangent in radians so, if you want degrees,
you will have to convert the answer.
If we only need limited accuracy, a rational approximation
is the way to go. The following formula is accurate to
two decimal places:
Converting to degrees, we have the following:
which gives the answer to within a degree.
If we want five-place accuracy, there is the following
This should be good enough for all but the most demanding
applications but, if we want arbitrary precision, we could use
the following series expansion which has nice convergence
properties throughout the range of :
Also, for the purpose of numerical computation, this
series folds up quite nicely:
Because the terms in this series are all positive, it
has the "Price is Right" property --- it will estimate
the value as closely as you want without ever going over.
Let's illustrate this by computing the arc tangent of -3.
Using our identities, we see that
so we'll first compute the arc tangent of a third, then
go back and turn that into the arctangent of minus three.
(See the other thread for a debate over whether I should
have said "negative three" instead. )
By our rough-and-dirty approximation:
or, in degrees,
Using the polynomial approximation,
Finally, the series becomes
As we see from the powers of a tenth, we will gain at least a
decimal place of accuracy for each extra term we include.
Computing the successive terms numerically, we get the
. . . . . . .
So we're good to seven decimal places so far and have our
best value so far, .
In particular, comparing with this, we see that the polynomial
approximation is good to five decimal places, as advertised.
Subtracting the pi, we get
Converting into degrees,
or, in the good old Babylonian notation,
Alright, lesson over, now go compute some angles
Load More Articles