Under construction!
The problem is numerically to approximate the arcsin function:
This is a nice demonstration of generally-useful function approximation techniques. Arcsin is not completely simple, since its derivative is infinite at x=1. Nevertheless, neither is it completely pathological.
We will see several polynomial and rational methods, such as these:
The techniques will be combined with
The arithmetic operations used in the approximations will either be
The optimization criterion will be to:
Since the distribution of the error can also be interesting, for most methods, I will also plot the error between arcsin and the approximating function.
This problem was suggested by a question in the comp.graphics.algorithms newsgroup.
Altho arcsin is defined for the interval [-1,1], we will exploit its symmetry, and approximate it over the interval [0,1], unless otherwise stated.
For uniformity,each approximation here will have 7 degrees of freedom, unless otherwise stated.
I am not a professional function approximator; corrections and amplifications by experts are always welcome.
Again, unless otherwise stated, all plots here are error plots, of the difference between the function being approximated and the approximation.
If your processor can do arctan and sqrt as fast as a division, then there is no problem to solve.
| Available Operations | Best Method | Max Error |
|---|---|---|
| Only +,-,* | Minimax polynomial | 0.033 |
| Also division | (The same) minimax polynomial! (Division doesn't help here.) | 0.033 |
| One sqrt | [3,3] Minimax quotient | 4.7e-7 |
| Two sqrt | Minimax polynomial | 2.8e-7 |