[QUOTE=Chronos]
Another method which is less efficient than Newton-Raphson, but which is even more universally applicable (i.e., a variation of the method is useful for many problems other than square roots), is the method of bisection. Again, using the square root of 2 as an example:
I know that 1 is too small to be sqrt(2), since 1^2 = 1, and I know that 2 is too big, since 2^2 = 4. So try something halfway in between: 1.5. Well, that’s still too big, since 1.5^2 = 2.25. So now I try something between 1 and 1.5. 1.25 is too small, since 1.25^2 = 1.5625. So now I try between 1.25 and 1.5, and so on.
[/QUOTE]
It can be more efficient, actually.
For my thesis, I wrote several programs (which now come with your Excel, but weren’t available then and actually mine gave the user more control) to calculate probabilities (Gaussian, t, F and Xi2).
You could calculate the probability to the right or the left of a number, or given the probability get the number. The second case required iteration; I proved that starting with bisection and switching over to N-R once your interval was small enough was the best of both worlds (my advisor was looking at me real funny, since his notion had been to prove that N-R was always faster; well, it wasn’t, and in some cases bisecting was faster, my method always found these special cases before switching over). Sometimes N-R would get itself into a loop, where it tried value A, then B, then C, then D, then A… so I also put in some triggers to detect loops or “this is taking too long” and go back to bisecting.
Not only is bisecting so simple it hurts, it doesn’t produce loops.