Develop an efficient algorithm to find the square root of a positive real number.

Take (x+1) to any natural power; say, (x+1)^6= x^6 +6x^5 +15x^4 +20x^3 +15x^2 +6x^1 +x^0.

Now take odd positions (x^6 +15x^4 +15x^2 +x^0) and even positions (6x^5 +20x^3 +6x^1). Add powers of n, as follows: x^6 +15x^4n^1 +15x^2n^2 +x^0n^3 and 6x^5 +20x^3n^1 +6x^1n^2. (a^bc^d means a^b times c^d.)

Now, if you start with x=n, and then iterate letting x become (x^6 +15x^4n^1 +15x^2n^2 +x^0n^3)/(6x^5 +20x^3n^1 +6x^1n^2), the iteration will converge to √n.

*Edited on ***July 2, 2004, 2:07 pm**