Finding Square Roots w/ Recursion

I'm trying to write a method that finds the square root of a number using recursion. So far i have the following:

publicdouble rootMeth(double a)

{

if (a < = 1)

return a;

else

return a / rootMeth(a-2);

}

I know this is not right, but it does work for a few numbers, if you can help it would be appreciated greatly. Thanks.

[666 byte] By [msd59a] at [2007-10-2 10:43:21]
# 1
Never mind, i found an old post, and i can't figure out how to delete this soo, yeah thx ne way
msd59a at 2007-7-13 2:53:01 > top of Java-index,Other Topics,Algorithms...