How do pocket calculators calculate exponents? I'd like to know specifically how a pocket calculator (TI calculators also apply) calculates $e^{0.1}$, and what methods or algorithms pocket calculators use in order to produce their answer.
 A: The ultimate answer can only be given by the maker of the calculator, but there are several strategies:


*

*The value can be calculated through the series expansion.

*The value can be interpolated from a stored table.

*The value can be reduced to the value of a smaller/larger argument by basic operations; for example $e^{2x} = (e^x)^2 = e^x\times e^x$.


In practice, a combination will likely be used. For large values (where the convergence of the series is slow), the value will likely be reduced to smaller arguments. Probably the calculator will also have stored the argument values beyond which overflow or underflow occurs, so for those the calculation can be skipped and an error (for overflow) or $0$ (for underflow) can be returned directly. For small values, Probably the series will be used directly, since it converges quickly. There might, however, also be a range of values where a lookup table is more efficient (that lookup table would then also be the "landing zone" for the large argument reduction). The interpolation would then probably again use the series expansion for the difference, using $e^{x+\delta}=e^xe^\delta$, where $x$ is the tabulated value and $\delta$ is the difference.
As a concrete example, the calulator could employ the following strategy:


*

*Store a table of $e^n$ for $n=1$ to $100$.

*For $\left|x\right| \le \frac12$, use the series directly. For $\frac12<x\le100.5$, use the series to calculate the factor to the nearest integer. For the corresponding negative argument, calculate the inverse.

*For higher values of $x$, but below the overflow limit, use recursion and the mentioned exponential relations to calculate the value by iteration. One relatively efficient method it to go through the bits of the remaining summand, square for every digit, and multiply by $e$ for every $1$. But given the table, probably more efficient iterations could be done (for example, take the 64th power by repeated squaring, and multiply by the value for the argument represented by the corresponding 6 bits, read from the table).


Of course the actual algorithm chosen depends on how fast the processor is (that is, how much inefficiency can you afford), how much memory it has available (that is, a how large table can you afford to store) and how accurate the calculator calculates (more accuracy means both more series terms to calculate, and larger table entries).
A: Note that $e^{x}=\sum_{n=0}^{\infty} \frac{x^{n}}{n!}$ so if you want an approximation of $e^{x}$ you can just truncate the series.
$$e^{x}\approx \sum_{n=0}^{N} \frac{x^{n}}{n!}.$$
After some quick searching, it looks like series are probably not (usually) the best way to go.  See the accepted answer here: https://stackoverflow.com/questions/15350856/which-method-to-implement-exp-function-in-c
A: A commonly used set of algorithms is known as CORDIC: COordinate Rotation DIgital Computer. Basically, it uses a bunch of bitshifts, adds, subtracts and look up tables. Its good for cases where you don't have hardware multipliers and what not.
You can also truncate series as well.
An interesting thing is that you can often do some math and identify which chip is used in a calculator. I believe datamath.org has some information on this.
