mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 11:18:59 +01:00
Translating...
This commit is contained in:
parent
6399888253
commit
407ca2286b
@ -18,7 +18,7 @@ class TelepyShell extends Cmd {
|
||||
}
|
||||
return array_slice($line, null, $blank_pos)->lower() . ' ' . array_slice($line, ($blank_pos + 1), null);
|
||||
}
|
||||
function completedefault( . . . $ignored) {
|
||||
function completedefault(...$ignored) {
|
||||
pyjslib_printnl($ignored);
|
||||
}
|
||||
function complete($text, $state) {
|
||||
|
@ -43,8 +43,7 @@ function isprime($n, $precision = 7) {
|
||||
$d = ($n - 1);
|
||||
$s = 0;
|
||||
while ((($d % 2) == 0)) {
|
||||
$d
|
||||
//= 2;
|
||||
$d = floor($d /2);
|
||||
$s+= 1;
|
||||
}
|
||||
foreach (pyjslib_range($precision) as $repeat) {
|
||||
@ -112,8 +111,7 @@ function primefactors($n, $sort = false) {
|
||||
}
|
||||
while ((($n % $checker) == 0)) {
|
||||
$factors[] = $checker;
|
||||
$n
|
||||
//= $checker;
|
||||
$n = floor($n / $checker);
|
||||
$limit = (pyjslib_int(pow($n, 0.5)) + 1);
|
||||
if (($checker > $limit)) {
|
||||
break;
|
||||
@ -130,8 +128,7 @@ function primefactors($n, $sort = false) {
|
||||
}
|
||||
$factor = pollard_brent($n);
|
||||
$factors->extend(primefactors($factor));
|
||||
$n
|
||||
//= $factor;
|
||||
$n = floor($n / $factor);
|
||||
|
||||
}
|
||||
if ($sort) {
|
||||
|
Loading…
Reference in New Issue
Block a user