What should the initial guess be for the Babylonian method of calculating square roots? You can use any value as the initial guess for the Babylonian method of calculating a square root (other than 0), but the closer the guess to the root, the more accurate your result per iteration.
Of course you cannot expect to use the correct root as the initial guess, otherwise you've already solved the problem.
But I am wondering what simple method I could use to approximate the initial value? For example, I could use (number / 2), but there is probably a better method?
 A: The point is that once you get close, you double the number of significant figures each iteration.  You quickly get the precision you need.  The best way to get the initial value depends on what format you get the number to take the square root of in.  If you get a computer value with binary exponent and mantissa, you can just cut the exponent in half.  That will be within a factor $\sqrt 2$ of the correct value.  If you just get a real number, dividing by $2$ only helps when the number is greater than $\sqrt 2$, otherwise it hurts.  Whether this is a good trade depends on the probability distribution of the numbers you are asked to take the square root of.  If you think you will get preferentially small numbers (less than $\sqrt 2)$ you should just take the supplied number as the first guess.
A: If the number is large,
say $m$ digits,
take the first
15 digits
and take the floating point square root.
Let $n = \lfloor m/2 \rfloor$.
Normalize that so it is between
$10^n$ and $10^{n+1}$.
If $m$ is odd,
multiply that by
$\sqrt{10}$.
A: You can reduce resp. increase the number by known square factors like 4 or 9/4. The first can be done by inspecting the floating point format, i.e., the exponent. This allows to reduce the starting value for the Newton iteration to the interval $[1/2,2]$ or $[2/3,3/2]$ respectively.
A: The Babylonian method is the same as using Newton's method to find a root of $f(x) = x^2 - a$, where a is the number that you want to find the square root of.  The first two pages of this paper show that Newton's method converges quadratically under certain circumstances:
http://www.dartmouth.edu/~michaeldowns/writeup.pdf (Wayback Machine)
Specifically, on intervals $[z-c, z+c]$ where $z$ is a root of $f$, $f'(x)$ is nonzero, and $f''(x)$ is bounded.  In this case, $f'(x) = 2x$ is zero at $x = 0$, and $f''(x) = 2$ is bounded everywhere.  If your starting guess is in $(0, 2\sqrt a)$, it will converge to the positive root, and if your starting guess is in $(-2\sqrt a, 0)$ it will converge to the negative root.
If you're using this to calculate the square root of a floating point number, you could halve the exponent, since $\sqrt{2^nx} = 2^{n/2}\sqrt x$.  There is a famous algorithm for calculating inverse square roots that manipulates floating point numbers to make a good initial guess:
https://en.wikipedia.org/wiki/Fast_inverse_square_root
