Modifying Taylor polynomials for better accuracy: sin(x) approximations
joelkp.frama.io
joelkp.frama.io
A minimax result is a small improvement on Chebyshev. Though my program is too slow to be good for experimenting with higher-order approximations, for which a Remez algorithm implementation would be far more generally useful.
https://en.wikipedia.org/wiki/Remez_algorithm
I think Remez + the end-point fitting trick I stumbled on would be the practical way to extend the last two parts in the article to higher order approximations. And make it exact instead of only "almost".
The 2nd approximation was minimax, but then I made a non-minimax approximation out of a minimax one, to get rid of error at the end of the input value range. It would have been possible to do that in a minimax way instead, by changing (increasing) the input value range for the approximation. Doing it just enough would move the last place where the error drops down to zero outwards to the end of the old input value range. I didn't think of that earlier.