MathOverflow is a question and answer site for professional mathematicians. 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

Firstly, I have to say that I don't understand Padé approximation well.
But I discovered that, it is more precise than Taylor series.
I have to create approximation for these functions: Log(x) and Tanh. And I have to create iterative algorithms (I must compute result with variable precision).

So my questions are:
Is Padé approximation usable (and more efficient than simple Taylor series) for this task?
If yes, is there any paper or something about this?
If no, is there any better way to approximate these functions?

share|cite|improve this question
up vote 4 down vote accepted

A qualitative reason for using rational approximations (e.g. Padé) instead of polynomial ones (e.g. Taylor) is that rational approximations can exhibit behavior (e.g. poles and asymptotes) that polynomials are hard-pressed to emulate; they thus tend to be slightly more accurate (there are always exceptions, though).

What you can do that is equivalent to using a Padé approximant (SFAICT, there's no simple method for generating the coefficients of the numerator and denominator polynomials for the two functions you have, except by solving the appropriate Toeplitz system) is to use continued fraction expansions, which $\ln(1+x)$ and $\tanh(x)$ have by their virtue of being expressible as hypergeometric functions.

Of course, for proper use, you have to perform appropriate argument reductions (e.g. for $\tanh$, compute $x^{\star}=\frac{x}{2^n}$ where $n$ is an appropriate integer such that $x^{\star}$ is "small" enough, evaluate the continued fraction at $x^{\star}$, and use the double-argument formula for $\tanh$ to undo your previous transformation).

For evaluating continued fractions, a (reasonably) robust way of going about it is to use the "modified Lentz method" due to Lentz, Thompson, and Barnett; the algorithm's details are in Numerical Recipes or Gil/Segura/Temme's Numerical Evaluation of Special Functions.

share|cite|improve this answer

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.