Re: Best processors for trig?
- From: Tim Wescott <tim@xxxxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 14:52:41 -0700
larwe wrote:
On Mar 30, 1:46 pm, Tim Wescott <t...@xxxxxxxxxxxxxxxx> wrote:I'm not sure that there is one.
A floating point DSP, as noted.
What's the canonical method of doing this? Taylor series
approximations?
Bringing the argument into range and doing a Taylors series is almost good. Bringing it into range then using a near-Taylors polynomial that takes the truncation into account works better. This works especially well on a VLW instruction set architecture like the 21xx from ADI, because you can perform the x^n in one clock, then the y += ax^n in another -- with sines and cosines you'll out-precise 16-bit data by the time you get to x^6, so you can do the computation in a ridiculously few number of clocks.
If all you want is fast then you can do a humongous table look up.
If you have the room it works _really_ well to do a part lookup, part polynomial expansion algorithm. You have a lot of freedom here to trade off speed for table size.
I have had applications where I did a table look up followed by linear interpolation, and accepted that my trig functions were good to significantly less than 16 bits. If you don't _need_ full precision but you do need speed, this can be very good.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Posting from Google? See http://cfaj.freeshell.org/google/
Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
.
- References:
- Best processors for trig?
- From: Mike Noone
- Re: Best processors for trig?
- From: Tim Wescott
- Re: Best processors for trig?
- From: larwe
- Best processors for trig?
- Prev by Date: Re: Who is working with the SAM9263?
- Next by Date: Re: Best processors for trig?
- Previous by thread: Re: Best processors for trig?
- Next by thread: Re: Best processors for trig?
- Index(es):
Relevant Pages
|