        for my $i (1 .. 100000) {
          my $n = $i / 100;
          my $s = square_root($n);
#          printf "sqrt(%5.2f) = %8.6f\n", $n, square_root($n);
        }

        sub square_root {
          my $tolerance = 0.000001;
          my $g = my $n = shift;
          while (abs($g * $g - $n) >= $tolerance) { 
            $g = ($n/$g + $g)/2;
          }
          $g;
        }
