1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:38:59 +01:00
This commit is contained in:
danogentili 2016-07-30 17:17:03 +02:00
commit 5c0c0909ed

View File

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