Calculators using Taylor polynomials?

4.2k Views Asked by At

I've always heard that calculators (TI-84's and the like) use Taylor polynomials to approximate trigonometric/exponential/etc functions. Do any of you know this for a fact?

2

There are 2 best solutions below

0
On BEST ANSWER

More likely your calculator is using table lookup with some simple interpolation (possibly even just linear) between values in the table. Calculators (and computer math co-processor chips) can do this because you just need the answer to some known (10-15 digit most likely) precision. So as long as the error from the interpolation is below that threshold, it doesn't matter.

For a concrete example, cosine/sine is usually approximated using CORDIC, or at least, that was true back in the day. At its core, it's just a bunch of table look ups interpolated together.

0
On

The problem with Taylor polynomials that, while they are very accurate near the center, they get worse and worse the farther away you get from it. What you want for a calculator or computer chip is to be uniformly accurate over the entire interval in question, otherwise you waste computing power with unnecessarily accurate estimates in some areas at the expense of others. For example, suppose you want exp(x) to 16 digits of accuracy on the interval [0,1] with a Taylor polynomial centered at 0. You need to have a lot of terms to get the required accuracy at 1, but all most of these terms do near 0 is to give extra digits of accuracy that aren't needed. https://en.wikipedia.org/wiki/Approximation_theory is a good overview of some of the techniques used to produce more efficient polynomials. Note that these techniques assume you have some method, not necessarily efficient, to compute the function to any degree of accuracy. You don't care much about efficiency so much in the design stage since you're only doing the computation a few times, so you might think of Taylor polynomials as raw material which are polished until suitable for use in a computer chip. Besides polynomials, you can also use rational functions for approximations, and these may perform better depending on the circumstances. My understanding is that the methods actually used in commercial computer chips are trade secrets, so there are probably only a few engineers who know for sure what they are, but there has been a great deal published on the theory so it's possible to make reasonable guesses.