3 The following algorithm computes an estimate of the square root of a number which is between 0 and 2.
Step 1 Subtract 1 from the number and call the result \(x\)
Step 2 Set oldr = 1
Step 3 Set \(i = 1\)
Step 4 Set \(j = 0.5\)
Step 5 Set \(k = 0.5\)
Step 6 Set change \(= x ^ { i } \times k\)
Step 7 Set newr \(=\) oldr + change
Step 8 If \(- 0.005 <\) change < 0.005 then go to Step 17
Step 9 Set oldr = newr
Step 10 Set \(i = i + 1\)
Step 11 Set \(j = j - 1\)
Step 12 Set \(k = k \times j \div i\)
Step 13 Set change \(= x ^ { i } \times k\)
Step 14 Set newr \(=\) oldr + change
Step 15 If \(- 0.005 <\) change < 0.005 then go to Step 17
Step 16 Go to Step 9
Step 17 Print out newr
- Use the algorithm to find an estimate of the square root of 1.44 , showing all of the steps.
- Consider what happens if the algorithm is applied to 0.56 , and then use your four values of change from part (i) to calculate an estimate of the square root of 0.56 .