To accurately approximate sin x and cos x for inclusion in a mathematical library, we first restrict
Question:
|x| = Mπ + s, where M is an integer and |s| ≤ π/2.
a. Show that sin x = sgn(x) · (−1)M · sin s.
b. Construct a rational approximation to sin s using n=m=4. Estimate the error when 0 ≤ |s| ≤ π/2.
c. Design and implementation of sin x using parts (a) and (b)
d. Repeat part (c) for cos x using the fact that cos x = sin(x + π/2).
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: