Answer:
25.317977802344
Explanation:
25x25= 625
4x4= 16
625+16= 641
The square root of 641 is 25.317977802344
n this case we are going to use the 'Babylonian Method' to get the square root of any positive number.
We must set an error for the final result. Say, smaller than 0.01. In other words, we will try to find the square root value with at least 1 correct decimal place.
Step 1:
Divide the number (641) by 2 to get the first guess for the square root.
First guess = 641/2 = 320.5.
Step 2:
Divide 641 by the previous result. d = 641/320.5 = 2.
Average this value (d) with that of step 1: (2 + 320.5)/2 = 161.25 (new guess).
Error = new guess - previous value = 320.5 - 161.25 = 159.25.
159.25 > 0.01. As error > accuracy, we repeat this step again.
Step 3:
Divide 641 by the previous result. d = 641/161.25 = 3.9751937984.
Average this value (d) with that of step 2: (3.9751937984 + 161.25)/2 = 82.6125968992 (new guess).
Error = new guess - previous value = 161.25 - 82.6125968992 = 78.6374031008.
78.6374031008 > 0.01. As error > accuracy, we repeat this step again.
Step 4:
Divide 641 by the previous result. d = 641/82.6125968992 = 7.7591072555.
Average this value (d) with that of step 3: (7.7591072555 + 82.6125968992)/2 = 45.1858520774 (new guess).
Error = new guess - previous value = 82.6125968992 - 45.1858520774 = 37.4267448218.
37.4267448218 > 0.01. As error > accuracy, we repeat this step again.
Step 5:
Divide 641 by the previous result. d = 641/45.1858520774 = 14.1858562034.
Average this value (d) with that of step 4: (14.1858562034 + 45.1858520774)/2 = 29.6858541404 (new guess).
Error = new guess - previous value = 45.1858520774 - 29.6858541404 = 15.499997937.
15.499997937 > 0.01. As error > accuracy, we repeat this step again.
Step 6:
Divide 641 by the previous result. d = 641/29.6858541404 = 21.5927760397.
Average this value (d) with that of step 5: (21.5927760397 + 29.6858541404)/2 = 25.63931509 (new guess).
Error = new guess - previous value = 29.6858541404 - 25.63931509 = 4.0465390504.
4.0465390504 > 0.01. As error > accuracy, we repeat this step again.
Step 7:
Divide 641 by the previous result. d = 641/25.63931509 = 25.0006678318.
Average this value (d) with that of step 6: (25.0006678318 + 25.63931509)/2 = 25.3199914609 (new guess).
Error = new guess - previous value = 25.63931509 - 25.3199914609 = 0.3193236291.
0.3193236291 > 0.01. As error > accuracy, we repeat this step again.
Step 8:
Divide 641 by the previous result. d = 641/25.3199914609 = 25.3159643039.
Average this value (d) with that of step 7: (25.3159643039 + 25.3199914609)/2 = 25.3179778824 (new guess).
Error = new guess - previous value = 25.3199914609 - 25.3179778824 = 0.0020135785.
0.0020135785 <= 0.01. As error <= accuracy, we stop the iterations and use 25.3179778824 as the square root.
So, we can say that the square root of 641 is 25.31 with an error smaller than 0.01 (in fact the error is 0.0020135785). this means that the first 2 decimal places are correct. Just to compare, the returned value by using the javascript function 'Math. sqrt(641)' is 25.317977802344327.