Saturday, May 24, 2014

Sqrt

Computers are wonderful. The following program implements the Newton-Raphson
algorithm for finding square roots. The idea of approximating one's way to a solution
dates back to the Babylonians.

This program uses the behaviour of 2, square root of four, as a template. All true
square roots will eventually hit 0 on the condition.

The marvel is, the computer will also give intermediate results, on request. Awesome!!



No comments: