This problem considers the error when evaluating sin, and the problem seen in Figure 1.3. It is assumed that is a given real number that is not a floating-point number, andfis its floating-point approximation. Also,Eis the integer so that 2EE+1 and 2E≤f≤ 2E+1.
(a) Use Taylor’s theorem to show that |sin − sinf|≤| −f|.
(b) The point is between two floating-point numbersfandf, and eitherf=forf=f. Explain why | −f|≤|f−f|/2.
(c) Using parts (a) and (b) show that |sin − sinf| ≤ε2E−1.
(d) Use the result in part (c) to show that if || ≤ then
(e) When the computer evaluates sinfit produces a floating-point numberf. Assuming that |sinf−f| ≤, show that
(f) When using double precision, what interval − ≤ ≤ can you use and be able to guarantee that |sin −f| ≤ 10−8? How does this value of compare with the corresponding result obtained from Figure 1.3?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here