2 ms·
I guess it's this: if you have a guess G at the square root of N, compute N/G. If G is too large, N/G will be too small and vice versa (well, as long as your in
by Someone 14y ago
I guess it's this: if you have a guess G at the square root of N, compute N/G. If G is too large, N/G will be too small and vice versa (well, as long as your initial guess is larger than zero)
Also, G' = (G+N/G)/2 will be a better guess than G.
Iterate.
If that's not it, pick one from http://en.wikipedia.org/wiki/Methods_of_computing_square_roots http://en.wikipedia.org/wiki/Methods_of_computing_square_roo...