Question:- How algorithm to find the square root of a number works?
Answer:- Square of a number is multiplying a number by itself. Finding the square root of a number is to obtain one factor out of two.
5 x 5 = 25 is called squiring a number.
Square root of 25 is obtained by finding a pair of prime factor and selecting one.
The square root of a number, N, is the number, M, so that M2 = N. The square root algorithm is set up so that we take the square root of a number in the form of (X + R)2. The square root of this number is obviously (X + R). X represents the current approximation for the square root, and R represents the remainder of the number left over from the approximation. Our approximation will always be the correct square root of the number truncated (not rounded) to the number of digits in our approximation. If we expand our number (X + R)2 it will equal X2 + 2RX + R2. This gives us the basis for our derivation of the square root algorithm.
Step 1: The square root of a number between 1 and 100 is a number between 1 and 10.
Step 2: Grouping of a number is done from right to left in pair. The number of groups determine the number of digits a square root of number have.Step 3: Suppose a perfect square root is in the form of X2 + 2RX + R2.
We subtract off the current approximation, X2, which gives 2RX + R2
Step 4: 2RX + R2 = R(2X + R).
Here our current approximation, X, is doubled resulting in 2X, which are the first digits of the number we will be working with.
Step 5: The correct approximation of R will determine the two digits of the square root. This number (R) must divide into the next grouping with the smallest remainder.
Step 6: The procedure can be repeated as many times as necessary until either no remainder is found.
No comments:
Post a Comment