Changes between Version 1 and Version 2 of doc/maths/remez


Ignore:
Timestamp:
Dec 28, 2011, 10:09:28 PM (9 years ago)
Author:
sam
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/maths/remez

    v1 v2  
    22= Remez exchange toolbox =
    33
    4 The Remez exchange algorithm is a fast method for approximating functions in a Chebyshev space. 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.
     4'''TL;DR:''' this toolbox helps find CPU-friendly approximations to complicated functions.
     5
     6The 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.
    57
    68== Example ==
    79
    8 The following graph shows approximations of `sin(x)` over [-π, π] using three different polynomials:
    9  * the Taylor series to the 5th order: ''x-x³/6+x⁵/120''
    10  * the Taylor series to the 7th order: ''x-x³/6+x⁵/120-x⁷/5040''
     10The following graph shows approximations of ''sin(x)'' over [-π, π] using three different polynomials:
     11 * the Taylor series to the 5th order: ''x-x³/3!+x⁵/5! ''
     12 * the Taylor series to the 7th order: ''x-x³/3!+x⁵/5!-x⁷/7! ''
    1113 * the minimax polynomial to the 5th order: ''x-0.1587164x³+0.00585375x⁵''
    1214 
    1315[[Image(taylor-vs-remez.png, nolink)]]
    1416
    15 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 even better than the next order.
     17It 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 [blog:2011/12/21/better-function-approximations this blog article].
    1618
    1719== Download ==