??? 10/16/04 13:24 Read: times |
#79392 - RE: Microcontroller Scientific Calculato Responding to: ???'s previous message |
Hi Siang,
There are polynomial expansion series that can approximate trig functions with arbitrary precision. You can find them in most numeric methods text books. If memory serves (and look this up before taking my word for it as it has been many years) the name Taylor expansion series comes to mind (no known relation to Steve). Now for the good news. You don't need to calculate all of the trig functions. All you need to calculate is one of them. The rest can then be derived from the first using identities. Calculate, for example, the sine of an angle. You can solve for the cosine using the identity 1 = cos^2 + sin^2. Once you know both sine and cosine for an angle, the tangent is the ratio tan = sin/cos. I believe that cotangent is just the reciprocal of tangent, but verify that for yourself (I've slept since the last time I did trig). I don't recall the identity of secant or cosecant but it is similar and can be found inside the cover of most any trigonometry textbook. Good luck. And one last thing. Is this a homework assignment? Most of us would like to know so we can be careful to help without doing the work for you. |