What is the fastest algorithm for finding the square root of a number?
I created one that can find the square root of "987654321" to 16 decimal places in just 20 iterations (I'm not ready to release it just yet)...
When I tried this with Newton's method it took well over 100,000 iterations.
What is the fastest known algorithm for taking the second root of a number?
My code for Newton's Method (*Edit: there was an error in my code, it is fixed in the comments below):
a=2//2nd root
b=97654321//base
n=1//initial guess
c=0//current iteration (this is a changing variable)
r=500000 //total number of iterations to run
while (c<r) {
m = n-(((n^a)-b)/(a*b))//Newton's algorithm
n=m
c++;
trace(m + " <--guess ... iteration--> " + c)
}



a*ninstead ofa*bin the denominator. – Rahul Narain Feb 6 at 7:26