Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know if there is reasonably fast converging method for computing large arguments of arctan.

Until now I've came across Taylor series that converges only on interval $(-1,1)$ and for increasing $|x|$ the rate decreases. Also I've found about continued fractions for arctan, which seems to converge more rapidly and can be used for any real number, but again with increasing $|x|$ I need to perform way too much iterations until I get at least 3 digits precision.

I'm therefore looking for a method that would allow me to compute arctan for large arguments with good precision and in reasonable amount of iterations.

share|cite|improve this question
$$\operatorname{atan}x=\int_0^x \frac{1}{1+t^2}d\,t$$ may be a starting point. – Daryl Oct 6 '12 at 12:31
I wonder if this works: expand sine and cosine in Taylor series at $\pi/2$; divide to get an expansion for tangent; invert to get an expansion for arctangent. – Gerry Myerson Oct 6 '12 at 12:31
up vote 24 down vote accepted

Why don't you consider that $$ \arctan x + \arctan \frac{1}{x}=\frac{\pi}{2}, $$ so that, for large values of $x>0$, $$ \arctan x = \frac{\pi}{2}-\arctan {1 \over x} = \frac{\pi}{2}-\frac{1}{x}+\frac{1}{3x^3}-\frac{1}{5x^5} +\ldots ? $$ See also this discussion.

share|cite|improve this answer
Thanks! I forgot about this law.. elegant and easy – Raven Oct 6 '12 at 13:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.