Write a routine to compute sin x for x in radians as follows. First, using properties of the sine function, reduce the range so that π/2? x ?π/2. Then if |x| < 10−8, set sin x ≈ x; if |x| > π/6, set u = x/3, compute sin u by the formula below, and then set sin x ≈ [3 − 4 sin2 u] sin u; if |x|?π/6, set u = x and compute sin u as follows:
Try to determine whether the sine function on your computer system uses this algorithm.
Note: This is the Pad´e rational approximation for sine.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.