while ($i++< $iterations) { $sqrt = $sqrt + 0.5*($y - $sqrt**2) / $sqrt; }