Changes between Version 4 and Version 5 of doc/maths/remez/tutorial-additional-tips


Ignore:
Timestamp:
Dec 29, 2011, 7:34:50 PM (11 years ago)
Author:
sam
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/maths/remez/tutorial-additional-tips

    v4 v5  
    33
    44This part of the tutorial is constantly updated. Check its [?action=history history] to know what is new.
     5
     6== Floating point precision ==
     7
     8The Remez algorithm performs high precision computations to find its solutions. As a result, the polynomial coefficients found are printed with far more decimals than the usual `double` or `float` numbers can store. So when you write:
     9
     10{{{
     11#!cpp
     12float a = 8.333017134192478312472752663154642556843e-3;
     13}}}
     14
     15The exact value of `a` is actually:
     16
     17{{{
     188.3330171 18275165557861328125e-3
     19}}}
     20
     21See [wiki:doc/maths/remez/tutorial-fixing-parameters “fixing lower-order parameters”] for both an explanation of why this can be a problem, and a method to reduce the introduced error.
    522
    623== When not to use Remez? ==
     
    1835== What if I want to use Remez anyway? ==
    1936
    20 If you need to approximate a function ''f(x)'' over [a,+∞] and for some reason you want to use the Remez exchange algorithm, you can still through a change of variable: ''y = 1/x''. The function to approximate becomes ''f(1/y)'' and the new range is [0,1/a] (see [wiki:doc/maths/remez/tutorial-changing-variables “changing variables”] for how to deal with ''1/x'' in 0. Your minimax polynomial will use ''1/x'' as its variable; please be aware that computing ''1/x'' at runtime may be expensive.
     37If you need to approximate a function ''f(x)'' over [a,+∞] and for some reason you want to use the Remez exchange algorithm, you can still through a change of variable: ''y = 1/x''. The function to approximate becomes ''f(1/y)'' and the new range is ![0,1/a] (see [wiki:doc/maths/remez/tutorial-changing-variables “changing variables”] for how to deal with ''1/x'' in 0). The minimax polynomial will use ''1/x'' as its variable; please be aware that computing ''1/x'' at runtime may be expensive.
    2138
    2239== Conclusion ==