|


Calculators and Trig FunctionsDate: 12/03/96 at 20:35:54 From: Jared Kuhn Subject: Trigonometric Functions I have read through your archives and found that the only way you present to solve a trigonometric function, for example, sin (.78539), is through a complicated formula: sin (.78539) = .78539 - .78539^3/3! + .78539^5/5! - .78359^7/7! ... Is there no simpler way to do this? It doesn't seem logical to me that a calculator could do this as fast as it does, especially without a radian measure to start with. I understand the principle of the unit circle, and was wondering if there was a way (possibly outside the realm of trigonometry into calculus) to determine the y value on a graph of the arc subtended by the angle theta. This gives the value of sine as 1/y (1 divided by the height arc in relation to the x-axis). I have asked teachers at my school, but none could make it clear to me. Perhaps you can help. I only ask about sine because, after reading some of the other letters here, I realized that the other functions can be derived from sine.
Date: 12/04/96 at 12:29:04
From: Doctor Jerry
Subject: Re: Trigonometric Functions
Hi Jared Kuhn,
I recently went to a mathematics conference at which Prof. Bruce
Edwards gave a paper titled "How Do Calculators Calculate."
Here are the first sentences of his paper:
"How do calculators quickly produce the values of transcendental
functions? For instance, how does the TI-85 calculate tan 1.5?
The calculator does not use series or polynomial approximations,
but rather the so-called CORDIC method."
I'll try to give a short description of the CORDIC method, but you may
want to refer to the paper by Charles W. Schelin, "Calculator Function
Approximation", _American Mathematical Monthly_, 1983, pp 317-325.
To calculate the sine and cosine of a number t, we first need to
clarify some notation. We use x_{k} to mean x sub k; x_{k+1} would
mean x sub k+1; and so on. Also, x^k means x to the power k; x^{k+1}
means x to the power k+1. For -pi/2 <= t <= pi/2, let :
x_{k+1} = x_k - d_k*y_k*2^{-k}
y_{k+1} = y_k + d_k*x_k*2^{-k}
z_{k+1} = z_k - d_k*arctan(2^{-k}).
The constants arctan (2^{-k}) are stored in the calculator. I don't
know how many of these are stored, but judging from Edwards' comments,
it might be something like e_k = arctan(2^{-k}) for k = 0,1,2,...,50.
In any case, if you want more accuracy, you need to store more of
these constants. We also store the product K = cos(e_0)*cos(e_1)*...*cos(e_{46}).
The choice of the number of factors in this product depends upon the
accuracy wanted. The constants d_k are defined by d_k = sgn(z_k).
The sgn function gives +1 for any number greater than or equal to 0
and -1 for any number less than 0.
To do the calculation, take x_0 = 1/K, y_0 = 0, and z_0 = t.
Calculate x_1, y_1, and z_1 from the above formulas. Then calculate
x_2, y_2, and z_2. Etc.
Note that only addition and multiplication are required.
With t = 1, after a while, one gets
x_{47} = 0.54030230586814,
y_{47} = 0.84147098480790,
z_{47} = 0.00000000000000.
The x and y values are the cosine and sine of 1 radian.
-Doctor Jerry, The Math Forum
Check out our web site! http://mathforum.org/dr.math/
|
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]


Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/