Jon Perry on Sun, 14 Nov 2004 21:47:24 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
sqrt |
May I ask for a profesional opinion on this sqrt algorithm? Consider sqrt(n) where n has D digits. The square root therefore has D/2 or D+1/2 digits according to D being even or odd, let this be d. Create y=10^d. Add 10^d until y^2>n, then subtract 10^d to maintain 'underness'.. Lower d by 1, and repeat. Jon Perry perry@globalnet.co.uk http://www.users.globalnet.co.uk/~perry/maths/ http://www.users.globalnet.co.uk/~perry/DIVMenu/ BrainBench MVP for HTML and JavaScript http://www.brainbench.com