>>13172743looks like the first iteration of newton's method
To solve x^2 - X = 0, start with your initial guess at x = sqrt(Y), where Y is the closest square to X.
The equation of the tangent line is y - (sqrt(Y)^2 - X) = (2sqrt(Y))*(x - sqrt(Y)).
Setting y=0 and solving for x gives x = (X - Y)/(2sqrt(Y)) + sqrt(Y) = (X + Y)/(2sqrt(Y))
The fact that nobody mentioned newton's method in this thread makes me think kids are dumber today than 10 years ago.