PDA

View Full Version : Sin/Cos/Tan question


Gaz031
Aug17-04, 06:17 AM
I've been working with the trigonometric ratios for a long time now and was wondering, when you type sin(x), where x is any number and hit the equals sign, what function is actually being applied to the number?

humanino
Aug17-04, 06:30 AM
I guess that would be
\sin(x)=\sum_n \left( \frac{x^{4n+1}}{(4n+1)!}-\frac{x^{4n+3}}{(4n+3)!} \right)
to finite order, by first reducing to the fundamental [-\pi;\pi]

HallsofIvy
Aug17-04, 06:40 AM
For a very long time, I thought that calculators (and computers) used the Taylor's series (what humanino gives is a variation on that) for ex, sin(x), cos(x), etc. but I have been informed that all modern calculations use the "CORDIC" algorithm.

Here is a link to an explanatory website:
http://www.dspguru.com/info/faqs/cordic.htm

humanino
Aug17-04, 06:50 AM
now, that's clever ! Anyway, I had doubt about the series. Thanks Hallsoflvt. This algorithm makes me thinf of FFT.
edit:
(well actually it is much simpler)

Gaz031
Aug17-04, 11:44 AM
Interesting, thanks.