if we're golfing this, you can reduce that line a bit:
At 29 characters. It seems to work correctly on perl5.6sub sqroot { #23456789_123456789_123456789_123456 $g++;$g=($_[0]/$g+$g)/2for-1..pop;$g }
jynx
update: d'oh, i was erroneously fooled by my browser when entering the snippet, it's actually 36 characters...
In reply to Re: Re: Square Root algorithm
by jynx
in thread Square Root algorithm
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |