Table Driven Methods

Posted by Beetle B. on Tue 17 September 2019

Given the input \(x\), the first step is to find a \(y\) such that \(f(x)\) can easily and accurately be calculated from \(f(y)\).

Tang’s Algorithm For \(e^{x}\)

I don’t want to write the details. The book has the algorithm, but not the justification for the ordering of operations. No actual insight on how to come up with this. Some themes:

Reduce \(x\) to a small symmetric interval about 0. Call it \(r\). Represent this by the sum of two variables (one much larger than the other), such that effectively you are representing this in a fairly large precision. Order your operations so you are adding terms of similar precision.

Have a minimax polynomial approximation of \(\frac{e^{r}-1-r}{r^{2}}\)

Have 32 lookup values for \(2^{j/32}\)

\(\ln(x)\) on \([1,2]\)

Again I did not note the details. No actual insights here.

\(\sin(x)\) on \([0,\pi/4]\)

Again, no insights. Just use an odd/even polynomial for sin/cos. To reconstruct, use the \(\sin(a+b)=\sin a\cos b+\sin b\cos a\) identity.