Version 4 (modified by sam, 11 years ago) (diff)

--

# Remez exchange toolbox

TL;DR: this toolbox helps find CPU-friendly approximations to complicated functions.

The Remez exchange algorithm is a fast method for approximating functions in a Chebyshev space. This sounds dull, but you don’t need to know what a Chebyshev space is. The Lol Engine provides its own implementation of the Remez exchange algorithm to find polynomial approximations to real functions. Such polynomials are also known as minimax polynomials.

## Example

The following graph shows approximations of sin(x) over [-π, π] using three different polynomials:

• the Taylor series to the 5th order: x-x³/3!+x⁵/5!
• the Taylor series to the 7th order: x-x³/3!+x⁵/5!-x⁷/7!
• the minimax polynomial to the 5th order: x-0.1587164x³+0.00585375x⁵

It is obvious that the polynomial found using the Remez method is closer to the sine curve than the Taylor series of same order, and still better than the Taylor series of the next order. If you want to approximate a function over an interval, Remez is always better. If you want to convince people that it is, please refer them to this blog article.