The
SIN(X) function for any numeric
X (
in radians) is computed by the formula
X-X**3/FACT(3))+(X**5/FACT(5))-X**7/FACT(7))+...
where FACT is the factorial function. It computes the sine until the last computed term is less than the tolerance value. Likewise the COS(X) function is computed by the formula
1-(X**2/FACT(2))+(X**4/FACT(4))-X**6/FACT(6))+...
We will use the following formulas for computing the sine or cosine function:
- 2nd ed. B.G Teubner, Stuttgart, 1975