Many Thanks, and a Follow-up

Firstly, I thank everyone who offered their input.

Secondly— I conferred with a mathematically-gifted friend of mine, and researched the matter online. I found a whole bunch of methods, including the Newton Method, Bisection Method, and an ancient technique called the Bahkshali formula. Now I just need to figure out how to implement these in C++.

Bahkshali formula:

sqrt(Q) = sqrt(A^2 + b) =

A + b/ (2A) - (b/ (2A) )^2/ [2(A + b/ (2A) ) ]

• Where A = largest perfect square that will go

into Q, and b = remainder

Bisection Method:

1) Factor. 2) Find 2 closest factors.

3) Avg. the 2. 4) Div. orig. # by avg.

5) Repeat 3-4 to desired accuracy.

Ex.) 500 = 10 • 50 avg = 30

500 / 30 = 50/3 avg (30, 50/3) = 70/3

500 / (70/3) = 150/7 avg (70/3, 150/7) ≈

22.381

500/22.381 ≈ 22.340

500 ≈ (22.381)(22.340)

If I remember correctly, the Bahkshali formula is accurate to the hundred-thousandth's place, and Bisection is accurate to whatever degree you choose to take it to.

Check out URL=http://mathforum.org/library/drmath/sets/high_square_roots.html]Ask Dr. Math[/URL] to see a whole these and a whole lot more algorithms.