[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Trig functions ... accuracy vs speed

From: Bernd Felsche
Subject: [avr-gcc-list] Trig functions ... accuracy vs speed
Date: Tue, 8 Oct 2002 09:09:17 +0800
User-agent: Mutt/1.3.27i

In a past life, which is not to say that I have one now, I used
Taylor series expansions of as few as 3 terms to drive a graphical
output device (Microangelo - if you must ask). That sped up vector
plotting and arc drawing so much, I went back to the code to make
sure that it was actually running.

Each term of the Taylor series increases accuracy. A 1 in a 1000
error can be achieved with 5 terms or less IIRC, which means a heck
of a lot faster calculation than the "true" function; FPU or not!
That makes the Taylor series expansions useful for for driving
discrete-resolution outputs.

Similarly for inverse functions.

However; if you will be using the calculated result for further
calculations, keep in mind that errors can increase rapidly.
Consider the results "quick-and-dirty". :-)

See any of the thousands of web references for further details.
e.g. http://www.efunda.com/math/taylor_series/taylor_series.cfm

/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!
avr-gcc-list at http://avr1.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]