This problem explores how to use the floating-point representation to obtain a good starting point for Newton’s method. To illustrate this idea, the equation to solve is2− = 0, where > 0, which is used to evaluate
(a) Show that the formula for Newton’s method is
(b) The floating-point approximation of has the formf= × 2E, where
Also, recall that for 0 ≤
Assuming is even, and1or2are nonzero, use the above information to show that
In what follows it is assumed that this formula is used to determine0. Note that this expression only involves additions and multiplications (and not a square root).
(c) What does the approximation in part (b) reduce to for = 28 = (1 + 1/2+1/22) × 24? How close does0come to
(d) Modify the derivation in part (b) to find a starting value in the case of when = 50 = ( 1+1/2+1/24) × 25. Make sure to compare0with the exact value. Also, you can assume the value of is known.
(e) Write a MATLAB program that uses this idea to calculate for any given > 1. The stopping condition for Newton’s method should be With this, compute and
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here