This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 10 50 . That is, our Fnal answer will be within that (tiny!) amount of the real solution. Line 8 starts a loop of 9 iterations of the algorithm, i.e. it will create the successive approximations x 2 , x 3 , ..., x 10 to the real solution, though in Line 9 we check to see if the two previous approximations differ by less than the maximum error. If they do, we stop (since this means we have an acceptable solution), otherwise we continue. Line 10 is the main step in the algorithm, creating x n from x n 1 and x n 2 . Lines 1112 set the new values of x n 2 and x n 1 , respectively. Lines 1820 set the number of decimal places to show in the Fnal answer to 50 (the default is 16) and then print the answer. Lines 2324 give the deFnition of the function f ( x ) = cos x x ....
View
Full
Document
This note was uploaded on 01/21/2012 for the course MAC 1130 taught by Professor Dr.cheun during the Fall '11 term at FSU.
 Fall '11
 Dr.Cheun
 Calculus, Trigonometry

Click to edit the document details