Not sure if wolfram alpha may be able to help you or not, but you can give
it a command like the below and it will give you back an approximation
fit {0.0,0.1},{0.1,0.5},{0.2,0.3}

example:
http://www.wolframalpha.com/input/?i=fit+%7B0.0%2C0.1%7D%2C%7B0.1%2C0.5%7D%2C%7B0.2%2C0.3%7D



On Tue, Sep 2, 2014 at 1:28 PM, Ethan Duni <ethan.d...@gmail.com> wrote:

> Well, your standard options for computing 2 to a fractional power are
> either polynomial approximation or table look-up. If I'm reading it
> correctly, the approach you quoted there is a second-order polynomial
> approximation. You can gain accuracy at the cost of complexity by dialing
> up the polynomial order.
>
> Alternatively you can use a table look-up, along with some interpolation.
> That will take more memory, but hopefully fewer operations per output. How
> favorable either approach is will depend on your target architecture and
> your resource constraints.
>
> Another option is to use a successive approximation type approach, like
> Newton's root-finding method. That can get a little hairier than the above
> approaches, since it can (in general) require a variable number of
> iterations to converge for different inputs. Although that can be
> advantageous in certain situations, for example if you don't care about the
> peak complexity but simply want to bring down the average complexity
> subject to a given required accuracy.
>
> E
>
>
> On Tue, Sep 2, 2014 at 1:10 PM, Paul Stoffregen <p...@pjrc.com> wrote:
>
> > I'm hoping to find a fast approximation for exp2(), which I can implement
> > in 32 bit fixed point.  So far, the best I've turned up by searching is
> > this from the archives.
> >
> > http://www.musicdsp.org/showone.php?id=106
> >
> >         n = input + 1.0;
> >         n = n * n;
> >         n = n * 2.0 / 3.0;
> >         n = n + 4.0 / 3.0;
> >         n = n / 2.0;
> >
> > Some quick tests show the error gets to about 0.34% (not including small
> > errors I'll add with 32 bit fixed point representation) when the input
> > around 0.72.
> >
> > Does anyone know of any other approximations?  I'm hoping for error under
> > 0.1%, if that's even possible with a simple/fast algorithm?
> >
> > --
> > dupswapdrop -- the music-dsp mailing list and website:
> > subscription info, FAQ, source code archive, list archive, book reviews,
> > dsp links
> > http://music.columbia.edu/cmc/music-dsp
> > http://music.columbia.edu/mailman/listinfo/music-dsp
> >
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
> dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Reply via email to