4 ms·
oh I used to derive this in high school by Newton's method: x[k] = x[k - 1] - x[k-1]^2/2x[k-1] = x[k] / 2 + a / 2x[k]; base case x[0] = a reasonable guess of th
by stevefan1999 4y ago
oh I used to derive this in high school by Newton's method: x[k] = x[k - 1] - x[k-1]^2/2x[k-1] = x[k] / 2 + a / 2x[k]; base case x[0] = a reasonable guess of the initial square root.
Do a few iterations and you will get a close estimate of the square root.
In fact the babylonians found it first by intuition a few thousand years ago it was Newton and Ralpson who proved and generalized it to all derivable functions I think?
So the big advantage of this is that it is easily applicable to say like cubic root or quintic root, although the difficulty goes harder and harder.