Develop an efficient algorithm to find the square root of a positive real number.
To approximate the square root of N, set X to N and then iterate replacing X by (X^2+N)/(2X).
2nd method: replace X by (X^3+3NX)/(3X^2+N).
3rd method: replace X by (X^4+6NX^2-N^2)/(8X^3).
The first one is the classic Newton method; I worked out the next two
by myself though these results may also be old and well known --just
not by me!
|
Posted by Oskar
on 2004-06-29 08:25:56 |