Subj : Re: sqrt algo To : comp.programming From : Jean-Claude Arbaut Date : Thu Jul 14 2005 12:42 am Le 13/07/05 15:10, dans slrndda4mg.2j6n.willem@toad.stack.nl, « Willem » a écrit : > himanshu wrote: > ) Can anyone shed light on an Algorithm for finding out the square root of > ) a number? to make it simple lets only consider integers. > > You should ask Isaac, he came up with a pretty nice algorithm for that. Or babylonians ;-) u(n+1) = 1/2 * (u(n) + a/u(n)) u(0) > 0 converges to sqrt(a). And, better, there is a closed form for u(n) (needs to play with cosh). .