Boost logo

Boost :

From: Brian Budge (brian.budge_at_[hidden])
Date: 2023-08-25 13:54:13


Hi folks -

I have a couple of questions regarding the math tools for polynomial
approximation. Context: I'm interested in making fast math approximations
that are also highly accurate. These include standard functions, but also
custom fits. I've successfully used the chebyshev_transform and remez
tools to make such approximations. However, I know in many cases I could
get better results. So my questions are the following:

1. For the remez tool, how could we constrain e.g. odd or even powers of
numerator, denominator, or both to zero? This is common in highly accurate
trig approximations for example. Looking at the code, I suspect we'd need
to change the degrees of freedom for the solver, but I don't know how
straightforward it would be to make such a change (or if there are
theoretical reasons why this couldn't work with the remez algorithm)
2. Getting accurate results with chebyshev_transform requires the Crenshaw
algorithm, which makes these approximations far slower than those I get
from the remez tool. Are there a class of polynomials where I could
transform these to a standard Horner's or Estrin's scheme in a way that is
numerically stable? If so, any pointers to how to do that?

Thanks,
  Brian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk