Professional Documents
Culture Documents
Iterative Method
Iterative Method
Iterative Method
2
BABYLONIAN SQUARE ROOT ALGORITHM:
The iterative method is called the Babylonian method for finding square
roots.
It was known to the ancient Babylonians (1500 BC).
Procedure:
To determine the square root of any given positive number 𝑆,
1. Make an initial guess: Guess any positive number 𝑋0
1 𝑆 Iteration 1
2. Improve the guess: Apply the formula 𝑋1 = 𝑋0 +
2 𝑋0
1 𝑆
3. Iterate until convergence: Apply the formula 𝑋𝑛+1 = 𝑋𝑛 +
2 𝑋𝑛
until the process converges.
4. Convergence is achieved when 𝑋𝑛+1 and 𝑋𝑛 agree to as many
decimal places as desired.
3
BABYLONIAN SQUARE ROOT ALGORITHM:
Determine 30 using Babylonian method.
30 = 5.477225575051661134569697828008
1 30
1 𝑆 𝑋1 = 4+ = 5.75
𝑋𝑛+1 = 𝑋𝑛 + 2 4
2 𝑋𝑛
1 30
Iteration 𝑋𝑛 𝑋2 = 5.75 + = 5.48369565
2 5.75
Number (𝑛)
0 4 1 30
𝑋3 = 5.48369565 +
1 5.75 2 5.48369565
2 5.48369565 𝑋3 = 5.47722939
3 5.47722939
4 5.47722557
5 5.47722557
4
BABYLONIAN SQUARE ROOT ALGORITHM:
6.00
5.80
5.60
5.40
5.20
5.00
4.80
4.60
4.40
4.20
4.00
0 1 2 3 4 5 Iteration No.
5
IMPEMENTATION OF BABYLONIAN ALGORITHM USING MATLAB: