1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:59:02 +01:00
MadelineProto/sqr.php

14 lines
274 B
PHP

<?php
function mysqr($n) {
$guess = $n / 2;
while (true) {
$last = $guess;
$guess = (($n / $guess) + $guess) / 2;
if($last == $guess) {
break;
}
}
return $guess;
}
var_dump(mysqr(234892482328),sqrt(234892482328));