Re: Fixed Point Taylor Approximation of a Non-Integer Power
- From: robert bristow-johnson <rbj@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jul 2009 13:46:09 -0700 (PDT)
On Jul 28, 2:50 pm, "alos" <los.aleksan...@xxxxxxxxxxxxxx> wrote:
... I am working on a way to approximate
a non-integer power in fixed point. For example, x^(2.5).
While a lookup table can work, it can get rather large depending on my
range of x.
and the error constraints you may have. you can reduce error in an
LUT by interpolating. linear interpolation is the simplest (other
than zeroeth-order interpolation or "drop-sample" interpolation) and
the most common, but higher order, like 3rd-order Hermite or Lagrange
interpolation have been done also.
So I was considering a simple low-order (4-6 coefficients)
Taylor Series approximation. Its natural MAC-like structure made it seem
efficient, and would only require storing a few pre-calculated
coefficients (powers of x0) to start.
But before I dive too deep into implementing that technique, I wanted to
see what you all thought. Is this a poor choice? Is there a standard
technique for this that I am just plain missing?
there might be a couple:
1. least square-error fit
2. least max-error fit
the latter is the "equiripple approximation" or "remes exchange
algorithm", Alek alludes to.
Keep in mind that Taylor is usually poor choice for approximation.
Better choices are:
- Economization of long Taylor expansion (see. Numerical Recipes in C)
- Interpolation on Chebyshev nodes (can be close to optimal).
- Equiripple approximation - best approximation in the L_infinity
norm sense.
For example polynomial with following coefficients (const term last),
obtained with the remez exchange algorithm:
probably Alek has one also, but every engineer should have a MATLAB or
Octave program that fits a finite-order polynomial to some given
function over a given range. in either the least-square or equiripple
approximation, you should be able to weight the error function so that
it fits tighter in areas where it is more important. for equiripple,
i have a MATLAB/Octave program (remes exchange) for that, if you want
it. lemme know.
if they accept my proposal, i am hoping to do a tutorial about this
topic at the next AES convention in October. but i haven't yet heard
back from the powers that be regarding that. maybe i missed the
rejection email.
r b-j
.
- Follow-Ups:
- References:
- Prev by Date: Re: Fixed Point Taylor Approximation of a Non-Integer Power
- Next by Date: Re: Approximation to Bessel Function in Integrand
- Previous by thread: Re: Fixed Point Taylor Approximation of a Non-Integer Power
- Next by thread: Re: Fixed Point Taylor Approximation of a Non-Integer Power
- Index(es):
Relevant Pages
|
Loading