1

For a school science fair project, I need four or five square root algorithms to use. Googling gives sites like http://en.wikipedia.org/wiki/Methods_of_computing_square_roots with so many methods that I don't know how to narrow it down to four or five.

I desire the most standard ones, that are simple to program in java. For example, the classic Newton's Iteration and the Bhaskara-Brouncker algorithm (The two i found so far)

Also, I found Square Root Algorithm except I don't know the names of the algorithms used

I need an answer urgently. Thanks in advance.

  • If you are looking for $\lfloor \sqrt{n}\rfloor$, then I would say that linear and binary searches would be good choices. If you are looking for a float that approximates $\sqrt{x}$, then binary search and continued fractions might be a good choice. Note that the binary search is very similar to bisection method. – dtldarek Oct 14 '13 at 20:16
  • Duplicate of http://math.stackexchange.com/q/526184/18398 – JRN Dec 07 '13 at 23:36

2 Answers2

2

Bombelli's method is quite nice, and also rather efficient from a computational point of view. It was taught in Italian schools until a few years ago!

1

I'd go for:

1) Newton's Method

2) Midpoint Method

3) Secant Method

4) Taylor Series approximation

They're all similar in spirit in the sense that they all involve the derivative in some way and they're super simple to program because they're just math formulas you can just type in Java.

Hassan Hayat
  • 1,234