Changes between Version 4 and Version 5 of doc/maths/remez/tutorialadditionaltips
 Timestamp:
 Dec 29, 2011, 7:34:50 PM (11 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

doc/maths/remez/tutorialadditionaltips
v4 v5 3 3 4 4 This part of the tutorial is constantly updated. Check its [?action=history history] to know what is new. 5 6 == Floating point precision == 7 8 The 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 12 float a = 8.333017134192478312472752663154642556843e3; 13 }}} 14 15 The exact value of `a` is actually: 16 17 {{{ 18 8.3330171 18275165557861328125e3 19 }}} 20 21 See [wiki:doc/maths/remez/tutorialfixingparameters “fixing lowerorder parameters”] for both an explanation of why this can be a problem, and a method to reduce the introduced error. 5 22 6 23 == When not to use Remez? == … … 18 35 == What if I want to use Remez anyway? == 19 36 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/tutorialchangingvariables “changing variables”] for how to deal with ''1/x'' in 0. Yourminimax polynomial will use ''1/x'' as its variable; please be aware that computing ''1/x'' at runtime may be expensive.37 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/tutorialchangingvariables “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. 21 38 22 39 == Conclusion ==