| line |
true |
false |
branch |
|
12
|
15 |
12 |
unless (defined $Math::BigInt::VERSION) |
|
51
|
4 |
1187 |
if ($_have_MPFR < 0) |
|
54
|
0 |
4 |
if !defined($ENV{'MPU_NO_MPFR'}) || $ENV{'MPU_NO_MPFR'} != 1 and eval {
do {
require Math::MPFR;
$Math::MPFR::VERSION >= 2.03
}
} |
|
56
|
0 |
4 |
if $_have_MPFR and Math::MPFR::MPFR_VERSION_MAJOR() < 3 |
|
58
|
0 |
1191 |
if ($_have_MPFR and scalar @_ == 2) |
|
60
|
0 |
0 |
if Math::MPFR::MPFR_VERSION_MAJOR() < $major |
|
61
|
0 |
0 |
if Math::MPFR::MPFR_VERSION_MAJOR() == $major and Math::MPFR::MPFR_VERSION_MINOR() < $minor |
|
70
|
0 |
0 |
unless _is_positive_int($n) |
|
71
|
0 |
0 |
if $n > $_precalc_size |
|
75
|
0 |
0 |
if defined $Math::MPFR::VERSION |
|
82
|
0 |
0 |
if defined $_[0] and $_[0] ne '' |
|
94
|
1 |
1011 |
unless (defined $Math::BigFloat::VERSION) |
|
107
|
30 |
0 |
if ref($x) =~ /^Math::Big/ |
|
108
|
15 |
15 |
if defined $b |
|
111
|
0 |
0 |
$i > $f ? : |
|
|
0 |
15 |
if defined $i and defined $f |
|
112
|
0 |
15 |
if defined $i |
|
113
|
0 |
15 |
if defined $f |
|
116
|
0 |
15 |
$i > $f ? : |
|
|
15 |
0 |
if defined $i and defined $f |
|
117
|
0 |
0 |
if defined $i |
|
118
|
0 |
0 |
if defined $f |
|
124
|
0 |
0 |
if (defined $bignum::VERSION or ref($_[0]) =~ /^Math::Big/) |
|
125
|
0 |
0 |
unless (defined $Math::BigFloat::VERSION) |
|
127
|
0 |
0 |
if (ref $_[0] eq 'Math::BigInt') |
|
130
|
0 |
0 |
if $xacc |
|
132
|
0 |
0 |
if ref $_[0] ne 'Math::BigFloat' |
|
142
|
0 |
38 |
unless defined $n |
|
143
|
25 |
13 |
if ref $n |
|
144
|
0 |
13 |
if $n eq '' or $n =~ tr[0-9][\000-/:-\377]c and not $n =~ /^\+\d+$/ |
|
146
|
0 |
13 |
if defined $min and $n < $min |
|
147
|
0 |
13 |
if defined $max and $n > $max |
|
148
|
0 |
13 |
if substr($n, 0, 1) eq '+' |
|
149
|
0 |
13 |
unless $n < 18446744073709551615 or int $n eq '18446744073709551615' |
|
155
|
0 |
12444 |
unless defined $n |
|
156
|
0 |
12444 |
if (ref $n eq 'CODE') |
|
160
|
1059 |
11385 |
if (ref $n eq 'Math::BigInt') { } |
|
|
0 |
11385 |
elsif (ref $n eq 'Math::GMPz') { } |
|
161
|
0 |
1059 |
if $n->sign ne '+' or not $n->is_int |
|
163
|
13 |
1046 |
if $n <= {sign => '+', value => [709551615, 446744073, 18]} |
|
165
|
0 |
0 |
if Math::GMPz::Rmpz_sgn($n) < 0 |
|
166
|
0 |
0 |
if $n <= 18446744073709551615 |
|
169
|
1 |
11384 |
if $strn eq '' or $strn =~ tr[0-9][\000-/:-\377]c and not $strn =~ /^\+?\d+$/ |
|
171
|
11258 |
126 |
if ($n <= 18446744073709551615) { } |
|
172
|
0 |
11258 |
if ref $n |
|
177
|
0 |
12443 |
if ref $_[0] eq 'Math::BigInt' and $_[0]->upgrade |
|
178
|
0 |
12443 |
if defined $min and $_[0] < $min |
|
179
|
0 |
12443 |
if defined $max and $_[0] > $max |
|
185
|
0 |
1197 |
unless defined $n |
|
186
|
0 |
1197 |
if (ref $n eq 'CODE') |
|
192
|
1185 |
12 |
if (ref $n eq 'Math::BigInt') { } |
|
193
|
0 |
1185 |
unless $n->is_int |
|
194
|
496 |
689 |
if $n <= $poscmp and $n >= $negcmp |
|
197
|
0 |
12 |
if $strn eq '' or $strn =~ tr[\-0-9][\000-,./:-\377]c and not $strn =~ /^[-+]?\d+$/ |
|
199
|
9 |
3 |
if ($n <= $poscmp and $n >= $negcmp) { } |
|
200
|
0 |
9 |
if ref $n |
|
205
|
0 |
1197 |
if ref $_[0] and $_[0]->upgrade |
|
213
|
0 |
0 |
if defined $exitsub and &$exitsub($n, $lo, $hi) |
|
214
|
0 |
0 |
if (&$sub($mid) < $n) { } |
|
239
|
0 |
2 |
if $n >= $_primes_small[-1] |
|
244
|
8 |
10 |
if ($_primes_small[$mid] <= $n) { } |
|
253
|
0 |
7714 |
if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]} |
|
254
|
568 |
7146 |
if (ref $n eq 'Math::BigInt') |
|
255
|
151 |
417 |
unless Math::BigInt::bgcd($n, {sign => '+', value => [568529303, 51702675, 261944]})->is_one |
|
256
|
265 |
152 |
unless _miller_rabin_2($n) |
|
258
|
0 |
141 |
$n <= '18446744073709551615' ? : |
|
|
141 |
11 |
$is_esl_prime ? : |
|
261
|
1754 |
5392 |
if ($n < 3721) |
|
263
|
1293 |
6344 |
if $i * $i > $n |
|
264
|
459 |
5885 |
unless $n % $i |
|
269
|
156 |
3348 |
unless $n % 7 and $n % 11 and $n % 13 and $n % 17 and $n % 19 and $n % 23 and $n % 29 and $n % 31 and $n % 37 and $n % 41 and $n % 43 and $n % 47 and $n % 53 and $n % 59 |
|
283
|
110 |
3238 |
if ($n <= 1500000) |
|
287
|
4 |
624 |
unless $n % $i and $n % ($i + 6) and $n % ($i + 10) and $n % ($i + 12) and $n % ($i + 16) and $n % ($i + 18) and $n % ($i + 22) and $n % ($i + 28) |
|
294
|
61 |
276 |
if $i > $limit |
|
295
|
1 |
275 |
unless $n % $i |
|
301
|
3219 |
19 |
if ($n < 47636622961201) |
|
306
|
3169 |
50 |
if ($n < 19471033) { } |
|
|
4 |
46 |
elsif ($n < 38010307) { } |
|
|
12 |
34 |
elsif ($n < 316349281) { } |
|
|
29 |
5 |
elsif ($n < 4759123141) { } |
|
|
3 |
2 |
elsif ($n < 154639673381) { } |
|
|
2 |
0 |
elsif ($n < 47636622961201) { } |
|
|
0 |
0 |
elsif ($n < 3770579582154547) { } |
|
314
|
318 |
2901 |
is_strong_pseudoprime($n, @bases) ? : |
|
318
|
7 |
12 |
unless _miller_rabin_2($n) |
|
319
|
12 |
0 |
is_almost_extra_strong_lucas_pseudoprime($n) ? : |
|
324
|
4 |
3378 |
if defined $n and int $n < 0 |
|
327
|
918 |
2460 |
if (ref $n eq 'Math::BigInt') { } |
|
328
|
386 |
532 |
unless Math::BigInt::bgcd($n, {sign => '+', value => ['30']})->is_one |
|
330
|
59 |
9 |
$n == 2 || $n == 3 || $n == 5 ? : |
|
|
68 |
2392 |
if ($n < 7) |
|
331
|
753 |
1088 |
unless $n % 2 and $n % 3 and $n % 5 |
|
345
|
0 |
23 |
if defined $n and int $n < 0 |
|
347
|
16 |
7 |
unless _miller_rabin_2($n) |
|
348
|
0 |
7 |
if ($n <= 18446744073709551615) |
|
349
|
0 |
0 |
is_almost_extra_strong_lucas_pseudoprime($n) ? : |
|
351
|
6 |
1 |
is_extra_strong_lucas_pseudoprime($n) ? : |
|
356
|
0 |
5 |
if defined $n and $n < 2 |
|
358
|
0 |
5 |
if ($n <= 18446744073709551615) |
|
359
|
0 |
0 |
unless _miller_rabin_2($n) |
|
360
|
0 |
0 |
unless is_almost_extra_strong_lucas_pseudoprime($n) |
|
390
|
6 |
35 |
if ($end & 1) == 0 |
|
394
|
0 |
41 |
if $whole > 1145324612 |
|
415
|
12 |
606 |
if $end > $primary_size_limit |
|
417
|
2 |
604 |
if ($primary_sieve_size == 0) |
|
429
|
0 |
547 |
if ref $end and $end <= {sign => '+', value => [709551615, 446744073, 18]} |
|
431
|
0 |
547 |
if $beg % 2 == 0 |
|
432
|
0 |
547 |
if $end % 2 == 0 |
|
433
|
0 |
547 |
if $end < $beg |
|
434
|
0 |
547 |
if $beg < 3 |
|
442
|
14 |
533 |
if $beg == 3 |
|
443
|
2 |
545 |
if $beg == 5 |
|
448
|
11 |
536 |
if $end < 49 |
|
450
|
0 |
536 |
ref $end ? : |
|
451
|
536 |
0 |
if not defined $limit or $sqlimit < $limit |
|
459
|
39327 |
698 |
if ($p2 < $beg) |
|
461
|
19575 |
19752 |
unless $f % 2 |
|
466
|
20147 |
19878 |
if ($p2 <= $end) |
|
482
|
1 |
1 |
unless (defined $high) |
|
488
|
0 |
2 |
if $low > $high |
|
492
|
2 |
0 |
if ($high - $low < 1000) |
|
493
|
2 |
0 |
if $low >= 2 |
|
503
|
0 |
0 |
if $low <= 2 and $high >= 2 |
|
504
|
0 |
0 |
if $low <= 3 and $high >= 3 |
|
505
|
0 |
0 |
if $low <= 5 and $high >= 5 |
|
506
|
0 |
0 |
if $low < 7 |
|
507
|
0 |
0 |
if $low % 2 == 0 |
|
508
|
0 |
0 |
if $high % 2 == 0 |
|
513
|
0 |
0 |
if _miller_rabin_2($p) and is_extra_strong_lucas_pseudoprime($p) |
|
520
|
59 |
104 |
if (scalar @_ > 1) { } |
|
523
|
8 |
51 |
if $low < 2 |
|
529
|
6 |
157 |
if $low > $high or $high < 2 |
|
530
|
265900 |
1603 |
if $_ >= $low |
|
|
146 |
11 |
if $high <= $_primes_small[-1] |
|
534
|
0 |
11 |
if $Math::Prime::Util::_GMPfunc{'sieve_primes'} and $Math::Prime::Util::GMP::VERSION >= 0.34 |
|
539
|
0 |
10 |
if ref $low eq 'Math::BigInt' or ref $high eq 'Math::BigInt' or $low > 1000000000000 and $high - $low < int $low / 1000000 |
|
543
|
2 |
8 |
if $low <= 2 and $high >= 2 |
|
544
|
2 |
8 |
if $low <= 3 and $high >= 3 |
|
545
|
2 |
8 |
if $low <= 5 and $high >= 5 |
|
546
|
3 |
7 |
if $low < 7 |
|
547
|
5 |
5 |
if $low % 2 == 0 |
|
548
|
7 |
3 |
if $high % 2 == 0 |
|
549
|
0 |
10 |
if $low > $high |
|
552
|
3 |
7 |
if ($low == 7) { } |
|
573
|
0 |
0 |
if ($n < 5) |
|
574
|
0 |
0 |
if $n <= 2 and $n + $width - 1 >= 2 |
|
575
|
0 |
0 |
if $n <= 3 and $n + $width - 1 >= 3 |
|
576
|
0 |
0 |
if $n <= 4 and $n + $width - 1 >= 4 and $depth < 2 |
|
581
|
0 |
0 |
if $depth < 2 |
|
583
|
0 |
0 |
if $_ & 1 |
|
584
|
0 |
0 |
if $depth < 5 |
|
587
|
0 |
0 |
unless ($start & 1) |
|
588
|
0 |
0 |
unless $width & 1 |
|
589
|
0 |
0 |
if $width < 1 |
|
605
|
0 |
12 |
if ($Math::Prime::Util::_GMPfunc{'sieve_prime_cluster'}) |
|
606
|
0 |
0 |
$_ > '18446744073709551615' ? : |
|
610
|
0 |
12 |
if scalar @cl == 0 |
|
615
|
0 |
36 |
if $cl[$i] & 1 |
|
616
|
0 |
36 |
if $cl[$i] <= $cl[$i - 1] |
|
619
|
12 |
0 |
if $hi - $lo < 50000000 |
|
620
|
12 |
0 |
if $hi - $lo < 1000000 |
|
621
|
1 |
11 |
if $hi - $lo < 20000 and $lo < 18446744073709551615 |
|
624
|
2 |
10 |
if ($lo <= $sievelim) |
|
625
|
0 |
2 |
if $sievelim > $hi |
|
629
|
484 |
122 |
unless (is_prime($n + $cl[$ci])) |
|
631
|
122 |
484 |
if $ac |
|
635
|
0 |
12 |
if $lo > $hi |
|
641
|
12810 |
12810 |
if $_ & 1 |
|
643
|
48 |
0 |
if ($p >= 7) { } |
|
644
|
10579 |
6039 |
if ($_ + $c) % 3 and ($_ + $c) % 5 |
|
646
|
0 |
0 |
if ($_ + $c) % 3 |
|
654
|
0 |
12 |
if $_verbose |
|
655
|
0 |
12 |
if scalar @acc == 0 |
|
673
|
12 |
58 |
if ($lo + $acc[-1] > $hi) |
|
682
|
30 |
12470 |
unless scalar @racc |
|
687
|
40 |
79 |
unless scalar @racc |
|
696
|
0 |
12 |
if $_verbose |
|
703
|
0 |
0 |
if $n <= 0 |
|
708
|
0 |
0 |
if is_prime($k) |
|
709
|
0 |
0 |
if $s < $n |
|
710
|
0 |
0 |
if ($k & 3) == 1 and is_prime($k + 1 >> 1) |
|
711
|
0 |
0 |
if $s < $n |
|
718
|
0 |
0 |
unless defined $high |
|
719
|
0 |
0 |
if $low > $high or $high < 2 |
|
729
|
0 |
0 |
if $n == 2 |
|
730
|
0 |
0 |
if $n < 11 |
|
732
|
0 |
0 |
scalar @$L > 0 ? : |
|
737
|
0 |
0 |
if $n <= 0 |
|
745
|
4020 |
822 |
if $n <= $#_prime_next_small |
|
749
|
5 |
817 |
if ref $n ne 'Math::BigInt' and $n >= 18446744073709551557 |
|
753
|
0 |
12 |
if ($n > 4294967295 and Math::Prime::Util::prime_get_config()->{'gmp'}) |
|
757
|
12 |
805 |
if (ref $n eq 'Math::BigInt') { } |
|
773
|
1 |
157 |
if $n <= 11 |
|
774
|
0 |
3 |
if ($n > 4294967295 and Math::Prime::Util::prime_get_config()->{'gmp'}) |
|
778
|
3 |
154 |
if (ref $n eq 'Math::BigInt') { } |
|
796
|
4 |
53 |
$n >= 400 ? : |
|
801
|
9683 |
464380 |
if $p > $j |
|
802
|
237074 |
227306 |
if (++$k & 2) { } |
|
817
|
30 |
37 |
if ($n < $max) |
|
827
|
893 |
67 |
if ($m <= 18446744073709551615) { } |
|
837
|
57 |
46 |
$n >= $max ? : |
|
|
0 |
103 |
ref $n ? : |
|
843
|
47 |
56 |
if $pn <= {sign => '+', value => [709551615, 446744073, 18]} |
|
849
|
0 |
0 |
$n == 1 ? : |
|
|
0 |
25 |
if $k == 0 |
|
850
|
0 |
25 |
if $k == 1 |
|
851
|
0 |
0 |
$n == 1 ? : |
|
|
0 |
25 |
if $n <= 1 |
|
854
|
0 |
25 |
if $Math::Prime::Util::_GMPfunc{'jordan_totient'} |
|
858
|
23 |
2 |
unless ref $n eq 'Math::BigInt' |
|
866
|
23 |
2 |
if $totient->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
871
|
2 |
4 |
if scalar @_ > 1 |
|
875
|
0 |
4 |
if $Math::Prime::Util::_GMPfunc{'totient'} |
|
878
|
0 |
4 |
if $n < 0 |
|
879
|
0 |
4 |
if $n <= 1 |
|
884
|
1 |
3 |
if (ref $n eq 'Math::BigInt') { } |
|
886
|
1 |
0 |
if ($n->is_even) |
|
888
|
0 |
1 |
if $s > 1 |
|
892
|
2 |
1 |
if ($n % 2 == 0) |
|
897
|
3 |
1 |
if (ref $n ne 'Math::BigInt') { } |
|
912
|
0 |
4 |
if ref $totient eq 'Math::BigInt' and $totient->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
919
|
0 |
2 |
if $nend < $n |
|
920
|
0 |
2 |
if $n == $nend |
|
922
|
0 |
2 |
if ($nend > 1073741824) { } |
|
929
|
1343 |
261 |
unless $totients[$i] == $i |
|
935
|
1 |
1 |
if $n > 0 |
|
941
|
1 |
8 |
if scalar @_ > 1 |
|
943
|
0 |
0 |
$n == 1 ? : |
|
|
0 |
8 |
if $n <= 1 |
|
944
|
0 |
8 |
if $n >= 49 and not $n % 4 && $n % 9 && $n % 25 && $n % 49 |
|
947
|
0 |
25 |
if $factors[$i] == $factors[$i - 1] |
|
949
|
3 |
5 |
scalar(@factors) % 2 ? : |
|
952
|
2 |
0 |
&Math::Prime::Util::moebius($_[0]) != 0 ? : |
|
957
|
0 |
1 |
if $n < 6 |
|
958
|
0 |
0 |
&Math::Prime::Util::is_prob_prime($n >> 1) ? : |
|
|
0 |
1 |
if $n % 2 == 0 |
|
959
|
0 |
0 |
&Math::Prime::Util::is_prob_prime($n / 3) ? : |
|
|
0 |
1 |
if $n % 3 == 0 |
|
960
|
0 |
0 |
&Math::Prime::Util::is_prob_prime($n / 5) ? : |
|
|
0 |
1 |
if $n % 5 == 0 |
|
963
|
1 |
0 |
if @f > 2 |
|
964
|
0 |
0 |
_is_prime7($f[1]) ? : |
|
|
0 |
0 |
if @f == 2 |
|
966
|
0 |
0 |
if _is_prime7($n) |
|
969
|
0 |
0 |
if @f > 2 |
|
970
|
0 |
0 |
_is_prime7($f[1]) ? : |
|
|
0 |
0 |
if @f == 2 |
|
974
|
0 |
0 |
if @f > 2 |
|
975
|
0 |
0 |
_is_prime7($f[1]) ? : |
|
|
0 |
0 |
if @f == 2 |
|
977
|
0 |
0 |
scalar &Math::Prime::Util::factor($n) == 2 ? : |
|
983
|
0 |
1 |
if $hi < $lo |
|
984
|
0 |
1 |
if $lo == $hi |
|
985
|
0 |
1 |
if ($hi > 4294967296) |
|
993
|
0 |
1 |
if $lo == 0 |
|
997
|
7 |
1 |
$lo % $i ? : |
|
|
8 |
1 |
if $i < $lo |
|
1003
|
7 |
2 |
$lo % $i ? : |
|
|
9 |
0 |
if $i < $lo |
|
1012
|
25 |
0 |
if abs $m != $i |
|
1024
|
0 |
1 |
if $n <= 1 |
|
1031
|
25 |
39 |
if $mu[$m] == 0 |
|
1039
|
1066 |
982 |
if $this_k == $next_k |
|
1050
|
0 |
0 |
if $k < 1 or $n < 1 |
|
1053
|
0 |
0 |
if $m == 0 or $k == $g |
|
1068
|
2 |
3 |
unless &Math::Prime::Util::is_prime_power($n, \$p) |
|
1074
|
0 |
3 |
if $n < 8 |
|
1075
|
0 |
3 |
if ($n & $n - 1) == 0 |
|
1078
|
0 |
3 |
if $pe[0][0] == 2 and $pe[0][1] > 2 |
|
1085
|
2 |
1 |
if $lcm->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
1096
|
0 |
0 |
if $n < 561 or $n % 2 == 0 |
|
1097
|
0 |
0 |
unless $n % 4 and $n % 9 and $n % 25 and $n % 49 and $n % 121 |
|
1100
|
0 |
0 |
if ($n > 100000000) |
|
1102
|
0 |
0 |
if &Math::Prime::Util::powmod(2, $n - 1, $n) != 1 |
|
1103
|
0 |
0 |
if &Math::Prime::Util::is_prime($n) |
|
1106
|
0 |
0 |
if ($gcd == 1) { } |
|
1107
|
0 |
0 |
if &Math::Prime::Util::powmod($a, $n - 1, $n) != 1 |
|
1109
|
0 |
0 |
if $gcd != $a |
|
1110
|
0 |
0 |
if ($n - 1) % ($a - 1) != 0 |
|
1119
|
0 |
0 |
if (length $fn > 50) |
|
1123
|
0 |
0 |
if ($gcd == 1) { } |
|
1124
|
0 |
0 |
if &Math::Prime::Util::powmod($a, $n - 1, $n) != 1 |
|
1126
|
0 |
0 |
if $gcd != $a |
|
1127
|
0 |
0 |
if ($n - 1) % ($a - 1) != 0 |
|
1136
|
0 |
0 |
if scalar @pe < 3 |
|
1138
|
0 |
0 |
if $pe->[1] > 1 or ($n - 1) % ($pe->[0] - 1) != 0 |
|
1147
|
0 |
0 |
if $n < 35 |
|
1148
|
0 |
0 |
unless $n % 4 and $n % 9 and $n % 25 and $n % 49 and $n % 121 |
|
1152
|
0 |
0 |
if scalar @pe < 2 |
|
1155
|
0 |
0 |
if $pe->[1] > 1 |
|
1159
|
0 |
0 |
if ($n < 2000) { } |
|
1165
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
$nb % ($_ - $b) == 0;
}
, @f) |
|
1167
|
0 |
0 |
if (scalar @f > 2) |
|
1170
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
$nb % ($_ + $b) == 0;
}
, @f) |
|
1175
|
0 |
0 |
if (scalar @f == 2) { } |
|
1179
|
0 |
0 |
if $d >= $spf |
|
1180
|
0 |
0 |
if $j |
|
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
my $j = $_ - $k;
$p % $j == 0 if $j;
}
, @f) |
|
1186
|
0 |
0 |
if $k == 0 or $k >= $spf |
|
1187
|
0 |
0 |
if $j |
|
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
my $j = $_ - $k;
$p % $j == 0 if $j;
}
, @f) |
|
1196
|
0 |
0 |
if defined $p and int $p < 0 |
|
1198
|
0 |
0 |
if $p <= 2 |
|
1204
|
0 |
0 |
if $nfac == $pm1 and $p % $n != 1 |
|
1213
|
1 |
1 |
if $neg |
|
1215
|
2 |
0 |
if ($r) |
|
1217
|
1 |
1 |
if (not $neg) { } |
|
1218
|
0 |
0 |
$r == 4 ? : |
|
|
0 |
1 |
if $r4 == 0 |
|
1219
|
1 |
0 |
if $r4 == 1 |
|
1221
|
0 |
1 |
$r == 12 ? : |
|
|
1 |
0 |
if $r4 == 0 |
|
1222
|
0 |
0 |
if $r4 == 3 |
|
1234
|
0 |
0 |
defined $k && $k == 0 ? : |
|
|
0 |
920 |
if $n == 0 |
|
1235
|
84 |
836 |
if $n == 1 |
|
1237
|
831 |
5 |
if (defined $k and ref $k eq 'CODE') |
|
1241
|
12 |
3474 |
$refn ? : |
|
1246
|
0 |
4 |
unless not defined $k or _validate_num($k) or _validate_positive_integer($k) |
|
1248
|
1 |
4 |
unless defined $k |
|
1251
|
0 |
5 |
if $Math::Prime::Util::_GMPfunc{'sigma'} |
|
1253
|
3 |
0 |
$k <= 5 ? : |
|
|
2 |
3 |
$k == 0 ? : |
|
1264
|
1 |
4 |
!$will_overflow ? : |
|
1265
|
2 |
3 |
if ($k == 0) { } |
|
|
0 |
3 |
elsif (not $will_overflow) { } |
|
|
0 |
3 |
elsif (ref $n and ref $n ne 'Math::BigInt') { } |
|
1284
|
0 |
0 |
if ($e >= 2) |
|
1295
|
64 |
15 |
if ($e == 1) { } |
|
|
4 |
11 |
elsif ($e == 2) { } |
|
1321
|
0 |
1089 |
if ($a == 0) { } |
|
|
0 |
1089 |
elsif ($a == 1) { } |
|
|
0 |
1089 |
elsif ($a == 2) { } |
|
|
3 |
1086 |
elsif ($a == 3) { } |
|
|
5 |
1081 |
elsif ($a == 4) { } |
|
|
0 |
1081 |
elsif ($a == 5) { } |
|
1339
|
11 |
10 |
if $a <= 6 |
|
1340
|
0 |
10 |
unless defined $primes |
|
1341
|
0 |
0 |
$x > 0 ? : |
|
|
0 |
10 |
if $x < $primes->[$a] |
|
1350
|
1011 |
1201 |
if ($sval < $primea) { } |
|
1359
|
0 |
1114 |
if $vals{$v} == 0 |
|
1371
|
3 |
58 |
if $high < 7 |
|
1372
|
20 |
38 |
unless $high & 1 |
|
1378
|
5437 |
2990 |
unless defined $high |
|
1380
|
5458 |
2969 |
if ($low < 3) { } |
|
1382
|
4232 |
4195 |
unless $high & 1 |
|
1383
|
0 |
8427 |
if $low > $high |
|
1387
|
498 |
7929 |
if (not defined $sref or $send >= length $$sref) |
|
1397
|
55 |
21 |
if $x < 1000 |
|
1398
|
0 |
21 |
if (ref $x eq 'Math::BigInt') |
|
1400
|
21 |
0 |
ref $x ne 'Math::BigInt' ? : |
|
1405
|
21 |
0 |
ref $x ne 'Math::BigInt' ? : |
|
1409
|
0 |
84 |
ref($_) =~ /^Math::Big/ ? : |
|
1413
|
0 |
21 |
$b <= 10 ? : |
|
1433
|
252 |
2738 |
if ($i <= $c) |
|
1447
|
7 |
13 |
unless (defined $high) |
|
1456
|
6 |
14 |
if $low <= 2 and $high >= 2 |
|
1457
|
7 |
13 |
if $low < 3 |
|
1459
|
7 |
13 |
if $low % 2 == 0 |
|
1460
|
10 |
10 |
if $high % 2 == 0 |
|
1461
|
2 |
18 |
if $low > $high |
|
1463
|
1 |
16 |
if (ref $low eq 'Math::BigInt' or ref $high eq 'Math::BigInt' or $high - $low < 10 or $high - $low < int $low / 100000000000) |
|
1476
|
10 |
6 |
if ($high > 50000) |
|
1477
|
5 |
5 |
if ($high / ($high - $low + 1) < 100) |
|
1479
|
2 |
3 |
$low == 3 ? : |
|
1484
|
4 |
7 |
if $low == 3 |
|
1496
|
0 |
20 |
if $n <= 0 |
|
1497
|
10 |
10 |
if $n <= $#_primes_small |
|
1499
|
0 |
10 |
if ($n > 425656284035217743 and ref $n ne 'Math::BigFloat') |
|
1500
|
0 |
0 |
unless (defined $Math::BigFloat::VERSION) |
|
1511
|
0 |
10 |
$n <= 10 ? : |
|
1512
|
3 |
7 |
if ($nth_prime_upper > 100000) |
|
1515
|
2 |
1 |
unless $nth_prime_lower % 2 |
|
1522
|
7 |
3 |
$n < 10000 ? : |
|
|
0 |
10 |
$n < 1000 ? : |
|
1527
|
10 |
25 |
if $count + $segcount >= $n |
|
1535
|
3696 |
14755 |
unless substr $$sieveref, $prime - $start >> 1, 1 |
|
1546
|
0 |
1 |
if $n <= 0 |
|
1547
|
0 |
1 |
if $n <= $#_primes_small |
|
1549
|
1 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
|
1555
|
1 |
0 |
if ($n >= 46254381) { } |
|
|
0 |
0 |
elsif ($n >= 8009824) { } |
|
|
0 |
0 |
elsif ($n >= 688383) { } |
|
|
0 |
0 |
elsif ($n >= 178974) { } |
|
|
0 |
0 |
elsif ($n >= 39017) { } |
|
|
0 |
0 |
elsif ($n >= 6) { } |
|
1577
|
0 |
3 |
unless _validate_num($n) |
|
1579
|
0 |
3 |
if $n <= 0 |
|
1580
|
0 |
3 |
if $n <= $#_primes_small |
|
1582
|
3 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
|
1601
|
0 |
0 |
unless _validate_num($n) |
|
1603
|
0 |
0 |
if $n <= 5 |
|
1604
|
0 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
|
1612
|
0 |
0 |
if abs $term >= abs $old_term |
|
1615
|
0 |
0 |
if abs $term < 1e-06 |
|
1617
|
0 |
0 |
if (ref $t) { } |
|
1619
|
0 |
0 |
if $t->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
1627
|
0 |
0 |
unless _validate_num($n) |
|
1629
|
0 |
0 |
if $n <= 5 |
|
1630
|
0 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
|
1638
|
0 |
0 |
if abs $term >= abs $old_term |
|
1641
|
0 |
0 |
if abs $term < 1e-06 |
|
1643
|
0 |
0 |
if (ref $t) { } |
|
1645
|
0 |
0 |
if $t->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
1654
|
0 |
1 |
unless _validate_num($n) |
|
1656
|
0 |
1 |
if $n <= 0 |
|
1657
|
0 |
1 |
if $n <= $#_primes_small |
|
1660
|
0 |
1 |
if $n > 1000000000000 |
|
1662
|
0 |
1 |
if ref $n eq 'Math::BigInt' or $n >= 425656284035217743 |
|
1689
|
0 |
1 |
if ($n < 259) { } |
|
|
0 |
1 |
elsif ($n < 775) { } |
|
|
0 |
1 |
elsif ($n < 1271) { } |
|
|
0 |
1 |
elsif ($n < 2000) { } |
|
|
0 |
1 |
elsif ($n < 4000) { } |
|
|
0 |
1 |
elsif ($n < 12000) { } |
|
|
0 |
1 |
elsif ($n < 150000) { } |
|
|
1 |
0 |
elsif ($n < 20000000) { } |
|
|
0 |
0 |
elsif ($n < 100000000) { } |
|
|
0 |
0 |
elsif ($n < 500000000) { } |
|
|
0 |
0 |
elsif ($n < 2000000000) { } |
|
1710
|
4 |
1 |
unless _validate_num($x) |
|
1713
|
4 |
1 |
if ref $_[0] eq 'Math::BigInt' |
|
1737
|
5 |
0 |
if ($x < 1e+36 or _MPFR_available() or $Math::Prime::Util::_GMPfunc{'riemannr'}) { } |
|
1738
|
4 |
1 |
if (ref $x eq 'Math::BigFloat') |
|
1760
|
4 |
1 |
if ref $result eq 'Math::BigFloat' |
|
1766
|
8 |
3 |
unless _validate_num($x) |
|
1768
|
1 |
10 |
if $x < $_primes_small[-1] |
|
1770
|
8 |
2 |
if ref $x eq 'Math::BigInt' or ref $_[0] eq 'Math::BigInt' |
|
1776
|
8 |
2 |
ref $x eq 'Math::BigFloat' ? : |
|
1787
|
0 |
10 |
if ($x < 599) { } |
|
|
1 |
9 |
elsif ($x < 52600000) { } |
|
|
8 |
1 |
elsif ($x < 1.4e+25 or Math::Prime::Util::prime_get_config()->{'assume_rh'}) { } |
|
1790
|
0 |
1 |
if ($x < 2700) { } |
|
|
0 |
1 |
elsif ($x < 5500) { } |
|
|
0 |
1 |
elsif ($x < 19400) { } |
|
|
0 |
1 |
elsif ($x < 32299) { } |
|
|
0 |
1 |
elsif ($x < 88783) { } |
|
|
0 |
1 |
elsif ($x < 176000) { } |
|
|
0 |
1 |
elsif ($x < 315000) { } |
|
|
0 |
1 |
elsif ($x < 1100000) { } |
|
|
1 |
0 |
elsif ($x < 4500000) { } |
|
1803
|
0 |
8 |
if (_MPFR_available()) { } |
|
1820
|
0 |
0 |
if ($x < 1e+19) { } |
|
1842
|
0 |
0 |
$wantbf ? : |
|
1846
|
1 |
7 |
if ($x < 1e+19) { } |
|
1849
|
7 |
0 |
if (ref $x eq 'Math::BigFloat') { } |
|
1858
|
0 |
1 |
if (_MPFR_available()) { } |
|
1900
|
0 |
0 |
$wantbf ? : |
|
1908
|
8 |
2 |
if ref $result eq 'Math::BigFloat' |
|
1914
|
8 |
3 |
unless _validate_num($x) |
|
1917
|
1 |
10 |
if $x < $_primes_small[-1] |
|
1919
|
8 |
2 |
if ref $x eq 'Math::BigInt' or ref $_[0] eq 'Math::BigInt' |
|
1935
|
8 |
2 |
ref $x eq 'Math::BigFloat' ? : |
|
1937
|
0 |
10 |
if ($x < 15900) { } |
|
|
2 |
8 |
elsif ($x < 821800000) { } |
|
|
0 |
8 |
elsif ($x < 1e+19) { } |
|
|
8 |
0 |
elsif ($x < 5.5e+25 or Math::Prime::Util::prime_get_config()->{'assume_rh'}) { } |
|
1938
|
0 |
0 |
$x < 5000 ? : |
|
|
0 |
0 |
$x < 1621 ? : |
|
1941
|
0 |
2 |
if ($x < 24000) { } |
|
|
0 |
2 |
elsif ($x < 59000) { } |
|
|
0 |
2 |
elsif ($x < 350000) { } |
|
|
0 |
2 |
elsif ($x < 355991) { } |
|
|
0 |
2 |
elsif ($x < 356000) { } |
|
|
1 |
1 |
elsif ($x < 3550000) { } |
|
|
0 |
1 |
elsif ($x < 3560000) { } |
|
|
0 |
1 |
elsif ($x < 5000000) { } |
|
|
0 |
1 |
elsif ($x < 8000000) { } |
|
|
0 |
1 |
elsif ($x < 13000000) { } |
|
|
0 |
1 |
elsif ($x < 18000000) { } |
|
|
0 |
1 |
elsif ($x < 31000000) { } |
|
|
0 |
1 |
elsif ($x < 41000000) { } |
|
|
0 |
1 |
elsif ($x < 48000000) { } |
|
|
0 |
1 |
elsif ($x < 119000000) { } |
|
|
0 |
1 |
elsif ($x < 182000000) { } |
|
|
0 |
1 |
elsif ($x < 192000000) { } |
|
|
0 |
1 |
elsif ($x < 213000000) { } |
|
|
0 |
1 |
elsif ($x < 271000000) { } |
|
|
0 |
1 |
elsif ($x < 322000000) { } |
|
|
0 |
1 |
elsif ($x < 400000000) { } |
|
|
1 |
0 |
elsif ($x < 510000000) { } |
|
|
0 |
0 |
elsif ($x < 682000000) { } |
|
|
0 |
0 |
elsif ($x < 2953652287) { } |
|
1968
|
0 |
0 |
$x < 101260000000 ? : |
|
|
0 |
0 |
$x < 10010000000 ? : |
|
|
0 |
0 |
$x < 1100000000 ? : |
|
1972
|
0 |
8 |
if (_MPFR_available()) { } |
|
1994
|
0 |
0 |
$wantbf ? : |
|
1998
|
8 |
0 |
if (ref $x eq 'Math::BigFloat') { } |
|
2006
|
0 |
0 |
if (_MPFR_available()) { } |
|
2048
|
0 |
0 |
$wantbf ? : |
|
2056
|
8 |
2 |
if ref $result eq 'Math::BigFloat' |
|
2062
|
0 |
1 |
if (defined $high) { } |
|
2068
|
1 |
0 |
if $seghigh > $high |
|
2076
|
0 |
0 |
if (defined $high) { } |
|
2082
|
0 |
0 |
if $seghigh > $high |
|
2091
|
0 |
2 |
if $n < 2000 |
|
2092
|
2 |
0 |
if ref $n |
|
2100
|
0 |
2 |
if ($n < 4000) { } |
|
|
0 |
2 |
elsif ($n < 8000) { } |
|
|
0 |
2 |
elsif ($n < 16000) { } |
|
|
0 |
2 |
elsif ($n < 32000) { } |
|
|
0 |
2 |
elsif ($n < 64000) { } |
|
|
0 |
2 |
elsif ($n < 128000) { } |
|
|
0 |
2 |
elsif ($n < 256000) { } |
|
|
0 |
2 |
elsif ($n < 600000) { } |
|
|
0 |
2 |
elsif ($n < 1000000) { } |
|
|
0 |
2 |
elsif ($n < 4000000) { } |
|
|
0 |
2 |
elsif ($n < 16000000) { } |
|
|
0 |
2 |
elsif ($n < 32000000) { } |
|
2117
|
0 |
2 |
if defined $fm |
|
2124
|
0 |
1 |
if $n < 0 |
|
2125
|
0 |
1 |
if $n <= 6 |
|
2140
|
0 |
0 |
if $n < 6 |
|
2141
|
0 |
0 |
if ref $n or $n > 1.27e+16 |
|
2145
|
0 |
0 |
if $n > 59 and $n <= 1092 |
|
2148
|
0 |
0 |
$n > 480 ? : |
|
|
0 |
0 |
$n > 1e+16 ? : |
|
2159
|
0 |
0 |
if $n <= 2 |
|
2160
|
0 |
0 |
if $n > 6148914691236517205 |
|
2162
|
0 |
0 |
if $n < 10000 |
|
2163
|
0 |
0 |
if $nth > 1.0421889307180538e+17 |
|
2164
|
0 |
0 |
if ($n < 1000000) { } |
|
|
0 |
0 |
elsif ($n < 10000000000) { } |
|
2167
|
0 |
0 |
if ref $nth and $nth->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2172
|
0 |
0 |
if $n <= 2 |
|
2173
|
0 |
0 |
if $n > 9.2233720368547758e+18 |
|
2175
|
0 |
0 |
if $nth > 67079069358943824 |
|
2176
|
0 |
0 |
if ($n < 10000) { } |
|
|
0 |
0 |
elsif ($n < 10000000000) { } |
|
2178
|
0 |
0 |
if ref $nth and $nth->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2183
|
0 |
0 |
if $n <= 2 |
|
2189
|
0 |
0 |
$n < 2 ? : |
|
|
0 |
0 |
if $n < 11 |
|
2197
|
0 |
0 |
$n < 2 ? : |
|
|
0 |
0 |
if $n < 11 |
|
2205
|
0 |
0 |
$n < 2 ? : |
|
|
0 |
0 |
if $n < 11 |
|
2216
|
0 |
0 |
if $n < 5 |
|
2221
|
0 |
0 |
$k <= $r ? : |
|
2229
|
0 |
0 |
if $v < $p2 |
|
2231
|
0 |
0 |
if $a > $r |
|
2232
|
0 |
0 |
if $b > $r |
|
2241
|
0 |
0 |
if (defined $high) { } |
|
2245
|
0 |
0 |
if $high > 29505444490 |
|
2249
|
0 |
0 |
if ($low <= 2 and $high >= 29505444491) |
|
2254
|
0 |
0 |
if $low > $high |
|
2258
|
0 |
0 |
if (not Math::Prime::Util::prime_get_config()->{'xs'} || ref $sum and 1 and $high - $low > 1000000) |
|
2260
|
0 |
0 |
if $high >= 4294967295 |
|
2262
|
0 |
0 |
if $low > 2 |
|
2267
|
0 |
0 |
$xssum && $high > 50000000000000 ? : |
|
2271
|
0 |
0 |
if $next > $high |
|
2273
|
0 |
0 |
$xssum ? : |
|
2274
|
0 |
0 |
if $next == $high |
|
2281
|
0 |
0 |
if (defined $high) { } |
|
2285
|
0 |
0 |
unless defined $fd |
|
2288
|
0 |
0 |
if ($high >= $low) |
|
2292
|
0 |
0 |
if $p2 > $high |
|
2293
|
0 |
0 |
if ($Math::Prime::Util::_GMPfunc{'sieve_primes'}) { } |
|
2309
|
443 |
13208 |
if ($x | $y) < 4294967296 |
|
2312
|
0 |
13208 |
if $x >= $n |
|
2313
|
0 |
13208 |
if $y >= $n |
|
2314
|
350 |
12858 |
if $x < $y |
|
2315
|
12784 |
424 |
if ($n <= 9223372036854775807) { } |
|
2317
|
144936 |
157323 |
if $r >= $n |
|
|
302259 |
304893 |
if ($y & 1) |
|
2319
|
303633 |
303519 |
if $x >= $n |
|
2321
|
6348 |
6436 |
if $r >= $n |
|
|
12784 |
0 |
if ($y & 1) |
|
2324
|
6152 |
6600 |
$x >= $r ? : |
|
|
12752 |
13266 |
if ($y & 1) |
|
2326
|
12884 |
13134 |
$x > $n - $x ? : |
|
2328
|
190 |
234 |
$x >= $r ? : |
|
|
424 |
0 |
if ($y & 1) |
|
2334
|
0 |
12030 |
if $x >= $n |
|
2335
|
15 |
12015 |
if $y >= $n |
|
2336
|
215 |
11815 |
if ($n - $x <= $y) |
|
2337
|
131 |
84 |
if $y > $x |
|
2349
|
45166 |
21699 |
if $power & 1 |
|
2351
|
63263 |
3602 |
if $power |
|
2360
|
0 |
40 |
if $n >= $m |
|
2361
|
12 |
28 |
if ($m < 4294967296) { } |
|
2363
|
74 |
145 |
if $power & 1 |
|
2365
|
207 |
12 |
if $power |
|
2369
|
693 |
645 |
if $power & 1 |
|
2371
|
1310 |
28 |
if $power |
|
2381
|
1 |
6 |
if (0 == scalar grep({ref $_;} @_)) |
|
2386
|
1 |
1 |
if $x < 0 |
|
2391
|
13 |
0 |
$_ < 2147483647 && !ref($_) || ref $_ eq 'Math::BigInt' ? : |
|
2394
|
6 |
0 |
if $gcd->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2398
|
0 |
4 |
unless @_ |
|
2400
|
12 |
0 |
$_ < 2147483647 && !ref($_) || ref $_ eq 'Math::BigInt' ? : |
|
2401
|
0 |
12 |
if $v == 0 |
|
2402
|
0 |
12 |
if $v < 0 |
|
2405
|
1 |
3 |
if $lcm->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2410
|
0 |
3 |
if ($x == 0) |
|
2411
|
0 |
3 |
if ($y == 0) |
|
2413
|
0 |
3 |
if ($Math::Prime::Util::_GMPfunc{'gcdext'}) |
|
2422
|
1 |
2 |
if (abs $x < 9223372036854775807 and abs $y < 9223372036854775807) { } |
|
2423
|
0 |
1 |
if ref $x eq 'Math::BigInt' |
|
2424
|
0 |
1 |
if ref $y eq 'Math::BigInt' |
|
2440
|
1 |
1 |
if $a->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2441
|
1 |
1 |
if $b->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2442
|
2 |
0 |
if $g->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2444
|
0 |
3 |
if ($g < 0) |
|
2449
|
0 |
7 |
unless scalar @_ |
|
2450
|
0 |
7 |
if scalar @_ == 1 |
|
2453
|
0 |
7 |
if ($Math::Prime::Util::_GMPfunc{'chinese'} and $Math::Prime::Util::GMP::VERSION >= 0.42) |
|
2455
|
0 |
0 |
if (defined $sum) |
|
2457
|
0 |
0 |
if ref $sum and $sum->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2463
|
0 |
12 |
if not ref $ai and abs $ai > 9223372036854775807 || 0 |
|
2464
|
2 |
10 |
if not ref $ni and abs $ni > 9223372036854775807 || 0 |
|
2465
|
7 |
7 |
unless (defined $lcm) |
|
2473
|
35 |
131 |
ref $g ? : |
|
2476
|
0 |
7 |
if $g < 0 |
|
2477
|
0 |
7 |
if $g != 1 and $sum % $g != $ai % $g |
|
2478
|
5 |
2 |
if $s < 0 |
|
2479
|
2 |
5 |
if $t < 0 |
|
2481
|
4 |
3 |
if (not ref $lcm and $lcm * $s > 18446744073709551615) |
|
2482
|
6 |
1 |
if (ref $lcm) { } |
|
2491
|
0 |
1 |
if $u < 0 |
|
2492
|
1 |
0 |
if $v < 0 |
|
2500
|
1 |
6 |
if ref $sum and $sum->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2506
|
0 |
0 |
unless defined $hi and defined $lo |
|
2512
|
0 |
0 |
@_ ? : |
|
|
0 |
30 |
if @_ <= 1 |
|
2515
|
0 |
30 |
if $Math::Prime::Util::_GMPfunc{'vecsum'} |
|
2520
|
27 |
10 |
if ($sum > 18446744073709551365 or $sum < $neglim) |
|
2530
|
0 |
14069 |
unless @_ |
|
2532
|
0 |
14069 |
if $Math::Prime::Util::_GMPfunc{'vecprod'} |
|
2537
|
4 |
14065 |
if $prod->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 and $prod->bcmp({sign => '-', value => [854775807, 223372036, 9]}) > 0 |
|
2542
|
0 |
1 |
unless @_ |
|
2544
|
2 |
0 |
if $_ < $min |
|
2548
|
0 |
1 |
unless @_ |
|
2550
|
0 |
2 |
if $_ > $max |
|
2557
|
0 |
0 |
if ref $mask eq 'ARRAY' |
|
2564
|
0 |
0 |
if $mask & 1 |
|
2574
|
0 |
0 |
if not defined $base and $n =~ s/^0b// |
|
2575
|
0 |
0 |
if not defined $base and $n =~ s/^0x// |
|
2576
|
0 |
0 |
if (not defined $base or $base == 10) { } |
|
2580
|
0 |
0 |
if $base < 2 |
|
2584
|
0 |
0 |
if $p > 0 |
|
2592
|
0 |
4 |
if $n == 0 or $a == 0 |
|
2593
|
0 |
4 |
if $n == 1 |
|
2594
|
1 |
3 |
if $n < 0 |
|
2595
|
0 |
4 |
if ($n > 18446744073709551615) |
|
2597
|
0 |
0 |
if not defined $invmod or $invmod->is_nan |
|
2598
|
0 |
0 |
if $invmod->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2608
|
1 |
3 |
if $r > 1 |
|
2609
|
1 |
2 |
if $t < 0 |
|
2615
|
1 |
0 |
if (ref $r) { } |
|
2616
|
0 |
1 |
if $r->copy->bmul($r)->bmod($n)->bcmp($a) |
|
2617
|
0 |
1 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2619
|
0 |
0 |
unless $r * $r % $n == $a |
|
2621
|
0 |
1 |
if $n - $r < $r |
|
2627
|
0 |
1 |
if $n == 0 |
|
2628
|
0 |
1 |
if ($n <= 2 or $a <= 1) |
|
2630
|
0 |
0 |
$a * $a % $n == $a ? : |
|
2633
|
0 |
1 |
if ($n < 10000000) |
|
2638
|
0 |
0 |
if $a == 1 |
|
2641
|
0 |
0 |
if $r * $r % $n == $a |
|
2646
|
1 |
0 |
unless ref $a eq 'Math::BigInt' |
|
2647
|
1 |
0 |
unless ref $n eq 'Math::BigInt' |
|
2651
|
1 |
0 |
if ($n % 4 == 3) |
|
2655
|
0 |
0 |
if ($n % 8 == 5) |
|
2657
|
0 |
0 |
if ($q->is_one) { } |
|
2666
|
0 |
0 |
if $n->is_odd and not $a->copy->bmodpow($n - 1 >> 1, $n)->is_one |
|
2672
|
0 |
0 |
if $r->copy->bmul($r)->bmod($n) == $a |
|
2680
|
0 |
19419 |
if $n <= 1 |
|
2681
|
432 |
0 |
if $n < 18446744073709551615 and $a >= 0 and $a < 18446744073709551615 and $b >= 0 and $b < 18446744073709551615 |
|
2683
|
87 |
18900 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2689
|
0 |
7368 |
if $n <= 1 |
|
2690
|
0 |
0 |
if $n < 18446744073709551615 and $a > 0 and $a < 18446744073709551615 and $b > 0 and $b < 18446744073709551615 |
|
2692
|
0 |
7368 |
if $Math::Prime::Util::_GMPfunc{'mulmod'} |
|
2694
|
43 |
7325 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2699
|
0 |
0 |
if $n <= 1 |
|
2701
|
0 |
0 |
if ($ret->is_nan) { } |
|
2704
|
0 |
0 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2710
|
0 |
21 |
if $n <= 1 |
|
2711
|
0 |
21 |
if ($Math::Prime::Util::_GMPfunc{'powmod'}) |
|
2713
|
0 |
0 |
defined $r ? : |
|
2716
|
0 |
21 |
if ($ret->is_nan) { } |
|
2719
|
8 |
13 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2727
|
27618 |
13342 |
if ($y < $x) { } |
|
|
3 |
13339 |
elsif ($x < 0) { } |
|
2737
|
0 |
1194 |
if defined $refp and not ref $refp |
|
2739
|
4 |
1190 |
if abs $n <= 3 and not $a |
|
2741
|
0 |
0 |
if ($Math::Prime::Util::_GMPfunc{'is_power'} and $Math::Prime::Util::GMP::VERSION >= 0.42 || $Math::Prime::Util::GMP::VERSION >= 0.28 && $n > 0) |
|
2744
|
0 |
0 |
unless defined $a |
|
2746
|
0 |
0 |
unless $k > 0 |
|
2747
|
0 |
0 |
if (defined $refp) |
|
2748
|
0 |
0 |
unless $a |
|
2750
|
0 |
0 |
if $isneg |
|
2752
|
0 |
0 |
if $$refp > 18446744073709551615 |
|
2753
|
0 |
0 |
if $isneg |
|
2758
|
0 |
1190 |
if (defined $a and $a != 0) { } |
|
2759
|
0 |
0 |
if $a == 1 |
|
2760
|
0 |
0 |
if $n < 0 and $a % 2 == 0 |
|
2761
|
0 |
0 |
if ($a == 2) { } |
|
2762
|
0 |
0 |
if (_is_perfect_square($n)) |
|
2763
|
0 |
0 |
if defined $refp |
|
2767
|
0 |
0 |
unless ref $n eq 'Math::BigInt' |
|
2769
|
0 |
0 |
if $n->is_neg |
|
2770
|
0 |
0 |
if ($root->copy->bpow($a) == $n) |
|
2771
|
0 |
0 |
if defined $refp |
|
2776
|
501 |
689 |
unless ref $n eq 'Math::BigInt' |
|
2777
|
256 |
934 |
if ($n < 0) |
|
2780
|
0 |
256 |
unless $root |
|
2781
|
128 |
128 |
if ($root % 2 == 0) |
|
2784
|
6 |
122 |
if $root == 1 |
|
2786
|
61 |
61 |
if defined $refp |
|
2788
|
125 |
125 |
if defined $refp |
|
2794
|
263 |
3505 |
if $root->is_one |
|
2795
|
671 |
2834 |
if ($root->copy->bpow($e) == $n) |
|
2797
|
128 |
543 |
if not $next and defined $refp |
|
2798
|
412 |
259 |
if $next != 0 |
|
2809
|
4 |
1 |
if $n < 0 |
|
2817
|
0 |
0 |
if defined $refp and not ref $refp |
|
2818
|
0 |
0 |
if $n <= 1 |
|
2820
|
0 |
0 |
if defined $refp |
|
|
0 |
0 |
if (&Math::Prime::Util::is_prime($n)) |
|
2823
|
0 |
0 |
if ($k) |
|
2824
|
0 |
0 |
if ref $r and $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2825
|
0 |
0 |
unless &Math::Prime::Util::is_prime($r) |
|
2826
|
0 |
0 |
if defined $refp |
|
2833
|
0 |
0 |
if defined $refp and not ref $refp |
|
2834
|
0 |
0 |
if $k < 3 |
|
2835
|
0 |
0 |
if $n <= 0 |
|
2836
|
0 |
0 |
if defined $refp |
|
|
0 |
0 |
if ($n == 1) |
|
2838
|
0 |
0 |
if ($k == 4) |
|
2839
|
0 |
0 |
unless _is_perfect_square($n) |
|
2840
|
0 |
0 |
if defined $refp |
|
2843
|
0 |
0 |
if ($n <= 4294967296 and $k <= 4294967296) { } |
|
2844
|
0 |
0 |
$k == 3 ? : |
|
2845
|
0 |
0 |
unless _is_perfect_square($D) |
|
2849
|
0 |
0 |
if ($k == 3) { } |
|
2854
|
0 |
0 |
unless _is_perfect_square($D) |
|
2858
|
0 |
0 |
if $D % $R != 0 |
|
2859
|
0 |
0 |
if defined $refp |
|
2865
|
0 |
131 |
if $n < 2 or $k < 2 |
|
2867
|
129 |
2 |
if ($k == 2) |
|
2868
|
0 |
129 |
if (ref $n eq 'Math::BigInt') |
|
2869
|
0 |
0 |
unless $n->is_even |
|
2893
|
0 |
3 |
if ($base == 10) { } |
|
|
2 |
1 |
elsif ($base == 2) { } |
|
|
0 |
1 |
elsif ($base == 16) { } |
|
2906
|
0 |
3 |
if ($len >= 0 and $len != scalar @d) |
|
2915
|
0 |
3 |
unless defined $base |
|
2916
|
3 |
0 |
unless defined $len |
|
2917
|
0 |
3 |
if $base < 2 |
|
2918
|
0 |
3 |
if $n == 0 |
|
2919
|
0 |
3 |
if $n < 0 |
|
2920
|
3 |
0 |
unless _validate_num($n) |
|
2926
|
0 |
0 |
unless defined $base |
|
2927
|
0 |
0 |
unless defined $len |
|
2929
|
0 |
0 |
if $base == 2 and $len < 0 |
|
2930
|
0 |
0 |
if $base == 8 and $len < 0 |
|
2931
|
0 |
0 |
if $base == 16 and $len < 0 |
|
2932
|
0 |
0 |
$n == 0 ? : |
|
2933
|
0 |
0 |
if $base <= 10 |
|
2934
|
0 |
0 |
if $base > 36 |
|
2940
|
0 |
1 |
unless defined $base |
|
2941
|
0 |
1 |
if $base == 10 and ref($r) =~ /^Math::/ |
|
2943
|
0 |
1 |
if (ref $r and not ref($r) =~ /^Math::/) { } |
|
|
0 |
1 |
elsif ($base == 2) { } |
|
|
0 |
1 |
elsif ($base == 8) { } |
|
|
0 |
1 |
elsif ($base == 16) { } |
|
2944
|
0 |
0 |
unless ref $r eq 'ARRAY' |
|
2965
|
16 |
0 |
if ($c ne '0') |
|
2967
|
0 |
16 |
unless $d >= 0 |
|
2972
|
0 |
1 |
if $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
2984
|
0 |
2 |
unless $k > 0 |
|
2987
|
0 |
2 |
if (defined $refp) |
|
2988
|
0 |
0 |
unless ref $refp |
|
2996
|
0 |
0 |
if defined $refp and not ref $refp |
|
2997
|
0 |
0 |
unless $n > 0 |
|
2998
|
0 |
0 |
unless defined $b |
|
2999
|
0 |
0 |
if ($b == 10) |
|
3001
|
0 |
0 |
if defined $refp |
|
3004
|
0 |
0 |
if ($b == 2) |
|
3006
|
0 |
0 |
if defined $refp |
|
3009
|
0 |
0 |
unless $b > 1 |
|
3012
|
0 |
0 |
if defined $refp |
|
3020
|
0 |
103 |
if $n == 0 |
|
3021
|
0 |
103 |
if $n > 1 and $n % 2 |
|
3028
|
2477 |
2477 |
if ($w ^= 1) { } |
|
3040
|
50 |
53 |
if $n % 4 == 0 |
|
3047
|
4 |
107 |
if $n == 0 |
|
3048
|
2 |
105 |
if $n == 1 |
|
3049
|
2 |
103 |
if $n < 0 or $n & 1 |
|
3060
|
0 |
518 |
if $m == $n |
|
3061
|
0 |
518 |
if $n == 0 or $m == 0 or $m > $n |
|
3062
|
1 |
517 |
unless defined $type |
|
3063
|
0 |
470 |
unless $type == 1 or $type == 2 or $type == 3 |
|
3064
|
0 |
518 |
if ($m == 1) |
|
3065
|
0 |
0 |
if $type == 2 |
|
3066
|
0 |
0 |
if $type == 3 |
|
3067
|
0 |
0 |
if $n & 1 |
|
3071
|
0 |
518 |
if $Math::Prime::Util::_GMPfunc{'stirling'} |
|
3073
|
5 |
513 |
if ($type == 3) { } |
|
|
465 |
48 |
elsif ($type == 2) { } |
|
3081
|
7355 |
7586 |
$m - $j & 1 ? : |
|
3091
|
402 |
380 |
$k & 1 ? : |
|
3099
|
212 |
1047 |
if $b - $a == {sign => '+', value => [1]} |
|
3100
|
457 |
590 |
if $b - $a == {sign => '+', value => [2]} |
|
3109
|
0 |
79 |
if $n <= 0 |
|
3110
|
79 |
0 |
unless ref $n eq 'Math::BigInt' |
|
3119
|
0 |
21 |
unless (defined $Math::BigFloat::VERSION) |
|
3120
|
0 |
21 |
if $n <= 0 |
|
3122
|
0 |
21 |
if (_MPFR_available(3, 0)) |
|
3123
|
0 |
0 |
unless defined $precision |
|
3141
|
21 |
0 |
unless defined $sprec |
|
3142
|
21 |
0 |
unless defined $sprec |
|
3143
|
0 |
21 |
if ($sprec <= 23 and $n > 54 or $sprec <= 30 and $n > 348 or $sprec <= 40 and $n > 2002 or $sprec <= 50 and $n > 12644) |
|
3153
|
0 |
0 |
if $term->bacmp($eps) < 0 |
|
3172
|
0 |
10 |
if int $n < 0 |
|
3174
|
0 |
10 |
unless scalar @bases > 0 |
|
3175
|
0 |
10 |
if $n < 4 |
|
3178
|
0 |
10 |
if $base < 2 |
|
3179
|
0 |
10 |
if $base >= $n |
|
3180
|
10 |
0 |
if ($base > 1 and $base != $n - 1) |
|
3181
|
0 |
10 |
ref $n eq 'Math::BigInt' ? : |
|
3184
|
0 |
10 |
unless $x == 1 |
|
3192
|
0 |
0 |
if int $n < 0 |
|
3194
|
0 |
0 |
unless scalar @bases > 0 |
|
3195
|
0 |
0 |
if $n < 4 |
|
3198
|
0 |
0 |
if $base < 2 |
|
3199
|
0 |
0 |
if $base >= $n |
|
3200
|
0 |
0 |
if ($base > 1 and $base != $n - 1) |
|
3202
|
0 |
0 |
if $j == 0 |
|
3203
|
0 |
0 |
$j > 0 ? : |
|
3204
|
0 |
0 |
ref $n eq 'Math::BigInt' ? : |
|
3207
|
0 |
0 |
unless $x == $j |
|
3215
|
0 |
0 |
if int $n < 0 |
|
3217
|
0 |
0 |
if $n < 4 |
|
3218
|
0 |
0 |
if $n % 2 == 0 |
|
3222
|
0 |
0 |
if ($ap == 1) |
|
3223
|
0 |
0 |
if ($ap == $n - 1) |
|
3230
|
566 |
3228 |
if (ref $n eq 'Math::BigInt') { } |
|
3232
|
566 |
0 |
unless (defined $nm1) |
|
3242
|
123 |
443 |
if $x->is_one or $x->bcmp($nm1) == 0 |
|
3245
|
0 |
487 |
if $x->is_one |
|
3246
|
69 |
418 |
if $x->bcmp($nm1) == 0 |
|
3251
|
3228 |
0 |
unless (defined $nm1) |
|
3261
|
3206 |
22 |
if ($n < 4294967296) { } |
|
3263
|
10 |
3196 |
if $x == 1 or $x == $nm1 |
|
3266
|
3 |
3804 |
if $x == 1 |
|
3267
|
306 |
3498 |
if $x == $n - 1 |
|
3271
|
5 |
17 |
if $x == 1 or $x == $nm1 |
|
3273
|
1 |
29 |
$x < 4294967296 ? : |
|
3274
|
1 |
29 |
if $x == 1 |
|
3275
|
9 |
20 |
if $x == $n - 1 |
|
3284
|
0 |
3410 |
if int $n < 0 |
|
3286
|
0 |
3410 |
unless scalar @bases > 0 |
|
3288
|
4 |
3406 |
if $n < 4 |
|
3289
|
0 |
3406 |
if $n % 2 == 0 |
|
3291
|
3226 |
180 |
if ($bases[0] == 2) |
|
3292
|
2891 |
335 |
unless _miller_rabin_2($n) |
|
3294
|
10 |
325 |
unless @bases |
|
3299
|
0 |
574 |
if $base < 2 |
|
3300
|
5 |
569 |
if $base >= $n |
|
3301
|
0 |
574 |
if $base == 0 or $base == $n - 1 and $base % 2 == 1 |
|
3306
|
119 |
386 |
if (ref $n eq 'Math::BigInt') { } |
|
3323
|
80 |
81 |
if $x->is_one or $x->bcmp($nminus1) == 0 |
|
3326
|
0 |
83 |
if $x->is_one |
|
3327
|
50 |
33 |
if ($x->bcmp($nminus1) == 0) |
|
3329
|
31 |
50 |
if $ma != 0 |
|
3341
|
382 |
4 |
if ($n < 4294967296) { } |
|
3344
|
66 |
330 |
if $x == 1 or $x == $n - 1 |
|
3347
|
1 |
953 |
if $x == 1 |
|
3348
|
323 |
630 |
if $x == $n - 1 |
|
3350
|
6 |
323 |
if $x != $n - 1 |
|
3355
|
3 |
3 |
if $x == 1 or $x == $n - 1 |
|
3358
|
0 |
3 |
$x < 4294967296 ? : |
|
3359
|
0 |
3 |
if $x == 1 |
|
3360
|
0 |
3 |
if $x == $n - 1 |
|
3362
|
3 |
0 |
if $x != $n - 1 |
|
3375
|
0 |
0 |
abs $a == 1 ? : |
|
|
0 |
922 |
if $b == 0 |
|
3377
|
0 |
922 |
if ($b % 2 == 0) |
|
3378
|
0 |
0 |
if $a % 2 == 0 |
|
3381
|
0 |
0 |
if $v % 2 == 1 and $a % 8 == 3 || $a % 8 == 5 |
|
3383
|
1 |
921 |
if ($b < 0) |
|
3385
|
0 |
1 |
if $a < 0 |
|
3387
|
13 |
3 |
if $b % 4 == 3 |
|
|
16 |
906 |
if ($a < 0) |
|
3388
|
2 |
920 |
if ref $b eq 'Math::BigInt' and $b <= {sign => '+', value => [709551615, 446744073, 18]} |
|
3389
|
0 |
922 |
if ref $a eq 'Math::BigInt' and $a <= {sign => '+', value => [709551615, 446744073, 18]} |
|
3392
|
578 |
687 |
if ($a % 2 == 0) |
|
3395
|
276 |
68 |
if $v % 2 == 1 and $b % 8 == 3 || $b % 8 == 5 |
|
3397
|
150 |
1115 |
if $a % 4 == 3 and $b % 4 == 3 |
|
3400
|
408 |
429 |
if (ref $a eq 'Math::BigInt' and $a <= {sign => '+', value => [709551615, 446744073, 18]} and ref $b eq 'Math::BigInt' and $b <= {sign => '+', value => [709551615, 446744073, 18]}) |
|
3405
|
514 |
0 |
$b == 1 ? : |
|
3410
|
0 |
0 |
$k == $n ? : |
|
|
0 |
5235 |
if $k >= $n |
|
3411
|
2608 |
2627 |
if $k > $n >> 1 |
|
3413
|
13809 |
75550 |
if ($r >= int 18446744073709551615 / $n) { } |
|
3417
|
5233 |
8576 |
if $r >= int 18446744073709551615 / $nr |
|
3434
|
0 |
5235 |
if $Math::Prime::Util::_GMPfunc{'binomial'} |
|
3437
|
0 |
5234 |
if $k < 0 or $k > $n |
|
|
5234 |
1 |
if ($n >= 0) { } |
|
3438
|
0 |
1 |
if $k < 0 and $k > $n |
|
3439
|
1 |
5234 |
if $k < 0 |
|
3443
|
5234 |
1 |
if ($n >= 0) { } |
|
3445
|
1 |
5233 |
if $r > 0 |
|
3448
|
0 |
1 |
if $r > 0 and not $k & 1 |
|
3449
|
1 |
0 |
if $r > 0 and $r <= 9223372036854775807 |
|
3453
|
0 |
5233 |
if $k == 0 |
|
3454
|
0 |
5233 |
if $k == $n - 1 |
|
3455
|
5233 |
0 |
if ($n >= 0) { } |
|
3457
|
0 |
5233 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
3460
|
0 |
0 |
if ($k & 1) { } |
|
3462
|
0 |
0 |
if $r->bacmp('9223372036854775807') <= 0 |
|
3464
|
0 |
0 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
3472
|
2 |
14865 |
if ($b <= $a) { } |
|
|
13676 |
1189 |
elsif ($b == $a + 1) { } |
|
|
790 |
399 |
elsif ($b == $a + 2) { } |
|
3488
|
204 |
809 |
if $n <= 12 |
|
3489
|
0 |
809 |
if ref $n eq 'Math::GMP' |
|
3490
|
0 |
809 |
if (ref $n eq 'Math::GMPz') |
|
3492
|
809 |
0 |
unless ('Math::BigInt'->config->{'lib'} =~ /GMP|Pari/) |
|
3495
|
0 |
809 |
if (defined $Math::GMPz::VERSION) { } |
|
|
0 |
809 |
elsif (defined $Math::GMP::VERSION) { } |
|
|
0 |
809 |
elsif (defined &Math::Prime::Util::GMP::factorial and Math::Prime::Util::prime_get_config()->{'gmp'}) { } |
|
3502
|
0 |
809 |
if defined $r |
|
3505
|
96 |
713 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
3513
|
0 |
0 |
if $Math::Prime::Util::_GMPfunc{'factorialmod'} |
|
3515
|
0 |
0 |
if ($n > 10) |
|
3537
|
177 |
38 |
if (ref $n eq 'Math::BigInt') { } |
|
3539
|
21 |
133 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
|
3542
|
1 |
43 |
if $sq == $n |
|
3546
|
8 |
30 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
|
3548
|
0 |
8 |
if $sq * $sq == $n |
|
3556
|
0 |
0 |
if $n < 0 |
|
3557
|
0 |
0 |
$n == 1 ? : |
|
|
0 |
0 |
if $n <= 1 |
|
3558
|
0 |
0 |
if $a < 0 or $a >= $n |
|
3561
|
0 |
0 |
if $Math::Prime::Util::_GMPfunc{'is_primitive_root'} |
|
3563
|
0 |
0 |
if ($Math::Prime::Util::_GMPfunc{'znorder'} and $Math::Prime::Util::_GMPfunc{'totient'}) |
|
3565
|
0 |
0 |
unless defined $order |
|
3567
|
0 |
0 |
$order eq $totient ? : |
|
3570
|
0 |
0 |
if &Math::Prime::Util::gcd($a, $n) != 1 |
|
3572
|
0 |
0 |
if $s % 2 == 0 and &Math::Prime::Util::powmod($a, $s / 2, $n) == 1 |
|
3573
|
0 |
0 |
if $s % 3 == 0 and &Math::Prime::Util::powmod($a, $s / 3, $n) == 1 |
|
3574
|
0 |
0 |
if $s % 5 == 0 and &Math::Prime::Util::powmod($a, $s / 5, $n) == 1 |
|
3577
|
0 |
0 |
if $fp > 5 and &Math::Prime::Util::powmod($a, $s / $fp, $n) == 1 |
|
3584
|
0 |
10 |
if $n <= 0 |
|
3585
|
0 |
10 |
if $n == 1 |
|
3586
|
0 |
10 |
if $a <= 0 |
|
3587
|
0 |
10 |
if $a == 1 |
|
3590
|
0 |
10 |
if $Math::Prime::Util::_GMPfunc{'znorder'} |
|
3593
|
2 |
8 |
if &Math::Prime::Util::gcd($a, $n) > 1 |
|
3597
|
6 |
2 |
unless ref $a eq 'Math::BigInt' |
|
3600
|
7 |
1 |
if ($lambda <= 1.8446744073709552e+19) |
|
3602
|
7 |
47 |
if &Math::Prime::Util::powmod($a, $k, $n) == 1 |
|
3608
|
0 |
1 |
unless ref $lambda eq 'Math::BigInt' |
|
3615
|
0 |
10 |
if $enum++ >= $ei |
|
3620
|
0 |
1 |
if $k->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
3626
|
0 |
2 |
if not defined $limit or $limit > $p |
|
3629
|
2 |
0 |
if ($limit < 1000000000) |
|
3631
|
1 |
212 |
if $t == $a |
|
3638
|
0 |
0 |
if ($t == $a) |
|
3639
|
0 |
0 |
if $k->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
3649
|
0 |
1 |
unless defined $invg |
|
3653
|
0 |
1 |
$b > 4000000 ? : |
|
3654
|
1 |
0 |
$maxm > $b ? : |
|
3664
|
87 |
0 |
if ($m <= $maxm) |
|
3666
|
0 |
87 |
if (defined $r) |
|
3667
|
0 |
0 |
if $_verbose |
|
3673
|
0 |
87 |
if ($am == $a) |
|
3674
|
0 |
0 |
if $_verbose |
|
3681
|
1 |
86 |
if (defined $r) |
|
3682
|
0 |
1 |
if $_verbose |
|
3686
|
86 |
0 |
if $m <= $maxm |
|
3694
|
3 |
3 |
ref $_ eq 'Math::BigInt' ? : |
|
3697
|
0 |
2 |
if $a == 1 or $g == 0 or $p < 2 |
|
3702
|
1 |
1 |
if ($x == 0) |
|
3704
|
1 |
0 |
if (defined $n and $n > 1000) |
|
3705
|
1 |
0 |
unless ref $n eq 'Math::BigInt' |
|
3707
|
0 |
1 |
if ref $x and $x->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
3708
|
1 |
0 |
if $x > 0 and $g->copy->bmodpow($x, $p) == $a |
|
3709
|
0 |
0 |
if $x == 0 and $_verbose |
|
3710
|
0 |
0 |
if $x > 0 and $_verbose > 1 |
|
3714
|
0 |
1 |
if ref $x and $x->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
3715
|
0 |
1 |
$x == 0 ? : |
|
3720
|
1 |
7 |
if $n < 0 |
|
3721
|
2 |
6 |
if ($n <= 4) |
|
3722
|
1 |
1 |
if $n == 0 |
|
3725
|
1 |
5 |
if $n % 4 == 0 |
|
3728
|
2 |
3 |
unless (is_prob_prime($n)) |
|
3731
|
1 |
1 |
if $phi != &Math::Prime::Util::carmichael_lambda($n) |
|
3741
|
0 |
97 |
if $a >= $n |
|
3743
|
93 |
44 |
if (&Math::Prime::Util::powmod($a, $f, $n) == 1) |
|
3748
|
4 |
93 |
unless $fail |
|
3762
|
7 |
25 |
ref $n eq 'Math::BigInt' ? : |
|
3764
|
0 |
32 |
if $gcd > 1 and $gcd != $n |
|
3766
|
11 |
21 |
if $j == -1 |
|
3768
|
0 |
21 |
if $d > 4000000000 |
|
3779
|
181 |
22 |
unless defined $increment |
|
3783
|
421 |
55 |
ref $n eq 'Math::BigInt' ? : |
|
3785
|
0 |
476 |
if $gcd > 1 and $gcd != $n |
|
3786
|
203 |
273 |
if kronecker($D, $n) == -1 |
|
3788
|
0 |
273 |
if $P > 65535 |
|
3798
|
0 |
195 |
if $n < 2 |
|
3799
|
0 |
195 |
if $k < 0 |
|
3800
|
0 |
195 |
if abs $P >= $n |
|
3801
|
0 |
195 |
if abs $Q >= $n |
|
3803
|
0 |
195 |
if ($Math::Prime::Util::_GMPfunc{'lucas_sequence'} and $Math::Prime::Util::GMP::VERSION >= 0.3) |
|
3804
|
0 |
0 |
$_ > '18446744073709551615' ? : |
|
3808
|
10 |
185 |
unless ref $n eq 'Math::BigInt' |
|
3811
|
193 |
2 |
unless ref $P eq 'Math::BigInt' |
|
3812
|
193 |
2 |
unless ref $Q eq 'Math::BigInt' |
|
3814
|
0 |
195 |
if ($D->is_zero) |
|
3825
|
0 |
195 |
if $k == 0 |
|
3826
|
10 |
185 |
unless ref $k eq 'Math::BigInt' |
|
3830
|
0 |
195 |
if ($n % 2 == 0) { } |
|
|
181 |
14 |
elsif ($Q->is_one) { } |
|
3835
|
0 |
0 |
if ($kstr =~ /(0+)$/) |
|
3838
|
0 |
0 |
if (substr $kstr, $bpos, 1) { } |
|
3863
|
181 |
0 |
if ($P > {sign => '+', value => [2]} and not $Dinverse->is_nan) { } |
|
3867
|
7126 |
7358 |
if (substr $kstr, $bpos, 1) { } |
|
3881
|
0 |
0 |
if (substr $kstr, $bpos, 1) |
|
3884
|
0 |
0 |
if $U->is_odd |
|
3887
|
0 |
0 |
if $V->is_odd |
|
3893
|
3 |
11 |
$Q == -1 ? : |
|
3896
|
19 |
408 |
if ($qsign == 1) { } |
|
|
20 |
388 |
elsif ($qsign == -1) { } |
|
3899
|
197 |
230 |
if (substr $kstr, $bpos, 1) { } |
|
3902
|
102 |
95 |
if $U->is_odd |
|
3906
|
69 |
128 |
if $V->is_odd |
|
3909
|
19 |
178 |
if ($qsign != 0) { } |
|
3912
|
20 |
210 |
if ($qsign != 0) { } |
|
3916
|
1 |
13 |
if ($qsign == 1) { } |
|
|
2 |
11 |
elsif ($qsign == -1) { } |
|
3926
|
0 |
0 |
if $k < 0 |
|
3927
|
0 |
0 |
if $k == 0 |
|
3929
|
0 |
0 |
unless ref $P eq 'Math::BigInt' |
|
3930
|
0 |
0 |
unless ref $Q eq 'Math::BigInt' |
|
3942
|
0 |
0 |
unless ref $k eq 'Math::BigInt' |
|
3945
|
0 |
0 |
if ($kstr =~ /(0+)$/) |
|
3947
|
0 |
0 |
if ($Q == -1) |
|
3952
|
0 |
0 |
if (substr $kstr, $bpos, 1) { } |
|
3955
|
0 |
0 |
if ($ql == 1) { } |
|
3964
|
0 |
0 |
if ($ql == 1) { } |
|
3977
|
0 |
0 |
if ($ql == 1) { } |
|
3987
|
0 |
0 |
if ($ql == 1) { } |
|
3990
|
0 |
0 |
$_ > '18446744073709551615' ? : |
|
3995
|
0 |
0 |
if (substr $kstr, $bpos, 1) { } |
|
4023
|
0 |
0 |
$_ > '18446744073709551615' ? : |
|
4031
|
0 |
5 |
if $n < 4 |
|
4032
|
0 |
5 |
if $n % 2 == 0 or _is_perfect_square($n) |
|
4035
|
0 |
5 |
if $D == 0 |
|
4036
|
0 |
5 |
if $D != $P * $P - 4 * $Q |
|
4039
|
5 |
0 |
$U == 0 ? : |
|
4045
|
0 |
6 |
if $n < 4 |
|
4046
|
0 |
6 |
if $n % 2 == 0 or _is_perfect_square($n) |
|
4049
|
0 |
6 |
if $D == 0 |
|
4050
|
0 |
6 |
if $D != $P * $P - 4 * $Q |
|
4060
|
2 |
4 |
if $U == 0 |
|
4061
|
0 |
4 |
unless ref $V eq 'Math::BigInt' |
|
4062
|
0 |
4 |
unless ref $Qk eq 'Math::BigInt' |
|
4064
|
3 |
8 |
if $V->is_zero |
|
4065
|
7 |
1 |
if ($r < $s - 1) |
|
4076
|
0 |
181 |
if $n < 4 |
|
4077
|
0 |
181 |
if $n % 2 == 0 or _is_perfect_square($n) |
|
4080
|
0 |
181 |
if $D == 0 |
|
4081
|
0 |
181 |
if $D != $P * $P - 4 * $Q |
|
4085
|
6 |
175 |
unless ref $n eq 'Math::BigInt' |
|
4095
|
83 |
0 |
if $U == 0 and $V == {sign => '+', value => [2]} || $V == $n - {sign => '+', value => [2]} |
|
4096
|
0 |
98 |
unless ref $V eq 'Math::BigInt' |
|
4098
|
85 |
2577 |
if $V->is_zero |
|
4106
|
12 |
10 |
unless defined $increment |
|
4108
|
0 |
22 |
if $n < 4 |
|
4109
|
0 |
22 |
if $n % 2 == 0 or _is_perfect_square($n) |
|
4112
|
0 |
22 |
if $D == 0 |
|
4113
|
0 |
22 |
if $D != $P * $P - 4 * $Q |
|
4115
|
22 |
0 |
unless ref $n eq 'Math::BigInt' |
|
4126
|
420 |
386 |
if (substr $kstr, $bpos, 1) { } |
|
4135
|
19 |
3 |
if $V == 2 or $V == $n - $TWO |
|
4137
|
3 |
3 |
if $V->is_zero |
|
4145
|
0 |
0 |
if $n < 4 |
|
4146
|
0 |
0 |
unless $n % 2 |
|
4147
|
0 |
0 |
if _is_perfect_square($n) |
|
4149
|
0 |
0 |
unless ref $n eq 'Math::BigInt' |
|
4157
|
0 |
0 |
if $k == 0 |
|
4161
|
0 |
0 |
if ($d->is_odd) |
|
4166
|
0 |
0 |
unless ($d->is_zero) |
|
4171
|
0 |
0 |
$ra == 1 && $rb == $n - 1 ? : |
|
4176
|
0 |
1 |
if $n < 4 |
|
4177
|
0 |
1 |
unless $n % 2 |
|
4180
|
1 |
0 |
if ($n % 4 == 3) { } |
|
4184
|
0 |
0 |
if $a == 2 or $a == 4 or $a == 7 or $a == 8 or $a == 10 or $a == 14 or $a == 16 or $a == 18 |
|
4186
|
0 |
0 |
if $j == -1 |
|
4187
|
0 |
0 |
if $j == 0 or $a == 20 and _is_perfect_square($n) |
|
4191
|
0 |
1 |
if $temp1 != 1 and $temp1 != $n |
|
4193
|
0 |
1 |
unless ref $n eq 'Math::BigInt' |
|
4205
|
0 |
107 |
if $a != 0 |
|
4211
|
51 |
56 |
if (substr $np1string, $bit, 1) |
|
4212
|
51 |
0 |
if ($a == 0) { } |
|
4220
|
0 |
1 |
$s == 0 && $t == $temp1 ? : |
|
4226
|
0 |
2 |
if $n <= 1 |
|
4236
|
645 |
609 |
if (shift @nbin) { } |
|
4247
|
2 |
0 |
unless defined $restrict |
|
4248
|
0 |
2 |
if $n < 4 |
|
4249
|
0 |
2 |
if $restrict > 2 and $n % 2 == 0 |
|
4251
|
2 |
0 |
unless ref $n eq 'Math::BigInt' |
|
4254
|
0 |
2 |
unless $S[4] == 0 |
|
4255
|
2 |
0 |
if $restrict == 0 |
|
4256
|
0 |
0 |
unless $S[1] == $n - 1 |
|
4257
|
0 |
0 |
if $restrict == 1 |
|
4259
|
0 |
0 |
if ($j == -1) { } |
|
4264
|
0 |
0 |
if $S[0] == $A and $S[2] == $B and $S[3] == $B and $S[5] == $C and $B != 3 and addmod(mulmod($B2, $B, $n), $n - $B, $n) == 1 |
|
4266
|
0 |
0 |
if $j == 0 and $n != 23 and $restrict > 2 |
|
4267
|
0 |
0 |
if $S[0] == 1 and $S[2] == 3 and $S[3] == 3 and $S[5] == 2 |
|
4268
|
0 |
0 |
if $S[0] == 0 and $S[5] == $n - 1 and $S[2] != $S[3] and addmod($S[2], $S[3], $n) == $n - 3 and mulmod(addmod($S[2], $n - $S[3], $n), addmod($S[2], $n - $S[3], $n), $n) == $n - 23 % $n |
|
4275
|
0 |
0 |
if $n < 4 |
|
4277
|
0 |
0 |
$m & 1 ? : |
|
|
0 |
0 |
binomial($m << 1, $m) % $n == ($m & 1 ? $n - 1 : 1) ? : |
|
4282
|
1 |
0 |
unless defined $P and defined $Q |
|
4283
|
0 |
1 |
if $n < 4 |
|
4285
|
1 |
0 |
unless ref $n eq 'Math::BigInt' |
|
4286
|
0 |
1 |
if $n->is_even |
|
4289
|
1 |
0 |
if ($P == 0 and $Q == 0) { } |
|
4293
|
0 |
1 |
if $P == 3 |
|
4295
|
0 |
1 |
$D >= 0 ? : |
|
4296
|
0 |
1 |
if $P >= $n or $Du >= $n |
|
4298
|
0 |
1 |
if $k == 0 |
|
4299
|
0 |
1 |
if $P == 10001 and _is_perfect_square($n) |
|
4303
|
0 |
0 |
$D >= 0 ? : |
|
4304
|
0 |
0 |
if _is_perfect_square($Du) |
|
4306
|
0 |
0 |
is_prime($n) ? : |
|
|
0 |
1 |
if $n <= $Du or $n <= abs $Q or $n <= abs $P |
|
4307
|
0 |
1 |
if &Math::Prime::Util::gcd(abs $P * $Q * $D, $n) > 1 |
|
4309
|
0 |
1 |
if ($k == 0) |
|
4311
|
0 |
0 |
if $k == 0 |
|
4313
|
0 |
0 |
$Q >= 0 ? : |
|
|
0 |
0 |
$k == 1 ? : |
|
4317
|
0 |
1 |
if $U == 0 and $V == $Vcomp |
|
4333
|
0 |
0 |
if exists $_mersenne_primes{$p} |
|
4334
|
0 |
0 |
if $p < 34007399 |
|
4337
|
0 |
0 |
if $p == 2 |
|
4338
|
0 |
0 |
unless is_prob_prime($p) |
|
4339
|
0 |
0 |
if $p > 3 and $p % 4 == 3 and $p < 9223372036854775807 and is_prob_prime($p * 2 + 1) |
|
4344
|
0 |
0 |
if $Math::Prime::Util::_GMPfunc{'lucas_sequence'} |
|
4357
|
0 |
206 |
unless scalar @poly |
|
4358
|
0 |
206 |
if ($_poly_bignum) |
|
4359
|
0 |
0 |
ref $_ eq 'Math::BigInt' ? : |
|
4383
|
0 |
180410 |
$_poly_bignum ? : |
|
4389
|
37 |
78516 |
unless $px_at_ix |
|
4390
|
0 |
78516 |
if ($_poly_bignum) { } |
|
4413
|
720 |
317 |
if $p & 1 |
|
4415
|
934 |
103 |
if $p |
|
4425
|
1 |
102 |
if scalar grep({$_;} @$pp) |
|
4431
|
5 |
7 |
if $n < 2 or is_power($n) |
|
4434
|
0 |
7 |
if ($n > 281474976710656) { } |
|
4435
|
0 |
0 |
unless (defined $Math::BigFloat::VERSION) |
|
4451
|
0 |
147 |
if $f == $n |
|
4452
|
1 |
146 |
unless $n % $f |
|
4456
|
1 |
4 |
unless $n % $r |
|
4458
|
2 |
2 |
if znorder($n, $r) > $limit |
|
4462
|
3 |
2 |
if $r >= $n |
|
4465
|
0 |
2 |
ref $log2n eq 'Math::BigFloat' ? : |
|
4471
|
2 |
0 |
if ($n < 4294967295) { } |
|
4475
|
0 |
0 |
unless ref $n eq 'Math::BigInt' |
|
4479
|
0 |
2 |
if $_verbose |
|
4480
|
0 |
2 |
if $_verbose > 1 |
|
4482
|
1 |
102 |
unless _test_anr($a, $n, $r) |
|
4483
|
0 |
102 |
if $_verbose > 1 |
|
4485
|
0 |
1 |
if $_verbose > 1 |
|
4493
|
0 |
0 |
$_[0] == 1 ? : |
|
|
0 |
37 |
if $_[0] < 4 |
|
4496
|
17 |
20 |
if (ref $_[0] ne 'Math::BigInt') { } |
|
4503
|
1 |
19 |
if ref $_[0] and $_[0]->upgrade |
|
4504
|
1 |
19 |
unless (Math::BigInt::bgcd($_[0], {sign => '+', value => ['30']})->is_one) |
|
4515
|
0 |
20 |
if $] >= 5.008 and $_[0] <= {sign => '+', value => [709551615, 446744073, 18]} |
|
4518
|
0 |
37 |
if ($_[0] > 1 and _is_prime7($_[0])) |
|
4530
|
0 |
213 |
if ($n < 4) |
|
4531
|
0 |
0 |
$n == 1 ? : |
|
4537
|
1 |
60 |
if $n > 400000000 and $_primes_small[-1] < 99000 and !defined($limit) || $limit > $_primes_small[-1] |
|
4543
|
39 |
174 |
if (ref $n eq 'Math::BigInt') |
|
4546
|
0 |
39 |
if not defined $limit or $limit > $newlim |
|
4549
|
18 |
17026 |
if $f > $limit |
|
4550
|
202 |
16824 |
if ($n->copy->bmod($f)->is_zero) |
|
4555
|
21 |
181 |
if $n < {sign => '+', value => [709551615, 446744073, 18]} |
|
4557
|
0 |
181 |
if $limit > $newlim |
|
4560
|
0 |
39 |
if $n->is_one |
|
4561
|
21 |
18 |
if $n <= {sign => '+', value => [709551615, 446744073, 18]} |
|
4562
|
0 |
39 |
if $start_idx <= $#_primes_small and $_primes_small[$start_idx] > $limit |
|
4566
|
18 |
195 |
ref $n eq 'Math::BigInt' ? : |
|
4567
|
142 |
71 |
if not defined $limit or $limit > $newlim |
|
4570
|
195 |
18 |
if (ref $n ne 'Math::BigInt') { } |
|
4573
|
186 |
29744 |
if $p > $limit |
|
4574
|
263 |
29481 |
if ($n % $p == 0) |
|
4576
|
9 |
254 |
if $n == 1 |
|
4578
|
199 |
55 |
if $newlim < $limit |
|
4581
|
0 |
195 |
if ($_primes_small[-1] < $limit) |
|
4582
|
0 |
0 |
$_primes_small[-1] % 6 == 1 ? : |
|
4585
|
0 |
0 |
if ($n % $p == 0) |
|
4587
|
0 |
0 |
if $n == 1 |
|
4589
|
0 |
0 |
if $newlim < $limit |
|
4603
|
0 |
864 |
if ($n->copy->bmod($f)->is_zero and $f->bacmp($limit) <= 0) |
|
4604
|
0 |
0 |
$f <= {sign => '+', value => [709551615, 446744073, 18]} ? : |
|
4609
|
0 |
0 |
if $n->is_one |
|
4611
|
0 |
0 |
if $limit > $newlim |
|
4617
|
204 |
9 |
if $n > 1 |
|
4645
|
1 |
200 |
if ($n < 4) |
|
4646
|
0 |
1 |
$n == 1 ? : |
|
4649
|
26 |
174 |
if ref $n eq 'Math::BigInt' |
|
4656
|
166 |
34 |
if $factors[-1] < $lim * $lim |
|
4663
|
10 |
48 |
if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]} |
|
4669
|
24 |
24 |
if scalar @ftry >= 2 |
|
4670
|
0 |
24 |
if Math::Prime::Util::prime_get_config()->{'verbose'} > 1 |
|
4673
|
24 |
0 |
if (scalar @ftry > 1) { } |
|
4676
|
13 |
11 |
if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]} |
|
4686
|
58 |
0 |
if $n != 1 |
|
4694
|
0 |
59 |
if ($f == 1 or $f == $n) { } |
|
4698
|
31 |
28 |
ref $n eq 'Math::BigInt' ? : |
|
4702
|
0 |
59 |
unless $f * $f2 == $n |
|
4704
|
0 |
59 |
if Math::Prime::Util::prime_get_config()->{'verbose'} > 0 |
|
4714
|
4 |
1 |
unless defined $rounds |
|
4715
|
5 |
0 |
unless defined $pa |
|
4718
|
5 |
0 |
unless ($skipbasic) |
|
4720
|
0 |
5 |
if $n < 4 |
|
4727
|
2 |
3 |
if (ref $n eq 'Math::BigInt') { } |
|
|
2 |
1 |
elsif ($n < 4294967296) { } |
|
4739
|
0 |
22 |
if ($f->bacmp($n) == 0) { } |
|
|
2 |
20 |
elsif (not $f->is_one) { } |
|
4740
|
0 |
0 |
if $inloop++ |
|
4756
|
39 |
25 |
$U > $V ? : |
|
4760
|
0 |
2 |
if $f == 1 |
|
4761
|
1 |
1 |
if ($f == $n) |
|
4767
|
1 |
1 |
$U > $V ? : |
|
4769
|
1 |
1 |
if $f != 1 |
|
4771
|
0 |
1 |
if $f == 1 or $f == $n |
|
4779
|
5 |
0 |
if ($n <= 9223372036854775807) { } |
|
4780
|
0 |
5 |
if $U >= $n |
|
4782
|
0 |
5 |
if $V >= $n |
|
4792
|
0 |
5 |
if ($f == $n) { } |
|
|
1 |
4 |
elsif ($f != 1) { } |
|
4793
|
0 |
0 |
if $inloop++ |
|
4806
|
4 |
37 |
unless defined $rounds |
|
4807
|
4 |
37 |
unless defined $pa |
|
4810
|
17 |
24 |
unless ($skipbasic) |
|
4812
|
0 |
17 |
if $n < 4 |
|
4818
|
20 |
21 |
if (ref $n eq 'Math::BigInt') { } |
|
|
10 |
11 |
elsif ($n < 4294967296) { } |
|
4832
|
0 |
168 |
$r > $rounds ? : |
|
4834
|
194 |
153 |
$rleft > $inner ? : |
|
4845
|
20 |
327 |
unless $f->is_one |
|
4847
|
148 |
20 |
if ($f->is_one) |
|
4852
|
0 |
20 |
if ($f == $n) |
|
4858
|
0 |
0 |
if $f == 1 or $f == $n |
|
4869
|
777 |
876 |
$Xi > $Xm ? : |
|
4870
|
10 |
1643 |
if $f != 1 and $f != $n |
|
4871
|
70 |
1573 |
if ($i & $i - 1) == 0 |
|
4878
|
5427 |
6170 |
$Xi > $Xm ? : |
|
4879
|
11 |
11586 |
if $f != 1 and $f != $n |
|
4880
|
104 |
11482 |
if ($i & $i - 1) == 0 |
|
4892
|
5 |
0 |
unless ($skipbasic) |
|
4894
|
0 |
5 |
if $n < 4 |
|
4897
|
1 |
4 |
if (ref $n ne 'Math::BigInt') |
|
4899
|
1 |
0 |
unless defined $B1 |
|
4907
|
0 |
1 |
if $pc_end > $B1 |
|
4911
|
2 |
0 |
if ($q <= $sqrtb1) |
|
4916
|
0 |
2 |
if ($pa == 0) |
|
4918
|
1 |
1 |
if $f != 1 |
|
4920
|
0 |
0 |
if $pc_end >= $B1 |
|
4931
|
1 |
3 |
unless (defined $B1) |
|
4937
|
1 |
0 |
if (scalar @nf > 1) |
|
4945
|
0 |
3 |
unless defined $B2 |
|
4958
|
3 |
0 |
if $pc_end > $B1 |
|
4964
|
50 |
3112 |
if ($j++ % 64 == 0) |
|
4965
|
0 |
50 |
if $pc_beg > 2 and ($j - 1) % 256 |
|
4968
|
0 |
50 |
if ($pa == 0) |
|
4970
|
0 |
50 |
if $f == $n |
|
4971
|
1 |
49 |
unless $f->is_one |
|
4977
|
2 |
0 |
if not $f->is_one or $pc_end >= $B1 |
|
4983
|
0 |
2 |
if ($pa == 0) |
|
4985
|
0 |
2 |
if ($f == $n) |
|
4993
|
0 |
0 |
if ($f == $n) |
|
4994
|
0 |
0 |
unless $f->is_one |
|
4999
|
2 |
0 |
if ($f->is_one and $B2 > $B1) |
|
5012
|
2 |
0 |
if $pc_end > $B2 |
|
5018
|
3 |
893 |
unless (defined $precomp_bm[$qdiff]) |
|
5022
|
0 |
896 |
if ($pa == 0) |
|
5024
|
7 |
889 |
if ($j++ % 128 == 0) |
|
5027
|
2 |
5 |
unless $f->is_one |
|
5030
|
2 |
0 |
if not $f->is_one or $pc_end >= $B2 |
|
5041
|
3 |
0 |
unless defined $rounds |
|
5042
|
3 |
0 |
unless defined $startrounds |
|
5043
|
0 |
3 |
if $startrounds < 1 |
|
5046
|
0 |
3 |
if $n < 4 |
|
5048
|
2 |
1 |
if (ref $n eq 'Math::BigInt') { } |
|
5052
|
0 |
2 |
if ($s * $s == $ni) |
|
5061
|
0 |
0 |
unless $mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25 |
|
5063
|
0 |
2 |
unless $f * $f == $m |
|
5064
|
2 |
0 |
$s > $f ? : |
|
5070
|
3 |
0 |
if $s * $s != $n * $i |
|
5071
|
3 |
0 |
$s < 4294967296 ? : |
|
5074
|
2 |
0 |
unless $mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25 |
|
5076
|
0 |
1 |
unless $f * $f == $m |
|
5087
|
2 |
0 |
unless defined $rounds |
|
5090
|
0 |
2 |
if $n < 4 |
|
5092
|
1 |
1 |
if (ref $n eq 'Math::BigInt') { } |
|
5094
|
0 |
1 |
if $pa * $pa == $n |
|
5100
|
0 |
0 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
|
5102
|
1 |
0 |
if ($s * $s == $b2) |
|
5112
|
0 |
1 |
if $pa * $pa == $n |
|
5118
|
1 |
1 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
|
5120
|
1 |
0 |
if ($s * $s == $b2) |
|
5139
|
0 |
5 |
if $n < 4 |
|
5141
|
0 |
5 |
if ($Math::Prime::Util::_GMPfunc{'ecm_factor'}) |
|
5142
|
0 |
0 |
unless defined $B1 |
|
5143
|
0 |
0 |
unless defined $ncurves |
|
5145
|
0 |
0 |
if (@ef > 1) |
|
5153
|
1 |
4 |
unless defined $ncurves |
|
5155
|
1 |
4 |
unless (defined $B1) |
|
5161
|
1 |
0 |
if (scalar @nf > 1) |
|
5170
|
0 |
4 |
unless defined $B2 |
|
5209
|
4 |
7 |
if $q > $sqrt_b1 |
|
5214
|
4 |
0 |
$B2 > $B1 ? : |
|
5223
|
5 |
0 |
if $f == 1 |
|
5224
|
0 |
5 |
if $f == $n |
|
5225
|
0 |
5 |
if $f != 1 |
|
5226
|
1 |
4 |
unless ref $cb eq 'Math::BigInt' |
|
5238
|
1 |
27 |
if ($i++ % 32 == 0) |
|
5240
|
1 |
0 |
if $f != 1 |
|
5244
|
0 |
5 |
if $f == $n |
|
5246
|
4 |
1 |
if ($f == 1 and $B2 > $B1) |
|
5247
|
2 |
2 |
if $D % 2 |
|
5253
|
0 |
4 |
if ($f != 1) |
|
5254
|
0 |
0 |
if $f == $n |
|
5264
|
138 |
141 |
if ($i % 2) { } |
|
5272
|
1 |
278 |
if $f != 1 |
|
5276
|
1 |
3 |
if ($f != 1) |
|
5277
|
0 |
1 |
if $f == $n |
|
5285
|
58 |
3 |
if ($m != 1) |
|
5289
|
1 |
57 |
if $f != 1 |
|
5293
|
0 |
57 |
if $f != 1 |
|
5295
|
60 |
0 |
if ($m + $D > $B1) |
|
5296
|
7256 |
4760 |
if $_ >= $m - $D |
|
5298
|
59 |
231 |
if $i >= $m |
|
5302
|
248 |
248 |
unless $i > $m |
|
5303
|
92 |
156 |
if $i > $m + $m or is_prime($m + $m - $i) |
|
5308
|
1 |
59 |
if $f != 1 |
|
5314
|
0 |
4 |
if $f == $n |
|
5315
|
3 |
1 |
if ($f != 1) |
|
5331
|
0 |
3 |
unless wantarray |
|
5332
|
0 |
0 |
$n == 0 ? : |
|
|
0 |
3 |
if $n <= 1 |
|
5334
|
0 |
3 |
if ($Math::Prime::Util::_GMPfunc{'divisors'}) |
|
5337
|
0 |
0 |
$_ <= 18446744073709551615 ? : |
|
|
0 |
0 |
if ref $n |
|
5342
|
0 |
3 |
if scalar @factors == 1 |
|
5345
|
3 |
0 |
if $bigint |
|
5346
|
3 |
0 |
$bigint ? : |
|
5355
|
48 |
28 |
$_ <= 18446744073709551615 ? : |
|
|
3 |
0 |
if $bigint |
|
5363
|
1 |
1 |
unless defined $low |
|
5367
|
2 |
0 |
if $high > $n |
|
5376
|
0 |
1 |
if $n <= 1 |
|
5393
|
0 |
0 |
if $n == 0 |
|
5394
|
0 |
0 |
if $n < 0 or $n % 4 == 1 or $n % 4 == 2 |
|
5395
|
0 |
0 |
if $n <= 60 |
|
5399
|
0 |
0 |
if ($b == 0) |
|
5401
|
0 |
0 |
if (_is_perfect_square($b2)) |
|
5406
|
0 |
0 |
unless $b2 % $i |
|
5410
|
0 |
0 |
unless $b2 % $b |
|
5412
|
0 |
0 |
if (_is_perfect_square($b2)) |
|
5417
|
0 |
0 |
unless $b2 % $i |
|
5421
|
0 |
0 |
$square ? : |
|
|
0 |
0 |
$b2 * 3 == $n ? : |
|
5428
|
0 |
0 |
if ($e == 1) { } |
|
5429
|
0 |
0 |
if $p <= 8 |
|
5437
|
0 |
0 |
if ($e == 2) { } |
|
|
0 |
0 |
elsif ($e == 3) { } |
|
5442
|
0 |
0 |
$_ & 1 ? : |
|
5448
|
0 |
0 |
if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
5456
|
1 |
8 |
if $p == 2 |
|
5458
|
8 |
0 |
if ($p < 1600) { } |
|
5481
|
0 |
9 |
if $e <= 0 |
|
5482
|
7 |
2 |
if $e == 1 |
|
5485
|
1 |
1 |
if $e == 2 |
|
5486
|
0 |
1 |
if $e == 3 |
|
5487
|
0 |
1 |
if $e == 4 |
|
5494
|
0 |
4 |
if $n <= 0 |
|
5497
|
4 |
0 |
if ($n < 100000 or not Math::Prime::Util::prime_get_config()->{'xs'}) |
|
5498
|
0 |
4 |
if ($Math::Prime::Util::_GMPfunc{'ramanujan_tau'}) |
|
5511
|
0 |
18 |
if $x == 0 |
|
5512
|
0 |
18 |
if $x == -9**9**9 |
|
5513
|
0 |
18 |
if $x == 9**9**9 |
|
5516
|
0 |
18 |
if ($x > 0 and _MPFR_available()) |
|
5527
|
0 |
0 |
$wantbf ? : |
|
5530
|
0 |
18 |
if defined $bignum::VERSION and ref $x ne 'Math::BigFloat' |
|
5538
|
1 |
17 |
if ($x < -1) { } |
|
|
5 |
12 |
elsif ($x < 0) { } |
|
|
9 |
3 |
elsif ($x < -log($tol)) { } |
|
5548
|
1 |
14 |
if abs $val - $old <= $tol * abs($val) |
|
5578
|
9 |
392 |
if $term < $tol |
|
5589
|
3 |
78 |
if $term < $tol |
|
5590
|
78 |
0 |
if ($term < $last_term) { } |
|
5604
|
1 |
26 |
if $x == 0 |
|
5605
|
0 |
26 |
if $x == 1 |
|
5606
|
0 |
26 |
if $x == 9**9**9 |
|
5607
|
0 |
26 |
if $x <= 0 |
|
5608
|
26 |
0 |
unless defined $opt |
|
5611
|
0 |
26 |
if ($x >= 1 and _MPFR_available()) |
|
5614
|
0 |
0 |
if ($opt) { } |
|
|
0 |
0 |
elsif (defined $bignum::VERSION or ref($x) =~ /^Math::Big/) { } |
|
5632
|
0 |
0 |
$wantbf ? : |
|
5635
|
1 |
25 |
if ($x == 2) |
|
5636
|
0 |
1 |
ref $x eq 'Math::BigFloat' ? : |
|
5640
|
0 |
15 |
if ref $x and not defined $bignum::VERSION and $x <= 1e+16 |
|
5641
|
0 |
25 |
if defined $bignum::VERSION and ref $x ne 'Math::BigFloat' |
|
5642
|
0 |
15 |
if ref $x and ref $x ne 'Math::BigFloat' and $x > 1e+16 |
|
5652
|
15 |
10 |
if (ref($x) =~ /^Math::Big/) |
|
5655
|
0 |
15 |
if $xdigits < $xlen |
|
5661
|
15 |
10 |
$xdigits ? : |
|
5663
|
15 |
10 |
if ($x > 1e+16) |
|
5664
|
15 |
0 |
ref $logx ? : |
|
5672
|
0 |
746 |
if $term < $tol |
|
5673
|
731 |
15 |
if ($term < $last_term) { } |
|
5679
|
731 |
0 |
if $xdigits |
|
5682
|
15 |
0 |
if $xdigits |
|
5686
|
10 |
0 |
if ($x >= 1) |
|
5694
|
10 |
567 |
if $term < $tol |
|
5695
|
0 |
567 |
if $xdigits |
|
5697
|
0 |
10 |
ref $x eq 'Math::BigFloat' ? : |
|
5699
|
0 |
10 |
if $xdigits |
|
5753
|
154 |
6 |
$x == int $x ? : |
|
5756
|
0 |
160 |
if (_MPFR_available()) |
|
5766
|
0 |
0 |
if ($ix) { } |
|
5776
|
0 |
0 |
$wantbf ? : |
|
5780
|
0 |
160 |
if ($Math::Prime::Util::_GMPfunc{'zeta'}) |
|
5786
|
0 |
0 |
if ($strval =~ s/^(1\.0*)/./) { } |
|
5787
|
0 |
0 |
if length $1 > 2 |
|
5792
|
0 |
0 |
$wantbf ? : |
|
5796
|
4 |
156 |
if (defined $bignum::VERSION or ref($x) =~ /^Math::Big/) |
|
5802
|
8 |
148 |
if $x == int $x and defined $_Riemann_Zeta_Table[int($x) - 2] |
|
5828
|
144 |
389 |
if abs $rb / $s < $tol |
|
5840
|
4 |
25 |
if $t < $tol |
|
5851
|
0 |
14 |
if $x <= 0 |
|
5854
|
0 |
14 |
if (_MPFR_available()) |
|
5891
|
0 |
0 |
if Math::MPFR::Rmpfr_less_p($rterm, $rstop) |
|
5895
|
0 |
0 |
$wantbf ? : |
|
5898
|
0 |
14 |
if ($Math::Prime::Util::_GMPfunc{'riemannr'}) |
|
5901
|
0 |
0 |
$wantbf ? : |
|
5935
|
4 |
10 |
if (defined $bignum::VERSION or ref($x) =~ /^Math::Big/) |
|
5943
|
1 |
9 |
if ($x > 1e+17) { } |
|
5946
|
6 |
13 |
if $mob[$k] == 0 |
|
5950
|
1 |
12 |
if abs $term < $tol * abs($sum) |
|
5957
|
277 |
148 |
$k <= $#_Riemann_Zeta_Table ? : |
|
5963
|
9 |
416 |
if $term < $tol * $sum |
|
5971
|
0 |
1 |
if $x < -0.36787944118 |
|
5972
|
0 |
1 |
if ref $x eq 'Math::BigInt' |
|
5973
|
0 |
1 |
ref $x ? : |
|
5976
|
0 |
1 |
if ($Math::Prime::Util::_GMPfunc{'lambertw'}) |
|
5977
|
0 |
0 |
!$xacc ? : |
|
5984
|
0 |
1 |
if ($x < -0.06) { } |
|
|
0 |
1 |
elsif ($x < 1.363) { } |
|
|
0 |
1 |
elsif ($x < 3.7) { } |
|
5986
|
0 |
0 |
if $ti <= 0 |
|
6019
|
0 |
1 |
$xacc ? : |
|
6020
|
0 |
1 |
if $xacc |
|
6022
|
0 |
200 |
if $w == 0 |
|
6029
|
0 |
200 |
if abs $wen < $tol |
|
6031
|
0 |
1 |
if $xacc |
|
6039
|
0 |
986 |
unless $digits |
|
6040
|
0 |
986 |
if $digits < 15 |
|
6041
|
14 |
972 |
if $digits < 30 |
|
6073
|
0 |
972 |
if ($Math::Prime::Util::_GMPfunc{'Pi'}) |
|
6074
|
0 |
0 |
if $_verbose |
|
6079
|
0 |
972 |
if (!$have_xdigits || $digits > 60 and _MPFR_available()) |
|
6080
|
0 |
0 |
if $_verbose |
|
6093
|
1 |
971 |
if (not $have_xdigits or $have_bigint_gmp and $digits > 100) |
|
6094
|
0 |
1 |
if $_verbose |
|
6114
|
971 |
0 |
if ($have_xdigits) |
|
6115
|
0 |
971 |
if $_verbose |
|
6142
|
0 |
0 |
if $_verbose |
|
6159
|
0 |
1 |
if (defined $rhash) |
|
6160
|
0 |
0 |
unless ref $rhash eq 'HASH' |
|
6162
|
0 |
0 |
if (defined $rhash->{'amin'}) |
|
6166
|
0 |
0 |
if (defined $rhash->{'amax'}) |
|
6170
|
0 |
0 |
if defined $rhash->{'n'} |
|
6171
|
0 |
0 |
if defined $rhash->{'nmin'} |
|
6172
|
0 |
0 |
if defined $rhash->{'nmax'} |
|
6175
|
0 |
0 |
if (defined $rhash->{'prime'}) |
|
6179
|
0 |
0 |
if $mina < 1 |
|
6180
|
0 |
0 |
if $maxa > $n |
|
6181
|
0 |
0 |
if $minn < 1 |
|
6182
|
0 |
0 |
if $maxn > $n |
|
6183
|
0 |
0 |
if $primeq != -1 and $primeq != 0 |
|
6186
|
0 |
1 |
if $n == 0 and $minn <= 1 |
|
6187
|
0 |
1 |
if $n < $minn or $minn > $maxn or $mina > $maxa or $maxn <= 0 or $maxa <= 0 |
|
6199
|
5 |
0 |
$ispart ? : |
|
6212
|
0 |
5 |
if $k + 1 < $minn |
|
6214
|
0 |
5 |
if ($mina > 1 or $maxa < $n) |
|
6215
|
0 |
0 |
if $a[0] > $maxa |
|
6216
|
0 |
0 |
if ($ispart) { } |
|
6217
|
0 |
0 |
if $a[$k] > $maxa |
|
6219
|
0 |
0 |
unless $_ < $mina |
|
|
0 |
0 |
if &Math::Prime::Util::vecany(sub {
$_ > $maxa unless $_ < $mina;
}
, @a[0 .. $k]) |
|
6222
|
0 |
5 |
if $primeq == 0 and &Math::Prime::Util::vecany(sub {
is_prime($_);
}
, @a[0 .. $k]) |
|
6223
|
0 |
5 |
if $primeq == 2 and &Math::Prime::Util::vecany(sub {
not is_prime($_);
}
, @a[0 .. $k]) |
|
6224
|
0 |
5 |
if &Math::Prime::Util::_get_forexit() |
|
6234
|
1 |
0 |
if (defined $k) { } |
|
6236
|
0 |
1 |
if $k > $n |
|
6245
|
0 |
1 |
if ($k == 0) { } |
|
6251
|
0 |
3 |
if &Math::Prime::Util::_get_forexit() |
|
6252
|
1 |
2 |
if $c[-1]++ < $n - 1 |
|
6255
|
1 |
1 |
if $i < 0 |
|
6260
|
0 |
1 |
if &Math::Prime::Util::_get_forexit() |
|
6272
|
0 |
6 |
unless ($all_perm) |
|
6275
|
0 |
0 |
if ($c[$p] == $k - $p - 1) |
|
6281
|
6 |
0 |
if ($send) |
|
6283
|
0 |
6 |
if &Math::Prime::Util::_get_forexit() |
|
6285
|
3 |
3 |
if (++$inc & 1) |
|
6291
|
1 |
2 |
if $j >= $k |
|
6302
|
0 |
1 |
if defined $k |
|
6303
|
0 |
1 |
if $n == 0 |
|
6304
|
0 |
1 |
if $n == 1 |
|
6310
|
0 |
0 |
if defined $k |
|
6311
|
0 |
0 |
if $n == 0 |
|
6312
|
0 |
0 |
if $n == 1 |
|
6319
|
1 |
77 |
if $sum == 0 |
|
6324
|
0 |
77 |
if ($sum == 1) { } |
|
|
51 |
26 |
elsif ($sum == 2) { } |
|
6328
|
5 |
46 |
if (@n == 1) { } |
|
6332
|
45 |
1 |
unless &Math::Prime::Util::_get_forexit() |
|
6347
|
3 |
70 |
if &Math::Prime::Util::_get_forexit() |
|
6356
|
0 |
0 |
if $n == 0 |
|
6357
|
0 |
0 |
if $n == 1 |
|
6359
|
0 |
0 |
if int $k / $f >= $n |
|
6365
|
0 |
0 |
if $n == 0 |
|
6374
|
0 |
2 |
unless ref $A eq 'ARRAY' |
|
6377
|
1 |
1 |
if $n == 0 |
|
6382
|
0 |
26 |
if not defined $v or $v < 0 or $v >= $n or $S{$v}++ |
|
6390
|
156 |
169 |
if $A->[$j] < $A->[$i] |
|
6401
|
0 |
0 |
if (defined $k) |
|
6404
|
0 |
0 |
if not defined $k or $k > $n |
|
6405
|
0 |
0 |
if $k == 0 |
|
6408
|
0 |
0 |
if ("$k" / "$n" <= 0.3) { } |
|
6418
|
0 |
0 |
if $i >= $k |
|
6444
|
0 |
27 |
if $n <= 0 |
|
6445
|
0 |
27 |
if $n <= 32 |
|
6446
|
0 |
27 |
if $n <= 64 |
|
6455
|
0 |
27 |
if $Math::Prime::Util::_GMPfunc{'urandomm'} |
|
6456
|
0 |
27 |
if $n <= 1 |
|
6458
|
0 |
27 |
if ($n <= 4294967295) { } |
|
|
0 |
27 |
elsif (not ref $n) { } |
|
6477
|
0 |
2 |
if (scalar @_ == 1) { } |
|
6482
|
0 |
2 |
if $Math::Prime::Util::_GMPfunc{'random_prime'} |
|
6492
|
0 |
3 |
if $Math::Prime::Util::_GMPfunc{'random_ndigit_prime'} |
|
6500
|
0 |
8 |
if $Math::Prime::Util::_GMPfunc{'random_nbit_prime'} |
|
6508
|
0 |
1 |
if $Math::Prime::Util::_GMPfunc{'random_strong_prime'} |
|
6518
|
0 |
3 |
if $Math::Prime::Util::_GMPfunc{'random_maurer_prime'} |
|
6522
|
0 |
3 |
unless Math::Prime::Util::verify_prime($cert) |
|
6533
|
0 |
1 |
if $Math::Prime::Util::_GMPfunc{'random_shawe_taylor_prime'} |
|
6537
|
0 |
1 |
unless Math::Prime::Util::verify_prime($cert) |
|
6546
|
0 |
2 |
if (scalar @_ == 1) { } |
|
6548
|
0 |
2 |
if $k <= 0 |
|
6550
|
0 |
2 |
if ($Math::Prime::Util::_GMPfunc{'miller_rabin_random'}) |
|
6551
|
0 |
0 |
if defined $seed |
|
6556
|
0 |
2 |
if ($k >= int 3 * $n / 4) |
|
6558
|
0 |
0 |
unless &Math::Prime::Util::is_strong_pseudoprime($n, $_) |
|
6563
|
1 |
1 |
unless &Math::Prime::Util::is_strong_pseudoprime($n, &Math::Prime::Util::urandomm($brange) + 2) |
|
6566
|
0 |
1 |
$k >= 20 ? : |
|
6567
|
0 |
1 |
unless is_strong_pseudoprime($n, map({urandomm($brange) + 2;} 1 .. $nbases)) |
|
6575
|
0 |
1 |
if defined $b and int $b < 0 |
|
6579
|
0 |
1 |
$b <= 64 ? : |
|
6583
|
0 |
1 |
$b <= 64 ? : |
|
6587
|
0 |
1 |
if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
|
6593
|
0 |
1 |
if defined $b and int $b < 0 |
|
6597
|
0 |
1 |
$b <= 64 ? : |
|
6600
|
0 |
1 |
if ($b <= 64) { } |
|
6642
|
95 |
31 |
unless defined $M{$prime} |
|
6644
|
0 |
31 |
if ($r <= $PR) |
|
6650
|
1 |
0 |
unless (defined $p) |
|
6666
|
1 |
0 |
$re < 44.3614195558365 ? : |
|
6668
|
0 |
1 |
$a < 2 ? : |
|
6670
|
1 |
0 |
ref $min ? : |
|
6671
|
1 |
0 |
ref $max ? : |
|
6675
|
0 |
1 |
if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |