4 ms·
It is important to note two things, though, for those following along: 1. Approximations using orthogonal polynomial bases (the least squares method, and more
by fractionalhare 6y ago
It is important to note two things, though, for those following along:
1. Approximations using orthogonal polynomial bases (the least squares method, and more generally the Chebyshev methods) are, for transcendental functions, typically as accurate as Remez exchange (including with range reduction) to 16 or so digits of precision. Remez exchange is more difficult to implement correctly than the simple linear algebra methods, the latter of which rely "only" on doing a comparatively simple change of basis. Practically speaking you gain nothing from using Remez exchange instead of Chebyshev to approximate exp(x), for example.
2. The Remez exchange (and more generally, the MiniMax methods) does not guarantee anything beyond minimizing the worst case error. For many practical applications you don't care about worst case error, you care about average case relative error. It's not uncommon for the Remez exchange to produce polynomials which actually have worse average case relative error.
This is also covered in considerable depth in Trefethen's Approximation Theory and Approximation Practice.
- jacobolus 6y agoHere’s a relevant example: http://www.chebfun.org/examples/approx/EightShades.html http://www.chebfun.org/examples/approx/EightShades.html Here are the first 6 chapters of ATAP http://www.chebfun.org/ATAP/atap-first6chapters.pdf http://www.chebfun.org/ATAP/atap-first6chapters.pdf Also cf. https://people.maths.ox.ac.uk/trefethen/mythspaper.pdf https://people.maths.ox.ac.uk/trefethen/mythspaper.pdf * * * I’d say the bigger point is not about whether the error is marginally better or worse with a Chebyshev series vs. CF vs. Remez, etc., but rather that any of these will usually beat the others if you add just one more coefficient. Usually convergence speed matters more than picking a number of coefficients and then exactly optimizing to the last bit. And as you say, running the Remez algorithm is probably waste of time if you are trying to calculate a near-optimal approximation on the fly at runtime.