Subj : Re: sqrt algo To : comp.programming From : Martijn Date : Thu Jul 14 2005 11:28 pm > Here is an iterative one (from the ancient Egypt, I have been told): > > current_estimate = 0.5*(previous_estimate + number/previous_estimate) > > You'll have to terminate it when you are "close enough". (It > converges quite quickly, the number itself may serve as the first > estimate.) In which case you might as well take 1. -- Martijn http://www.sereneconcepts.nl .