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

--

Remez tutorial 5/5: additional tips

This part of the tutorial is constantly updated. Check its history to know what is new.

When not to use Remez?

There are cases when you should expect the Remez algorithm to potentially perform badly:

There are cases where you should not try to use the Remez algorithm at all:

  • when the range is not finite, eg. [0,+∞]
  • when the function to approximate has an infinite derivative at a point contained in or near the approximation range, eg. sqrt(x) or cbrt(x) in 0

What if I want to use Remez anyway?

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 “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.

Conclusion

Please report any trouble you may have had with this document to sam@hocevar.net. You may then return to the Remez documentation.