in reply to Re: Re: Square Root algorithm
in thread Square Root algorithm

yep,

Sort of. I think I just mis-read my comparison (got confused coz I was using guess and next guess...)

Change this:

while (abs($num - $guess**2) > 1e-13) {
to the more accurate comparison (with 2 more decimal places of accuracy):
while (abs($num/$guess - $guess) > 1e-15) {
and it works fine :)

cLive ;-)