line |
true |
false |
branch |
12
|
28 |
12 |
unless (defined $Math::BigInt::VERSION) |
49
|
0 |
0 |
unless _is_positive_int($n) |
50
|
0 |
0 |
if $n > $_precalc_size |
54
|
0 |
10 |
if defined $Math::Prime::Util::GMP::VERSION and $Math::Prime::Util::GMP::VERSION >= 0.49 |
62
|
0 |
0 |
if defined $_[0] and $_[0] ne '' |
74
|
1 |
1011 |
unless (defined $Math::BigFloat::VERSION) |
87
|
34 |
0 |
if ref($x) =~ /^Math::Big/ |
88
|
19 |
15 |
if defined $b |
91
|
0 |
0 |
$i > $f ? : |
|
0 |
15 |
if defined $i and defined $f |
92
|
0 |
15 |
if defined $i |
93
|
0 |
15 |
if defined $f |
96
|
0 |
15 |
$i > $f ? : |
|
15 |
0 |
if defined $i and defined $f |
97
|
0 |
0 |
if defined $i |
98
|
0 |
0 |
if defined $f |
104
|
0 |
0 |
if (defined $bignum::VERSION or ref($_[0]) =~ /^Math::Big/) |
105
|
0 |
0 |
unless (defined $Math::BigFloat::VERSION) |
107
|
0 |
0 |
if (ref $_[0] eq 'Math::BigInt') |
110
|
0 |
0 |
if $xacc |
112
|
0 |
0 |
if ref $_[0] ne 'Math::BigFloat' |
122
|
0 |
269 |
unless defined $n |
123
|
33 |
236 |
if ref $n |
124
|
0 |
236 |
if $n eq '' or $n =~ tr[0-9][\000-/:-\377]c and not $n =~ /^\+\d+$/ |
126
|
0 |
236 |
if defined $min and $n < $min |
127
|
0 |
236 |
if defined $max and $n > $max |
128
|
0 |
236 |
if substr($n, 0, 1) eq '+' |
129
|
4 |
232 |
unless $n < 18446744073709551615 or int $n eq '18446744073709551615' |
135
|
0 |
16409 |
unless defined $n |
136
|
0 |
16409 |
if (ref $n eq 'CODE') |
140
|
727 |
15682 |
if (ref $n eq 'Math::BigInt') { } |
|
0 |
15682 |
elsif (ref $n eq 'Math::GMPz') { } |
141
|
0 |
727 |
if $n->sign ne '+' or not $n->is_int |
143
|
13 |
714 |
if $n <= {sign => '+', value => [709551615, 446744073, 18]} |
145
|
0 |
0 |
if Math::GMPz::Rmpz_sgn($n) < 0 |
146
|
0 |
0 |
if $n <= 18446744073709551615 |
149
|
0 |
15682 |
if ($strn eq '-0') |
150
|
1 |
15681 |
if $strn eq '' or $strn =~ tr[0-9][\000-/:-\377]c and not $strn =~ /^\+?\d+$/ |
152
|
15547 |
134 |
if ($n <= 18446744073709551615) { } |
153
|
0 |
15547 |
if ref $n |
158
|
0 |
16408 |
if ref $_[0] eq 'Math::BigInt' and $_[0]->upgrade |
159
|
0 |
16408 |
if defined $min and $_[0] < $min |
160
|
0 |
16408 |
if defined $max and $_[0] > $max |
166
|
0 |
1215 |
unless defined $n |
167
|
0 |
1215 |
if (ref $n eq 'CODE') |
173
|
1185 |
30 |
if (ref $n eq 'Math::BigInt') { } |
174
|
0 |
1185 |
unless $n->is_int |
175
|
496 |
689 |
if $n <= $poscmp and $n >= $negcmp |
178
|
0 |
30 |
if ($strn eq '-0') |
179
|
0 |
30 |
if $strn eq '' or $strn =~ tr[\-0-9][\000-,./:-\377]c and not $strn =~ /^[-+]?\d+$/ |
181
|
27 |
3 |
if ($n <= $poscmp and $n >= $negcmp) { } |
182
|
0 |
27 |
if ref $n |
187
|
0 |
1215 |
if ref $_[0] and $_[0]->upgrade |
195
|
0 |
0 |
if defined $exitsub and &$exitsub($n, $lo, $hi) |
196
|
0 |
0 |
if (&$sub($mid) < $n) { } |
221
|
0 |
2 |
if $n >= $_primes_small[-1] |
226
|
8 |
10 |
if ($_primes_small[$mid] <= $n) { } |
235
|
0 |
9711 |
if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]} |
236
|
280 |
9431 |
if (ref $n eq 'Math::BigInt') |
237
|
63 |
217 |
unless Math::BigInt::bgcd($n, {sign => '+', value => [568529303, 51702675, 261944]})->is_one |
238
|
114 |
103 |
unless _miller_rabin_2($n) |
240
|
0 |
89 |
$n <= '18446744073709551615' ? : |
|
89 |
14 |
$is_esl_prime ? : |
243
|
3295 |
6136 |
if ($n < 3721) |
245
|
1922 |
17757 |
if $i * $i > $n |
246
|
1262 |
16495 |
unless $n % $i |
251
|
175 |
3683 |
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 |
265
|
373 |
3310 |
if ($n <= 1500000) |
269
|
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) |
276
|
292 |
629 |
if $i > $limit |
277
|
33 |
596 |
unless $n % $i |
283
|
3255 |
55 |
if ($n < 47636622961201) |
288
|
3169 |
86 |
if ($n < 19471033) { } |
|
4 |
82 |
elsif ($n < 38010307) { } |
|
12 |
70 |
elsif ($n < 316349281) { } |
|
29 |
41 |
elsif ($n < 4759123141) { } |
|
40 |
1 |
elsif ($n < 154639673381) { } |
|
1 |
0 |
elsif ($n < 47636622961201) { } |
|
0 |
0 |
elsif ($n < 3770579582154547) { } |
296
|
355 |
2900 |
is_strong_pseudoprime($n, @bases) ? : |
300
|
9 |
46 |
unless _miller_rabin_2($n) |
301
|
13 |
33 |
is_almost_extra_strong_lucas_pseudoprime($n) ? : |
306
|
0 |
6808 |
if defined $n and int $n < 0 |
309
|
323 |
6485 |
if (ref $n eq 'Math::BigInt') { } |
310
|
86 |
237 |
unless Math::BigInt::bgcd($n, {sign => '+', value => ['30']})->is_one |
312
|
59 |
9 |
$n == 2 || $n == 3 || $n == 5 ? : |
|
68 |
6417 |
if ($n < 7) |
313
|
2765 |
3101 |
unless $n % 2 and $n % 3 and $n % 5 |
327
|
0 |
32 |
if defined $n and int $n < 0 |
329
|
25 |
7 |
unless _miller_rabin_2($n) |
330
|
0 |
7 |
if ($n <= 18446744073709551615) |
331
|
0 |
0 |
is_almost_extra_strong_lucas_pseudoprime($n) ? : |
333
|
6 |
1 |
is_extra_strong_lucas_pseudoprime($n) ? : |
338
|
0 |
5 |
if defined $n and $n < 2 |
340
|
0 |
5 |
if ($n <= 18446744073709551615) |
341
|
0 |
0 |
unless _miller_rabin_2($n) |
342
|
0 |
0 |
unless is_almost_extra_strong_lucas_pseudoprime($n) |
372
|
6 |
50 |
if ($end & 1) == 0 |
376
|
0 |
56 |
if $whole > 1145324612 |
397
|
14 |
606 |
if $end > $primary_size_limit |
399
|
2 |
604 |
if ($primary_sieve_size == 0) |
411
|
0 |
547 |
if ref $end and $end <= {sign => '+', value => [709551615, 446744073, 18]} |
413
|
0 |
547 |
if $beg % 2 == 0 |
414
|
0 |
547 |
if $end % 2 == 0 |
415
|
0 |
547 |
if $end < $beg |
416
|
0 |
547 |
if $beg < 3 |
424
|
14 |
533 |
if $beg == 3 |
425
|
2 |
545 |
if $beg == 5 |
430
|
11 |
536 |
if $end < 49 |
432
|
0 |
536 |
ref $end ? : |
433
|
536 |
0 |
if not defined $limit or $sqlimit < $limit |
441
|
39327 |
698 |
if ($p2 < $beg) |
443
|
19575 |
19752 |
unless $f % 2 |
448
|
20147 |
19878 |
if ($p2 <= $end) |
464
|
1 |
1 |
unless (defined $high) |
470
|
0 |
2 |
if $low > $high |
474
|
2 |
0 |
if ($high - $low < 1000) |
475
|
2 |
0 |
if $low >= 2 |
485
|
0 |
0 |
if $low <= 2 and $high >= 2 |
486
|
0 |
0 |
if $low <= 3 and $high >= 3 |
487
|
0 |
0 |
if $low <= 5 and $high >= 5 |
488
|
0 |
0 |
if $low < 7 |
489
|
0 |
0 |
if $low % 2 == 0 |
490
|
0 |
0 |
if $high % 2 == 0 |
495
|
0 |
0 |
if _miller_rabin_2($p) and is_extra_strong_lucas_pseudoprime($p) |
502
|
65 |
104 |
if (scalar @_ > 1) { } |
505
|
8 |
57 |
if $low < 2 |
511
|
6 |
163 |
if $low > $high or $high < 2 |
512
|
268242 |
1945 |
if $_ >= $low |
|
150 |
13 |
if $high <= $_primes_small[-1] |
516
|
0 |
13 |
if $Math::Prime::Util::_GMPfunc{'sieve_primes'} and $Math::Prime::Util::GMP::VERSION >= 0.34 |
521
|
0 |
12 |
if ref $low eq 'Math::BigInt' or ref $high eq 'Math::BigInt' or $low > 1000000000000 and $high - $low < int $low / 1000000 |
525
|
4 |
8 |
if $low <= 2 and $high >= 2 |
526
|
4 |
8 |
if $low <= 3 and $high >= 3 |
527
|
4 |
8 |
if $low <= 5 and $high >= 5 |
528
|
5 |
7 |
if $low < 7 |
529
|
5 |
7 |
if $low % 2 == 0 |
530
|
9 |
3 |
if $high % 2 == 0 |
531
|
0 |
12 |
if $low > $high |
534
|
5 |
7 |
if ($low == 7) { } |
555
|
0 |
0 |
if ($n < 5) |
556
|
0 |
0 |
if $n <= 2 and $n + $width - 1 >= 2 |
557
|
0 |
0 |
if $n <= 3 and $n + $width - 1 >= 3 |
558
|
0 |
0 |
if $n <= 4 and $n + $width - 1 >= 4 and $depth < 2 |
563
|
0 |
0 |
if $depth < 2 |
565
|
0 |
0 |
if $_ & 1 |
566
|
0 |
0 |
if $depth < 5 |
569
|
0 |
0 |
unless ($start & 1) |
570
|
0 |
0 |
unless $width & 1 |
571
|
0 |
0 |
if $width < 1 |
587
|
0 |
12 |
if ($Math::Prime::Util::_GMPfunc{'sieve_prime_cluster'}) |
588
|
0 |
0 |
$_ > '18446744073709551615' ? : |
592
|
0 |
12 |
if scalar @cl == 0 |
597
|
0 |
36 |
if $cl[$i] & 1 |
598
|
0 |
36 |
if $cl[$i] <= $cl[$i - 1] |
601
|
12 |
0 |
if $hi - $lo < 50000000 |
602
|
12 |
0 |
if $hi - $lo < 1000000 |
603
|
1 |
11 |
if $hi - $lo < 20000 and $lo < 18446744073709551615 |
606
|
2 |
10 |
if ($lo <= $sievelim) |
607
|
0 |
2 |
if $sievelim > $hi |
611
|
484 |
122 |
unless (is_prime($n + $cl[$ci])) |
613
|
122 |
484 |
if $ac |
617
|
0 |
12 |
if $lo > $hi |
623
|
12810 |
12810 |
if $_ & 1 |
625
|
48 |
0 |
if ($p >= 7) { } |
626
|
10579 |
6039 |
if ($_ + $c) % 3 and ($_ + $c) % 5 |
628
|
0 |
0 |
if ($_ + $c) % 3 |
636
|
0 |
12 |
if $_verbose |
637
|
0 |
12 |
if scalar @acc == 0 |
655
|
12 |
58 |
if ($lo + $acc[-1] > $hi) |
664
|
30 |
12470 |
unless scalar @racc |
668
|
24 |
46 |
if ($lo < 10000000000000) { } |
673
|
0 |
884 |
unless (&Math::Prime::Util::is_prime($p + $c)) |
675
|
442 |
0 |
if $good |
682
|
100 |
40 |
unless (&Math::Prime::Util::is_strong_pseudoprime($p + $c, 2)) |
684
|
100 |
6 |
unless $good |
687
|
0 |
12 |
unless (&Math::Prime::Util::is_extra_strong_lucas_pseudoprime($p + $c)) |
689
|
6 |
0 |
if $good |
695
|
0 |
12 |
if $_verbose |
702
|
0 |
0 |
if $n <= 0 |
707
|
0 |
0 |
if is_prime($k) |
708
|
0 |
0 |
if $s < $n |
709
|
0 |
0 |
if ($k & 3) == 1 and is_prime($k + 1 >> 1) |
710
|
0 |
0 |
if $s < $n |
717
|
0 |
0 |
unless defined $high |
718
|
0 |
0 |
if $low > $high or $high < 2 |
728
|
0 |
0 |
if $n == 2 |
729
|
0 |
0 |
if $n < 11 |
731
|
0 |
0 |
scalar @$L > 0 ? : |
736
|
0 |
0 |
if $n <= 0 |
744
|
4025 |
933 |
if $n <= $#_prime_next_small |
748
|
5 |
928 |
if ref $n ne 'Math::BigInt' and $n >= 18446744073709551557 |
752
|
0 |
11 |
if ($n > 4294967295 and Math::Prime::Util::prime_get_config()->{'gmp'}) |
756
|
11 |
917 |
if (ref $n eq 'Math::BigInt') { } |
772
|
1 |
156 |
if $n <= 11 |
773
|
0 |
2 |
if ($n > 4294967295 and Math::Prime::Util::prime_get_config()->{'gmp'}) |
777
|
2 |
154 |
if (ref $n eq 'Math::BigInt') { } |
795
|
4 |
53 |
$n >= 400 ? : |
800
|
9683 |
464380 |
if $p > $j |
801
|
237074 |
227306 |
if (++$k & 2) { } |
816
|
30 |
37 |
if ($n < $max) |
826
|
893 |
67 |
if ($m <= 18446744073709551615) { } |
836
|
57 |
46 |
$n >= $max ? : |
|
0 |
103 |
ref $n ? : |
842
|
47 |
56 |
if $pn <= {sign => '+', value => [709551615, 446744073, 18]} |
848
|
0 |
0 |
$n == 1 ? : |
|
0 |
25 |
if $k == 0 |
849
|
0 |
25 |
if $k == 1 |
850
|
0 |
0 |
$n == 1 ? : |
|
0 |
25 |
if $n <= 1 |
853
|
0 |
25 |
if $Math::Prime::Util::_GMPfunc{'jordan_totient'} |
857
|
23 |
2 |
unless ref $n eq 'Math::BigInt' |
865
|
23 |
2 |
if $totient->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
870
|
3 |
105 |
if scalar @_ > 1 |
872
|
0 |
105 |
if defined $n and $n < 0 |
875
|
0 |
105 |
if $Math::Prime::Util::_GMPfunc{'totient'} |
878
|
4 |
101 |
if $n <= 1 |
883
|
1 |
100 |
if (ref $n eq 'Math::BigInt') { } |
885
|
1 |
0 |
if ($n->is_even) |
887
|
0 |
1 |
if $s > 1 |
891
|
50 |
50 |
if ($n % 2 == 0) |
896
|
49 |
52 |
if ($#pe == 0 and $pe[0][1] == 1) { } |
|
51 |
1 |
elsif (ref $n ne 'Math::BigInt') { } |
897
|
49 |
0 |
if (ref $n ne 'Math::BigInt') { } |
914
|
0 |
101 |
if ref $totient eq 'Math::BigInt' and $totient->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
923
|
0 |
0 |
wantarray ? : |
|
0 |
0 |
if $n == 1 |
924
|
0 |
0 |
wantarray ? : |
|
0 |
0 |
if $n < 1 or $n & 1 |
926
|
0 |
0 |
if not ref $n and $n > 562949953421312 |
929
|
0 |
0 |
if (is_prime($n >> 1)) |
930
|
0 |
0 |
wantarray ? : |
|
0 |
0 |
unless is_prime($n + 1) |
931
|
0 |
0 |
wantarray ? : |
|
0 |
0 |
if $n >= 10 |
934
|
0 |
0 |
if (not wantarray) { } |
937
|
0 |
0 |
if $do_bigint |
939
|
0 |
0 |
if (&Math::Prime::Util::is_prime($p)) |
943
|
0 |
0 |
if (defined $r{$d2}) |
950
|
0 |
0 |
defined $r{$n} ? : |
954
|
0 |
0 |
if $do_bigint |
956
|
0 |
0 |
if (&Math::Prime::Util::is_prime($p)) |
960
|
0 |
0 |
if defined $r{$d2} |
968
|
0 |
0 |
unless defined $r{$n} |
985
|
0 |
3 |
if $hi < $lo |
987
|
3 |
0 |
if ($hi > 1073741824 or $hi - $lo < 100) { } |
994
|
0 |
0 |
unless $tot[$i] == $i |
1000
|
0 |
0 |
if $lo > 0 |
1007
|
3 |
99 |
if scalar @_ > 1 |
1009
|
0 |
99 |
if defined $n and $n < 0 |
1010
|
10 |
89 |
unless _validate_num($n) |
1011
|
0 |
0 |
$n == 1 ? : |
|
0 |
99 |
if $n <= 1 |
1012
|
1 |
98 |
if $n >= 49 and not $n % 4 && $n % 9 && $n % 25 && $n % 49 |
1015
|
32 |
74 |
if $factors[$i] == $factors[$i - 1] |
1017
|
34 |
32 |
scalar(@factors) % 2 ? : |
1020
|
3 |
1 |
&Math::Prime::Util::moebius($_[0]) != 0 ? : |
1025
|
0 |
1 |
if $n < 6 |
1026
|
0 |
0 |
&Math::Prime::Util::is_prob_prime($n >> 1) ? : |
|
0 |
1 |
if $n % 2 == 0 |
1027
|
0 |
0 |
&Math::Prime::Util::is_prob_prime($n / 3) ? : |
|
0 |
1 |
if $n % 3 == 0 |
1028
|
0 |
0 |
&Math::Prime::Util::is_prob_prime($n / 5) ? : |
|
0 |
1 |
if $n % 5 == 0 |
1031
|
1 |
0 |
if @f > 2 |
1032
|
0 |
0 |
_is_prime7($f[1]) ? : |
|
0 |
0 |
if @f == 2 |
1034
|
0 |
0 |
if _is_prime7($n) |
1037
|
0 |
0 |
if @f > 2 |
1038
|
0 |
0 |
_is_prime7($f[1]) ? : |
|
0 |
0 |
if @f == 2 |
1042
|
0 |
0 |
if @f > 2 |
1043
|
0 |
0 |
_is_prime7($f[1]) ? : |
|
0 |
0 |
if @f == 2 |
1045
|
0 |
0 |
scalar &Math::Prime::Util::factor($n) == 2 ? : |
1050
|
208 |
0 |
ref $n ? : |
|
239 |
131 |
if $maxd <= 1 or ref $n ? $n->is_odd : $n & 1 |
1051
|
0 |
131 |
unless ref $n or $n < 18446744073709551615 |
1053
|
1 |
130 |
if $n == 1 or $n < $maxd and &Math::Prime::Util::is_prime(2 * $n + 1) |
1055
|
120 |
881 |
if $d >= $maxd |
1056
|
879 |
2 |
$d < 9223372036854775807 ? : |
1057
|
546 |
335 |
unless &Math::Prime::Util::is_prime($p) |
1060
|
4 |
364 |
if $r == $p or _totpred($r, $d) |
1061
|
331 |
33 |
if $r % $p |
1070
|
0 |
3 |
if $n == 1 |
1071
|
0 |
3 |
if $n <= 0 |
1080
|
0 |
6 |
if $hi < $lo |
1081
|
0 |
6 |
if $lo == $hi |
1082
|
2 |
4 |
if ($lo < 0) |
1083
|
1 |
1 |
if ($hi < 0) { } |
1089
|
0 |
4 |
if ($hi > 4294967296) |
1097
|
1 |
3 |
if $lo == 0 |
1101
|
8 |
1 |
$lo % $i ? : |
|
9 |
5 |
if $i < $lo |
1107
|
8 |
3 |
$lo % $i ? : |
|
11 |
3 |
if $i < $lo |
1116
|
37 |
7 |
if abs $m != $i |
1128
|
0 |
1 |
if $n <= 1 |
1135
|
25 |
39 |
if $mu[$m] == 0 |
1143
|
1066 |
982 |
if $this_k == $next_k |
1154
|
0 |
0 |
if $k < 1 or $n < 1 |
1157
|
0 |
0 |
if $m == 0 or $k == $g |
1172
|
2 |
3 |
unless &Math::Prime::Util::is_prime_power($n, \$p) |
1178
|
0 |
3 |
if $n < 8 |
1179
|
0 |
3 |
if ($n & $n - 1) == 0 |
1182
|
0 |
3 |
if $pe[0][0] == 2 and $pe[0][1] > 2 |
1185
|
1 |
2 |
if (not ref $n) { } |
1195
|
1 |
1 |
if $lcm->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
1207
|
0 |
1 |
if $n < 561 or $n % 2 == 0 |
1208
|
0 |
1 |
unless $n % 9 and $n % 25 and $n % 49 and $n % 121 |
1213
|
0 |
12 |
if ($fn % $a == 0) |
1214
|
0 |
0 |
if ($n - 1) % ($a - 1) != 0 |
1216
|
0 |
0 |
unless $fn % $a |
1219
|
0 |
1 |
if &Math::Prime::Util::powmod(2, $n - 1, $n) != 1 |
1224
|
0 |
1 |
if (length $fn > 50) |
1225
|
0 |
0 |
if &Math::Prime::Util::is_prime($n) |
1229
|
0 |
0 |
if ($gcd == 1) { } |
1230
|
0 |
0 |
if &Math::Prime::Util::powmod($a, $n - 1, $n) != 1 |
1232
|
0 |
0 |
if $gcd != $a |
1233
|
0 |
0 |
if ($n - 1) % ($a - 1) != 0 |
1242
|
0 |
1 |
if scalar @pe < 3 |
1244
|
0 |
3 |
if $pe->[1] > 1 or ($n - 1) % ($pe->[0] - 1) != 0 |
1253
|
0 |
0 |
if $n < 35 |
1254
|
0 |
0 |
unless $n % 4 and $n % 9 and $n % 25 and $n % 49 and $n % 121 |
1258
|
0 |
0 |
if scalar @pe < 2 |
1261
|
0 |
0 |
if $pe->[1] > 1 |
1265
|
0 |
0 |
if ($n < 2000) { } |
1271
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
$nb % ($_ - $b) == 0;
}
, @f) |
1273
|
0 |
0 |
if (scalar @f > 2) |
1276
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
$nb % ($_ + $b) == 0;
}
, @f) |
1281
|
0 |
0 |
if (scalar @f == 2) { } |
1285
|
0 |
0 |
if $d >= $spf |
1286
|
0 |
0 |
if $j |
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
my $j = $_ - $k;
$p % $j == 0 if $j;
}
, @f) |
1292
|
0 |
0 |
if $k == 0 or $k >= $spf |
1293
|
0 |
0 |
if $j |
|
0 |
0 |
if &Math::Prime::Util::vecall(sub {
my $j = $_ - $k;
$p % $j == 0 if $j;
}
, @f) |
1302
|
0 |
0 |
if defined $p and int $p < 0 |
1304
|
0 |
0 |
if $p <= 2 |
1310
|
0 |
0 |
if $nfac == $pm1 and $p % $n != 1 |
1319
|
1 |
1 |
if $neg |
1321
|
2 |
0 |
if ($r) |
1323
|
1 |
1 |
if (not $neg) { } |
1324
|
0 |
0 |
$r == 4 ? : |
|
0 |
1 |
if $r4 == 0 |
1325
|
1 |
0 |
if $r4 == 1 |
1327
|
0 |
1 |
$r == 12 ? : |
|
1 |
0 |
if $r4 == 0 |
1328
|
0 |
0 |
if $r4 == 3 |
1340
|
0 |
0 |
defined $k && $k == 0 ? : |
|
0 |
920 |
if $n == 0 |
1341
|
84 |
836 |
if $n == 1 |
1343
|
831 |
5 |
if (defined $k and ref $k eq 'CODE') |
1347
|
12 |
3474 |
$refn ? : |
1352
|
0 |
4 |
unless not defined $k or _validate_num($k) or _validate_positive_integer($k) |
1354
|
1 |
4 |
unless defined $k |
1357
|
0 |
5 |
if $Math::Prime::Util::_GMPfunc{'sigma'} |
1359
|
3 |
0 |
$k <= 5 ? : |
|
2 |
3 |
$k == 0 ? : |
1372
|
2 |
3 |
if ($k == 0) { } |
|
0 |
3 |
elsif (not $will_overflow) { } |
|
0 |
3 |
elsif (ref $n and ref $n ne 'Math::BigInt') { } |
|
2 |
1 |
elsif ($k == 1) { } |
1389
|
0 |
0 |
if ($e >= 2) |
1399
|
37 |
15 |
if ($e == 1) |
1414
|
27 |
0 |
if ($e == 1) |
1438
|
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) { } |
1456
|
11 |
10 |
if $a <= 6 |
1457
|
0 |
10 |
unless defined $primes |
1458
|
0 |
0 |
$x > 0 ? : |
|
0 |
10 |
if $x < $primes->[$a] |
1467
|
1011 |
1201 |
if ($sval < $primea) { } |
1476
|
0 |
1114 |
if $vals{$v} == 0 |
1488
|
3 |
58 |
if $high < 7 |
1489
|
20 |
38 |
unless $high & 1 |
1495
|
5437 |
2990 |
unless defined $high |
1497
|
5458 |
2969 |
if ($low < 3) { } |
1499
|
4232 |
4195 |
unless $high & 1 |
1500
|
0 |
8427 |
if $low > $high |
1504
|
498 |
7929 |
if (not defined $sref or $send >= length $$sref) |
1514
|
55 |
21 |
if $x < 1000 |
1515
|
0 |
21 |
if (ref $x eq 'Math::BigInt') |
1517
|
21 |
0 |
ref $x ne 'Math::BigInt' ? : |
1522
|
21 |
0 |
ref $x ne 'Math::BigInt' ? : |
1526
|
0 |
84 |
ref($_) =~ /^Math::Big/ ? : |
1530
|
0 |
21 |
$b <= 10 ? : |
1550
|
252 |
2738 |
if ($i <= $c) |
1564
|
7 |
13 |
unless (defined $high) |
1573
|
6 |
14 |
if $low <= 2 and $high >= 2 |
1574
|
7 |
13 |
if $low < 3 |
1576
|
7 |
13 |
if $low % 2 == 0 |
1577
|
10 |
10 |
if $high % 2 == 0 |
1578
|
2 |
18 |
if $low > $high |
1580
|
1 |
16 |
if (ref $low eq 'Math::BigInt' or ref $high eq 'Math::BigInt' or $high - $low < 10 or $high - $low < int $low / 100000000000) |
1593
|
10 |
6 |
if ($high > 50000) |
1594
|
5 |
5 |
if ($high / ($high - $low + 1) < 100) |
1596
|
2 |
3 |
$low == 3 ? : |
1601
|
4 |
7 |
if $low == 3 |
1613
|
0 |
20 |
if $n <= 0 |
1614
|
10 |
10 |
if $n <= $#_primes_small |
1616
|
0 |
10 |
if ($n > 425656284035217743 and ref $n ne 'Math::BigFloat') |
1617
|
0 |
0 |
unless (defined $Math::BigFloat::VERSION) |
1628
|
0 |
10 |
$n <= 10 ? : |
1629
|
3 |
7 |
if ($nth_prime_upper > 100000) |
1632
|
2 |
1 |
unless $nth_prime_lower % 2 |
1639
|
7 |
3 |
$n < 10000 ? : |
|
0 |
10 |
$n < 1000 ? : |
1644
|
10 |
25 |
if $count + $segcount >= $n |
1652
|
3696 |
14755 |
unless substr $$sieveref, $prime - $start >> 1, 1 |
1663
|
0 |
1 |
if $n <= 0 |
1664
|
0 |
1 |
if $n <= $#_primes_small |
1666
|
1 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
1672
|
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) { } |
1694
|
0 |
3 |
unless _validate_num($n) |
1696
|
0 |
3 |
if $n <= 0 |
1697
|
0 |
3 |
if $n <= $#_primes_small |
1699
|
3 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
1718
|
0 |
0 |
unless _validate_num($n) |
1720
|
0 |
0 |
if $n <= 5 |
1721
|
0 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
1729
|
0 |
0 |
if abs $term >= abs $old_term |
1732
|
0 |
0 |
if abs $term < 1e-06 |
1734
|
0 |
0 |
if (ref $t) { } |
1736
|
0 |
0 |
if $t->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
1744
|
0 |
0 |
unless _validate_num($n) |
1746
|
0 |
0 |
if $n <= 5 |
1747
|
0 |
0 |
if $n > 425656284035217743 or $n > 35184372088832 |
1755
|
0 |
0 |
if abs $term >= abs $old_term |
1758
|
0 |
0 |
if abs $term < 1e-06 |
1760
|
0 |
0 |
if (ref $t) { } |
1762
|
0 |
0 |
if $t->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
1771
|
0 |
1 |
unless _validate_num($n) |
1773
|
0 |
1 |
if $n <= 0 |
1774
|
0 |
1 |
if $n <= $#_primes_small |
1777
|
0 |
1 |
if $n > 1000000000000 |
1779
|
0 |
1 |
if ref $n eq 'Math::BigInt' or $n >= 425656284035217743 |
1806
|
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) { } |
1827
|
4 |
1 |
unless _validate_num($x) |
1830
|
4 |
1 |
if ref $_[0] eq 'Math::BigInt' and $x > 1e+16 |
1852
|
4 |
1 |
if ref($x) =~ /^Math::Big/ |
1855
|
1 |
4 |
if ($Math::Prime::Util::_GMPfunc{'riemannr'} or not ref $x) { } |
1859
|
0 |
4 |
unless ref $x eq 'Math::BigFloat' |
1861
|
4 |
0 |
if ref $x and $x->accuracy |
1864
|
4 |
0 |
ref $x ? : |
1867
|
32 |
56 |
unless $m != 0 |
1875
|
4 |
52 |
if $term < 0.25 |
1876
|
22 |
30 |
if ($m == 1) { } |
1881
|
4 |
1 |
if (ref $result) |
1882
|
0 |
4 |
unless ref $result eq 'Math::BigFloat' |
1891
|
8 |
3 |
unless _validate_num($x) |
1893
|
1 |
10 |
if $x < $_primes_small[-1] |
1896
|
0 |
10 |
if $Math::Prime::Util::_GMPfunc{'prime_count_lower'} |
1898
|
8 |
2 |
if ref $x eq 'Math::BigInt' or ref $_[0] eq 'Math::BigInt' |
1904
|
8 |
2 |
ref $x eq 'Math::BigFloat' ? : |
1915
|
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'}) { } |
1918
|
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) { } |
1933
|
1 |
7 |
if ($x < 1e+19) { } |
1936
|
7 |
0 |
if (ref $x eq 'Math::BigFloat') { } |
1949
|
8 |
2 |
if ref $result eq 'Math::BigFloat' |
1955
|
8 |
3 |
unless _validate_num($x) |
1958
|
1 |
10 |
if $x < $_primes_small[-1] |
1961
|
0 |
10 |
if $Math::Prime::Util::_GMPfunc{'prime_count_upper'} |
1963
|
8 |
2 |
if ref $x eq 'Math::BigInt' or ref $_[0] eq 'Math::BigInt' |
1979
|
8 |
2 |
ref $x eq 'Math::BigFloat' ? : |
1981
|
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'}) { } |
1982
|
0 |
0 |
$x < 5000 ? : |
|
0 |
0 |
$x < 1621 ? : |
1985
|
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) { } |
2012
|
0 |
0 |
$x < 101260000000 ? : |
|
0 |
0 |
$x < 10010000000 ? : |
|
0 |
0 |
$x < 1100000000 ? : |
2018
|
8 |
0 |
if (ref $x eq 'Math::BigFloat') { } |
2030
|
8 |
2 |
if ref $result eq 'Math::BigFloat' |
2036
|
0 |
1 |
if (defined $high) { } |
2042
|
1 |
0 |
if $seghigh > $high |
2058
|
0 |
0 |
if (defined $high) { } |
2062
|
0 |
0 |
$low < 4 ? : |
2067
|
0 |
0 |
if (defined $high) { } |
2073
|
0 |
0 |
if $seghigh > $high |
2082
|
0 |
2 |
if $n < 2000 |
2083
|
2 |
0 |
if ref $n |
2091
|
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) { } |
2108
|
0 |
2 |
if defined $fm |
2115
|
0 |
0 |
if $n < 4 |
2127
|
0 |
1 |
if $n < 0 |
2128
|
0 |
1 |
if $n <= 6 |
2143
|
0 |
0 |
if $n < 6 |
2144
|
0 |
0 |
if ref $n or $n > 1.27e+16 |
2148
|
0 |
0 |
if $n > 59 and $n <= 1092 |
2151
|
0 |
0 |
$n > 480 ? : |
|
0 |
0 |
$n > 1e+16 ? : |
2162
|
0 |
0 |
if $n < 0 |
2163
|
0 |
0 |
if $n <= 8 |
2172
|
0 |
0 |
if $n < 0 |
2174
|
0 |
0 |
if $n <= 8 |
2184
|
0 |
0 |
if $n <= 2 |
2185
|
0 |
0 |
if $n > 6148914691236517205 |
2187
|
0 |
0 |
if $n < 10000 |
2188
|
0 |
0 |
if $nth > 1.0421889307180538e+17 |
2189
|
0 |
0 |
if ($n < 1000000) { } |
|
0 |
0 |
elsif ($n < 10000000000) { } |
2192
|
0 |
0 |
if ref $nth and $nth->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2197
|
0 |
0 |
if $n <= 2 |
2198
|
0 |
0 |
if $n > 9.2233720368547758e+18 |
2200
|
0 |
0 |
if $nth > 67079069358943824 |
2201
|
0 |
0 |
if ($n < 10000) { } |
|
0 |
0 |
elsif ($n < 10000000000) { } |
2203
|
0 |
0 |
if ref $nth and $nth->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2208
|
0 |
0 |
if $n <= 2 |
2214
|
0 |
0 |
$n < 2 ? : |
|
0 |
0 |
if $n < 11 |
2222
|
0 |
0 |
$n < 2 ? : |
|
0 |
0 |
if $n < 11 |
2230
|
0 |
0 |
$n < 2 ? : |
|
0 |
0 |
if $n < 11 |
2241
|
0 |
0 |
if $n < 5 |
2246
|
0 |
0 |
$k <= $r ? : |
2254
|
0 |
0 |
if $v < $p2 |
2256
|
0 |
0 |
if $a > $r |
2257
|
0 |
0 |
if $b > $r |
2266
|
0 |
0 |
if (defined $high) { } |
2270
|
0 |
0 |
if $high > 29505444490 |
2274
|
0 |
0 |
if ($low <= 2 and $high >= 29505444491) |
2279
|
0 |
0 |
if $low > $high |
2283
|
0 |
0 |
if (not Math::Prime::Util::prime_get_config()->{'xs'} || ref $sum and 1 and $high - $low > 1000000) |
2285
|
0 |
0 |
if $high >= 4294967295 |
2287
|
0 |
0 |
if $low > 2 |
2292
|
0 |
0 |
$xssum && $high > 50000000000000 ? : |
2296
|
0 |
0 |
if $next > $high |
2298
|
0 |
0 |
$xssum ? : |
2299
|
0 |
0 |
if $next == $high |
2306
|
0 |
0 |
if (defined $high) { } |
2310
|
0 |
0 |
unless defined $fd |
2313
|
0 |
0 |
if ($high >= $low) |
2317
|
0 |
0 |
if $p2 > $high |
2318
|
0 |
0 |
if ($Math::Prime::Util::_GMPfunc{'sieve_primes'}) { } |
2334
|
2104 |
40919 |
if ($x | $y) < 4294967296 |
2337
|
0 |
40919 |
if $x >= $n |
2338
|
0 |
40919 |
if $y >= $n |
2339
|
1709 |
39210 |
if $x < $y |
2340
|
40495 |
424 |
if ($n <= 9223372036854775807) { } |
2342
|
450476 |
478783 |
if $r >= $n |
|
929259 |
973059 |
if ($y & 1) |
2344
|
965229 |
937089 |
if $x >= $n |
2346
|
19853 |
20642 |
if $r >= $n |
|
40495 |
0 |
if ($y & 1) |
2349
|
6152 |
6600 |
$x >= $r ? : |
|
12752 |
13266 |
if ($y & 1) |
2351
|
12884 |
13134 |
$x > $n - $x ? : |
2353
|
190 |
234 |
$x >= $r ? : |
|
424 |
0 |
if ($y & 1) |
2359
|
0 |
33314 |
if $x >= $n |
2360
|
15 |
33299 |
if $y >= $n |
2361
|
215 |
33099 |
if ($n - $x <= $y) |
2362
|
131 |
84 |
if $y > $x |
2374
|
45166 |
21699 |
if $power & 1 |
2376
|
63263 |
3602 |
if $power |
2385
|
0 |
186 |
if $n >= $m |
2386
|
12 |
174 |
if ($m < 4294967296) { } |
2388
|
74 |
145 |
if $power & 1 |
2390
|
207 |
12 |
if $power |
2394
|
3248 |
3765 |
if $power & 1 |
2396
|
6839 |
174 |
if $power |
2406
|
1 |
6 |
if (0 == scalar grep({ref $_;} @_)) |
2411
|
1 |
1 |
if $x < 0 |
2416
|
13 |
0 |
$_ < 2147483647 && !ref($_) || ref $_ eq 'Math::BigInt' ? : |
2419
|
6 |
0 |
if $gcd->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2423
|
0 |
4 |
unless @_ |
2425
|
12 |
0 |
$_ < 2147483647 && !ref($_) || ref $_ eq 'Math::BigInt' ? : |
2426
|
0 |
12 |
if $v == 0 |
2427
|
0 |
12 |
if $v < 0 |
2430
|
1 |
3 |
if $lcm->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2435
|
0 |
3 |
if ($x == 0) |
2436
|
0 |
3 |
if ($y == 0) |
2438
|
0 |
3 |
if ($Math::Prime::Util::_GMPfunc{'gcdext'}) |
2447
|
1 |
2 |
if (abs $x < 9223372036854775807 and abs $y < 9223372036854775807) { } |
2448
|
0 |
1 |
if ref $x eq 'Math::BigInt' |
2449
|
0 |
1 |
if ref $y eq 'Math::BigInt' |
2465
|
1 |
1 |
if $a->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2466
|
1 |
1 |
if $b->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2467
|
2 |
0 |
if $g->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2469
|
0 |
3 |
if ($g < 0) |
2474
|
0 |
7 |
unless scalar @_ |
2475
|
0 |
7 |
if scalar @_ == 1 |
2478
|
0 |
7 |
if ($Math::Prime::Util::_GMPfunc{'chinese'} and $Math::Prime::Util::GMP::VERSION >= 0.42) |
2480
|
0 |
0 |
if (defined $sum) |
2482
|
0 |
0 |
if ref $sum and $sum->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2488
|
0 |
12 |
if not ref $ai and abs $ai > 9223372036854775807 || 0 |
2489
|
2 |
10 |
if not ref $ni and abs $ni > 9223372036854775807 || 0 |
2490
|
7 |
7 |
unless (defined $lcm) |
2498
|
35 |
131 |
ref $g ? : |
2501
|
0 |
7 |
if $g < 0 |
2502
|
0 |
7 |
if $g != 1 and $sum % $g != $ai % $g |
2503
|
5 |
2 |
if $s < 0 |
2504
|
2 |
5 |
if $t < 0 |
2506
|
4 |
3 |
if (not ref $lcm and $lcm * $s > 18446744073709551615) |
2507
|
6 |
1 |
if (ref $lcm) { } |
2516
|
0 |
1 |
if $u < 0 |
2517
|
1 |
0 |
if $v < 0 |
2525
|
1 |
6 |
if ref $sum and $sum->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2531
|
0 |
0 |
unless defined $hi and defined $lo |
2537
|
0 |
0 |
@_ ? : |
|
0 |
528 |
if @_ <= 1 |
2540
|
0 |
528 |
if $Math::Prime::Util::_GMPfunc{'vecsum'} |
2545
|
514 |
1558 |
if ($sum > 18446744073709551365 or $sum < $neglim) |
2555
|
0 |
14078 |
unless @_ |
2557
|
0 |
14078 |
if $Math::Prime::Util::_GMPfunc{'vecprod'} |
2562
|
5 |
14073 |
if $prod->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 and $prod->bcmp({sign => '-', value => [854775807, 223372036, 9]}) > 0 |
2567
|
0 |
1 |
unless @_ |
2569
|
2 |
0 |
if $_ < $min |
2573
|
0 |
1 |
unless @_ |
2575
|
0 |
2 |
if $_ > $max |
2582
|
0 |
0 |
if ref $mask eq 'ARRAY' |
2589
|
0 |
0 |
if $mask & 1 |
2599
|
0 |
0 |
if not defined $base and $n =~ s/^0b// |
2600
|
0 |
0 |
if not defined $base and $n =~ s/^0x// |
2601
|
0 |
0 |
if (not defined $base or $base == 10) { } |
2605
|
0 |
0 |
if $base < 2 |
2609
|
0 |
0 |
if $p > 0 |
2617
|
0 |
4 |
if $n == 0 or $a == 0 |
2618
|
0 |
4 |
if $n == 1 |
2619
|
1 |
3 |
if $n < 0 |
2620
|
0 |
4 |
if ($n > 18446744073709551615) |
2622
|
0 |
0 |
if not defined $invmod or $invmod->is_nan |
2623
|
0 |
0 |
if $invmod->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2633
|
1 |
3 |
if $r > 1 |
2634
|
1 |
2 |
if $t < 0 |
2640
|
1 |
0 |
if (ref $r) { } |
2641
|
0 |
1 |
if $r->copy->bmul($r)->bmod($n)->bcmp($a) |
2642
|
0 |
1 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2644
|
0 |
0 |
unless $r * $r % $n == $a |
2646
|
0 |
1 |
if $n - $r < $r |
2652
|
0 |
1 |
if $n == 0 |
2653
|
0 |
1 |
if ($n <= 2 or $a <= 1) |
2655
|
0 |
0 |
$a * $a % $n == $a ? : |
2658
|
0 |
1 |
if ($n < 10000000) |
2663
|
0 |
0 |
if $a == 1 |
2666
|
0 |
0 |
if $r * $r % $n == $a |
2671
|
1 |
0 |
unless ref $a eq 'Math::BigInt' |
2672
|
1 |
0 |
unless ref $n eq 'Math::BigInt' |
2676
|
1 |
0 |
if ($n % 4 == 3) |
2680
|
0 |
0 |
if ($n % 8 == 5) |
2682
|
0 |
0 |
if ($q->is_one) { } |
2691
|
0 |
0 |
if $n->is_odd and not $a->copy->bmodpow($n - 1 >> 1, $n)->is_one |
2697
|
0 |
0 |
if $r->copy->bmul($r)->bmod($n) == $a |
2705
|
0 |
19419 |
if $n <= 1 |
2706
|
432 |
0 |
if $n < 18446744073709551615 and $a >= 0 and $a < 18446744073709551615 and $b >= 0 and $b < 18446744073709551615 |
2708
|
87 |
18900 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2714
|
0 |
7368 |
if $n <= 1 |
2715
|
0 |
0 |
if $n < 18446744073709551615 and $a > 0 and $a < 18446744073709551615 and $b > 0 and $b < 18446744073709551615 |
2717
|
0 |
7368 |
if $Math::Prime::Util::_GMPfunc{'mulmod'} |
2719
|
43 |
7325 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2724
|
0 |
0 |
if $n <= 1 |
2726
|
0 |
0 |
if ($ret->is_nan) { } |
2729
|
0 |
0 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2735
|
0 |
22 |
if $n <= 1 |
2736
|
0 |
22 |
if ($Math::Prime::Util::_GMPfunc{'powmod'}) |
2738
|
0 |
0 |
defined $r ? : |
2741
|
0 |
22 |
if ($ret->is_nan) { } |
2744
|
9 |
13 |
if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2752
|
27618 |
34660 |
if ($y < $x) { } |
|
3 |
34657 |
elsif ($x < 0) { } |
2762
|
0 |
1194 |
if defined $refp and not ref $refp |
2764
|
4 |
1190 |
if abs $n <= 3 and not $a |
2766
|
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) |
2769
|
0 |
0 |
unless defined $a |
2771
|
0 |
0 |
unless $k > 0 |
2772
|
0 |
0 |
if (defined $refp) |
2773
|
0 |
0 |
unless $a |
2775
|
0 |
0 |
if $isneg |
2777
|
0 |
0 |
if $$refp > 18446744073709551615 |
2778
|
0 |
0 |
if $isneg |
2783
|
0 |
1190 |
if (defined $a and $a != 0) { } |
2784
|
0 |
0 |
if $a == 1 |
2785
|
0 |
0 |
if $n < 0 and $a % 2 == 0 |
2786
|
0 |
0 |
if ($a == 2) { } |
2787
|
0 |
0 |
if (_is_perfect_square($n)) |
2788
|
0 |
0 |
if defined $refp |
2792
|
0 |
0 |
unless ref $n eq 'Math::BigInt' |
2794
|
0 |
0 |
if $n->is_neg |
2795
|
0 |
0 |
if ($root->copy->bpow($a) == $n) |
2796
|
0 |
0 |
if defined $refp |
2801
|
501 |
689 |
unless ref $n eq 'Math::BigInt' |
2802
|
256 |
934 |
if ($n < 0) |
2805
|
0 |
256 |
unless $root |
2806
|
128 |
128 |
if ($root % 2 == 0) |
2809
|
6 |
122 |
if $root == 1 |
2811
|
61 |
61 |
if defined $refp |
2813
|
125 |
125 |
if defined $refp |
2819
|
263 |
3505 |
if $root->is_one |
2820
|
671 |
2834 |
if ($root->copy->bpow($e) == $n) |
2822
|
128 |
543 |
if not $next and defined $refp |
2823
|
412 |
259 |
if $next != 0 |
2834
|
0 |
1 |
if $n < 0 |
2842
|
0 |
0 |
if defined $refp and not ref $refp |
2843
|
0 |
0 |
if $n <= 1 |
2845
|
0 |
0 |
if defined $refp |
|
0 |
0 |
if (&Math::Prime::Util::is_prime($n)) |
2848
|
0 |
0 |
if ($k) |
2849
|
0 |
0 |
if ref $r and $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
2850
|
0 |
0 |
unless &Math::Prime::Util::is_prime($r) |
2851
|
0 |
0 |
if defined $refp |
2858
|
0 |
2 |
if defined $refp and not ref $refp |
2859
|
0 |
2 |
if $k < 3 |
2860
|
0 |
2 |
if $n <= 0 |
2861
|
0 |
0 |
if defined $refp |
|
0 |
2 |
if ($n == 1) |
2863
|
0 |
2 |
if ($Math::Prime::Util::_GMPfunc{'polygonal_nth'}) |
2865
|
0 |
0 |
unless $nth |
2867
|
0 |
0 |
if defined $refp |
2872
|
0 |
2 |
if ($k == 4) |
2873
|
0 |
0 |
unless _is_perfect_square($n) |
2874
|
0 |
0 |
if defined $refp |
2877
|
0 |
2 |
if ($n <= 4294967296 and $k <= 4294967296) { } |
2878
|
0 |
0 |
$k == 3 ? : |
2879
|
0 |
0 |
unless _is_perfect_square($D) |
2883
|
2 |
0 |
if ($k == 3) { } |
2888
|
1 |
1 |
unless _is_perfect_square($D) |
2892
|
0 |
1 |
if $D % $R != 0 |
2893
|
0 |
1 |
if defined $refp |
2899
|
0 |
132 |
if defined $n and $n < 0 |
2900
|
2 |
130 |
unless _validate_num($n) |
2901
|
0 |
132 |
if $n < 2 or $k < 2 |
2903
|
130 |
2 |
if ($k == 2) |
2904
|
1 |
129 |
if (ref $n eq 'Math::BigInt') |
2905
|
0 |
1 |
unless $n->is_even |
2929
|
0 |
3 |
if ($base == 10) { } |
|
2 |
1 |
elsif ($base == 2) { } |
|
0 |
1 |
elsif ($base == 16) { } |
2942
|
0 |
3 |
if ($len >= 0 and $len != scalar @d) |
2951
|
0 |
3 |
unless defined $base |
2952
|
3 |
0 |
unless defined $len |
2953
|
0 |
3 |
if $base < 2 |
2954
|
0 |
3 |
if $n == 0 |
2955
|
0 |
3 |
if $n < 0 |
2956
|
3 |
0 |
unless _validate_num($n) |
2962
|
0 |
0 |
unless defined $base |
2963
|
0 |
0 |
unless defined $len |
2965
|
0 |
0 |
if $base == 2 and $len < 0 |
2966
|
0 |
0 |
if $base == 8 and $len < 0 |
2967
|
0 |
0 |
if $base == 16 and $len < 0 |
2968
|
0 |
0 |
$n == 0 ? : |
2969
|
0 |
0 |
if $base <= 10 |
2970
|
0 |
0 |
if $base > 36 |
2976
|
0 |
1 |
unless defined $base |
2977
|
0 |
1 |
if $base == 10 and ref($r) =~ /^Math::/ |
2979
|
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) { } |
2980
|
0 |
0 |
unless ref $r eq 'ARRAY' |
3001
|
16 |
0 |
if ($c ne '0') |
3003
|
0 |
16 |
unless $d >= 0 |
3008
|
0 |
1 |
if $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3020
|
0 |
58 |
unless $k > 0 |
3023
|
0 |
58 |
if (defined $refp) |
3024
|
0 |
0 |
unless ref $refp |
3032
|
0 |
0 |
if defined $refp and not ref $refp |
3034
|
0 |
0 |
if ($Math::Prime::Util::_GMPfunc{'logint'}) |
3036
|
0 |
0 |
if (defined $refp) |
3038
|
0 |
0 |
if $r == 0 |
3044
|
0 |
0 |
unless $n > 0 |
3045
|
0 |
0 |
unless defined $b |
3046
|
0 |
0 |
if ($b == 10) |
3048
|
0 |
0 |
if defined $refp |
3051
|
0 |
0 |
if ($b == 2) |
3053
|
0 |
0 |
if defined $refp |
3056
|
0 |
0 |
unless $b > 1 |
3059
|
0 |
0 |
if defined $refp |
3067
|
0 |
103 |
if $n == 0 |
3068
|
0 |
103 |
if $n > 1 and $n % 2 |
3075
|
2477 |
2477 |
if ($w ^= 1) { } |
3087
|
50 |
53 |
if $n % 4 == 0 |
3094
|
4 |
107 |
if $n == 0 |
3095
|
2 |
105 |
if $n == 1 |
3096
|
2 |
103 |
if $n < 0 or $n & 1 |
3105
|
0 |
518 |
if $m == $n |
3106
|
0 |
518 |
if $n == 0 or $m == 0 or $m > $n |
3107
|
1 |
517 |
unless defined $type |
3108
|
0 |
470 |
unless $type == 1 or $type == 2 or $type == 3 |
3109
|
0 |
518 |
if ($m == 1) |
3110
|
0 |
0 |
if $type == 2 |
3111
|
0 |
0 |
if $type == 3 |
3112
|
0 |
0 |
if $n & 1 |
3116
|
0 |
518 |
if $Math::Prime::Util::_GMPfunc{'stirling'} |
3119
|
5 |
513 |
if ($type == 3) { } |
|
465 |
48 |
elsif ($type == 2) { } |
3128
|
7355 |
7586 |
$m - $j & 1 ? : |
3139
|
402 |
380 |
$k & 1 ? : |
3148
|
212 |
1047 |
if $b - $a == {_a => undef, _p => undef, sign => '+', value => [1]} |
3149
|
457 |
590 |
if $b - $a == {sign => '+', value => [2]} |
3158
|
0 |
79 |
if $n <= 0 |
3159
|
79 |
0 |
unless ref $n eq 'Math::BigInt' |
3168
|
0 |
21 |
unless (defined $Math::BigFloat::VERSION) |
3169
|
0 |
21 |
if $n <= 0 |
3175
|
21 |
0 |
unless defined $sprec |
3176
|
21 |
0 |
unless defined $sprec |
3177
|
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) |
3187
|
0 |
0 |
if $term->bacmp($eps) < 0 |
3206
|
0 |
10 |
if int $n < 0 |
3208
|
0 |
10 |
unless scalar @bases > 0 |
3209
|
0 |
10 |
if $n < 4 |
3212
|
0 |
10 |
if $base < 2 |
3213
|
0 |
10 |
if $base >= $n |
3214
|
10 |
0 |
if ($base > 1 and $base != $n - 1) |
3215
|
0 |
10 |
ref $n eq 'Math::BigInt' ? : |
3218
|
0 |
10 |
unless $x == 1 |
3226
|
0 |
0 |
if int $n < 0 |
3228
|
0 |
0 |
unless scalar @bases > 0 |
3229
|
0 |
0 |
if $n < 4 |
3232
|
0 |
0 |
if $base < 2 |
3233
|
0 |
0 |
if $base >= $n |
3234
|
0 |
0 |
if ($base > 1 and $base != $n - 1) |
3236
|
0 |
0 |
if $j == 0 |
3237
|
0 |
0 |
$j > 0 ? : |
3238
|
0 |
0 |
ref $n eq 'Math::BigInt' ? : |
3241
|
0 |
0 |
unless $x == $j |
3249
|
0 |
0 |
if int $n < 0 |
3251
|
0 |
0 |
if $n < 4 |
3252
|
0 |
0 |
if $n % 2 == 0 |
3256
|
0 |
0 |
if ($ap == 1) |
3257
|
0 |
0 |
if ($ap == $n - 1) |
3264
|
476 |
3263 |
if (ref $n eq 'Math::BigInt') { } |
3266
|
476 |
0 |
unless (defined $nm1) |
3276
|
111 |
365 |
if $x->is_one or $x->bcmp($nm1) == 0 |
3279
|
0 |
356 |
if $x->is_one |
3280
|
70 |
286 |
if $x->bcmp($nm1) == 0 |
3285
|
3263 |
0 |
unless (defined $nm1) |
3295
|
3206 |
57 |
if ($n < 4294967296) { } |
3297
|
10 |
3196 |
if $x == 1 or $x == $nm1 |
3300
|
3 |
3804 |
if $x == 1 |
3301
|
306 |
3498 |
if $x == $n - 1 |
3305
|
38 |
19 |
if $x == 1 or $x == $nm1 |
3307
|
0 |
31 |
$x < 4294967296 ? : |
3308
|
0 |
31 |
if $x == 1 |
3309
|
10 |
21 |
if $x == $n - 1 |
3318
|
0 |
3619 |
if int $n < 0 |
3320
|
0 |
3619 |
unless scalar @bases > 0 |
3322
|
4 |
3615 |
if $n < 4 |
3323
|
0 |
3615 |
if $n % 2 == 0 |
3325
|
3365 |
250 |
if ($bases[0] == 2) |
3326
|
2990 |
375 |
unless _miller_rabin_2($n) |
3328
|
50 |
325 |
unless @bases |
3333
|
0 |
718 |
if $base < 2 |
3334
|
5 |
713 |
if $base >= $n |
3335
|
0 |
718 |
if $base == 0 or $base == $n - 1 and $base % 2 == 1 |
3340
|
152 |
423 |
if (ref $n eq 'Math::BigInt') { } |
3357
|
90 |
104 |
if $x->is_one or $x->bcmp($nminus1) == 0 |
3360
|
0 |
100 |
if $x->is_one |
3361
|
41 |
59 |
if ($x->bcmp($nminus1) == 0) |
3363
|
63 |
41 |
if $ma != 0 |
3375
|
382 |
41 |
if ($n < 4294967296) { } |
3378
|
66 |
330 |
if $x == 1 or $x == $n - 1 |
3381
|
1 |
953 |
if $x == 1 |
3382
|
323 |
630 |
if $x == $n - 1 |
3384
|
6 |
323 |
if $x != $n - 1 |
3389
|
111 |
6 |
if $x == 1 or $x == $n - 1 |
3392
|
2 |
5 |
$x < 4294967296 ? : |
3393
|
0 |
7 |
if $x == 1 |
3394
|
3 |
4 |
if $x == $n - 1 |
3396
|
3 |
3 |
if $x != $n - 1 |
3409
|
0 |
0 |
abs $a == 1 ? : |
|
0 |
665 |
if $b == 0 |
3411
|
0 |
665 |
if ($b % 2 == 0) |
3412
|
0 |
0 |
if $a % 2 == 0 |
3415
|
0 |
0 |
if $v % 2 == 1 and $a % 8 == 3 || $a % 8 == 5 |
3417
|
1 |
664 |
if ($b < 0) |
3419
|
0 |
1 |
if $a < 0 |
3421
|
13 |
3 |
if $b % 4 == 3 |
|
16 |
649 |
if ($a < 0) |
3422
|
2 |
663 |
if ref $b eq 'Math::BigInt' and $b <= {sign => '+', value => [709551615, 446744073, 18]} |
3423
|
0 |
665 |
if ref $a eq 'Math::BigInt' and $a <= {sign => '+', value => [709551615, 446744073, 18]} |
3426
|
402 |
534 |
if ($a % 2 == 0) |
3429
|
215 |
33 |
if $v % 2 == 1 and $b % 8 == 3 || $b % 8 == 5 |
3431
|
68 |
868 |
if $a % 4 == 3 and $b % 4 == 3 |
3434
|
267 |
279 |
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]}) |
3439
|
398 |
0 |
$b == 1 ? : |
3444
|
0 |
0 |
$k == $n ? : |
|
0 |
5235 |
if $k >= $n |
3445
|
2608 |
2627 |
if $k > $n >> 1 |
3447
|
13809 |
75550 |
if ($r >= int 18446744073709551615 / $n) { } |
3451
|
5233 |
8576 |
if $r >= int 18446744073709551615 / $nr |
3468
|
0 |
5235 |
if $Math::Prime::Util::_GMPfunc{'binomial'} |
3471
|
0 |
5234 |
if $k < 0 or $k > $n |
|
5234 |
1 |
if ($n >= 0) { } |
3472
|
0 |
1 |
if $k < 0 and $k > $n |
3473
|
1 |
5234 |
if $k < 0 |
3477
|
5234 |
1 |
if ($n >= 0) { } |
3479
|
1 |
5233 |
if $r > 0 |
3482
|
0 |
1 |
if $r > 0 and not $k & 1 |
3483
|
1 |
0 |
if $r > 0 and $r <= 9223372036854775807 |
3487
|
0 |
5233 |
if $k == 0 |
3488
|
0 |
5233 |
if $k == $n - 1 |
3489
|
5233 |
0 |
if ($n >= 0) { } |
3491
|
0 |
5233 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3494
|
0 |
0 |
if ($k & 1) { } |
3496
|
0 |
0 |
if $r->bacmp('9223372036854775807') <= 0 |
3498
|
0 |
0 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3506
|
2 |
14992 |
if ($b <= $a) { } |
|
13720 |
1272 |
elsif ($b == $a + 1) { } |
|
814 |
458 |
elsif ($b == $a + 2) { } |
3522
|
204 |
564 |
if $n <= 12 |
3523
|
0 |
564 |
if ref $n eq 'Math::GMP' |
3524
|
0 |
564 |
if (ref $n eq 'Math::GMPz') |
3526
|
564 |
0 |
unless ('Math::BigInt'->config->{'lib'} =~ /GMP|Pari/) |
3529
|
0 |
564 |
if (defined $Math::GMPz::VERSION) { } |
|
0 |
564 |
elsif (defined $Math::GMP::VERSION) { } |
|
0 |
564 |
elsif (defined &Math::Prime::Util::GMP::factorial and Math::Prime::Util::prime_get_config()->{'gmp'}) { } |
3536
|
0 |
564 |
if defined $r |
3539
|
96 |
468 |
if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3547
|
0 |
0 |
if $Math::Prime::Util::_GMPfunc{'factorialmod'} |
3549
|
0 |
0 |
if $n >= $m or $m == 1 |
3551
|
0 |
0 |
if ($n > 10) |
3572
|
0 |
212 |
if $n <= 4 |
3574
|
140 |
72 |
if (ref $n eq 'Math::BigInt') { } |
3576
|
26 |
92 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
3579
|
2 |
46 |
if $sq == $n |
3583
|
8 |
64 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
3585
|
0 |
8 |
if $sq * $sq == $n |
3593
|
0 |
0 |
if $n < 0 |
3594
|
0 |
0 |
$n == 1 ? : |
|
0 |
0 |
if $n <= 1 |
3595
|
0 |
0 |
if $a < 0 or $a >= $n |
3598
|
0 |
0 |
if $Math::Prime::Util::_GMPfunc{'is_primitive_root'} |
3600
|
0 |
0 |
if ($Math::Prime::Util::_GMPfunc{'znorder'} and $Math::Prime::Util::_GMPfunc{'totient'}) |
3602
|
0 |
0 |
unless defined $order |
3604
|
0 |
0 |
$order eq $totient ? : |
3607
|
0 |
0 |
if &Math::Prime::Util::gcd($a, $n) != 1 |
3609
|
0 |
0 |
if $s % 2 == 0 and &Math::Prime::Util::powmod($a, $s / 2, $n) == 1 |
3610
|
0 |
0 |
if $s % 3 == 0 and &Math::Prime::Util::powmod($a, $s / 3, $n) == 1 |
3611
|
0 |
0 |
if $s % 5 == 0 and &Math::Prime::Util::powmod($a, $s / 5, $n) == 1 |
3614
|
0 |
0 |
if $fp > 5 and &Math::Prime::Util::powmod($a, $s / $fp, $n) == 1 |
3621
|
0 |
10 |
if $n <= 0 |
3622
|
0 |
10 |
if $n == 1 |
3623
|
0 |
10 |
if $a <= 0 |
3624
|
0 |
10 |
if $a == 1 |
3627
|
0 |
10 |
if $Math::Prime::Util::_GMPfunc{'znorder'} |
3630
|
2 |
8 |
if &Math::Prime::Util::gcd($a, $n) > 1 |
3634
|
6 |
2 |
unless ref $a eq 'Math::BigInt' |
3637
|
7 |
1 |
if ($lambda <= 1.8446744073709552e+19) |
3639
|
7 |
47 |
if &Math::Prime::Util::powmod($a, $k, $n) == 1 |
3645
|
0 |
1 |
unless ref $lambda eq 'Math::BigInt' |
3652
|
0 |
10 |
if $enum++ >= $ei |
3657
|
0 |
1 |
if $k->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3663
|
0 |
2 |
if not defined $limit or $limit > $p |
3666
|
2 |
0 |
if ($limit < 1000000000) |
3668
|
1 |
212 |
if $t == $a |
3675
|
0 |
0 |
if ($t == $a) |
3676
|
0 |
0 |
if $k->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3686
|
0 |
1 |
unless defined $invg |
3690
|
0 |
1 |
$b > 4000000 ? : |
3691
|
1 |
0 |
$maxm > $b ? : |
3701
|
87 |
0 |
if ($m <= $maxm) |
3703
|
0 |
87 |
if (defined $r) |
3704
|
0 |
0 |
if $_verbose |
3710
|
0 |
87 |
if ($am == $a) |
3711
|
0 |
0 |
if $_verbose |
3718
|
1 |
86 |
if (defined $r) |
3719
|
0 |
1 |
if $_verbose |
3723
|
86 |
0 |
if $m <= $maxm |
3731
|
3 |
3 |
ref $_ eq 'Math::BigInt' ? : |
3734
|
0 |
2 |
if $a == 1 or $g == 0 or $p < 2 |
3739
|
1 |
1 |
if ($x == 0) |
3741
|
1 |
0 |
if (defined $n and $n > 1000) |
3742
|
1 |
0 |
unless ref $n eq 'Math::BigInt' |
3744
|
0 |
1 |
if ref $x and $x->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3745
|
1 |
0 |
if $x > 0 and $g->copy->bmodpow($x, $p) == $a |
3746
|
0 |
0 |
if $x == 0 and $_verbose |
3747
|
0 |
0 |
if $x > 0 and $_verbose > 1 |
3751
|
0 |
1 |
if ref $x and $x->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
3752
|
0 |
1 |
$x == 0 ? : |
3757
|
1 |
7 |
if $n < 0 |
3758
|
2 |
6 |
if ($n <= 4) |
3759
|
1 |
1 |
if $n == 0 |
3762
|
1 |
5 |
if $n % 4 == 0 |
3765
|
2 |
3 |
unless (is_prob_prime($n)) |
3768
|
1 |
1 |
if $phi != &Math::Prime::Util::carmichael_lambda($n) |
3778
|
0 |
97 |
if $a >= $n |
3780
|
93 |
44 |
if (&Math::Prime::Util::powmod($a, $f, $n) == 1) |
3785
|
4 |
93 |
unless $fail |
3799
|
7 |
25 |
ref $n eq 'Math::BigInt' ? : |
3801
|
0 |
32 |
if $gcd > 1 and $gcd != $n |
3803
|
11 |
21 |
if $j == -1 |
3805
|
0 |
21 |
if $d > 4000000000 |
3816
|
142 |
56 |
unless defined $increment |
3820
|
271 |
89 |
ref $n eq 'Math::BigInt' ? : |
3822
|
0 |
360 |
if $gcd > 1 and $gcd != $n |
3823
|
198 |
162 |
if kronecker($D, $n) == -1 |
3825
|
0 |
162 |
if $P > 65535 |
3835
|
0 |
156 |
if $n < 2 |
3836
|
0 |
156 |
if $k < 0 |
3837
|
0 |
156 |
if abs $P >= $n |
3838
|
0 |
156 |
if abs $Q >= $n |
3840
|
0 |
156 |
if ($Math::Prime::Util::_GMPfunc{'lucas_sequence'} and $Math::Prime::Util::GMP::VERSION >= 0.3) |
3841
|
0 |
0 |
$_ > '18446744073709551615' ? : |
3845
|
10 |
146 |
unless ref $n eq 'Math::BigInt' |
3848
|
154 |
2 |
unless ref $P eq 'Math::BigInt' |
3849
|
154 |
2 |
unless ref $Q eq 'Math::BigInt' |
3851
|
0 |
156 |
if ($D->is_zero) |
3862
|
0 |
156 |
if $k == 0 |
3863
|
10 |
146 |
unless ref $k eq 'Math::BigInt' |
3867
|
0 |
156 |
if ($n % 2 == 0) { } |
|
142 |
14 |
elsif ($Q->is_one) { } |
3872
|
0 |
0 |
if ($kstr =~ /(0+)$/) |
3875
|
0 |
0 |
if (substr $kstr, $bpos, 1) { } |
3900
|
142 |
0 |
if ($P > {sign => '+', value => [2]} and not $Dinverse->is_nan) { } |
3904
|
5892 |
6021 |
if (substr $kstr, $bpos, 1) { } |
3918
|
0 |
0 |
if (substr $kstr, $bpos, 1) |
3921
|
0 |
0 |
if $U->is_odd |
3924
|
0 |
0 |
if $V->is_odd |
3930
|
3 |
11 |
$Q == -1 ? : |
3933
|
19 |
408 |
if ($qsign == 1) { } |
|
20 |
388 |
elsif ($qsign == -1) { } |
3936
|
197 |
230 |
if (substr $kstr, $bpos, 1) { } |
3939
|
102 |
95 |
if $U->is_odd |
3943
|
69 |
128 |
if $V->is_odd |
3946
|
19 |
178 |
if ($qsign != 0) { } |
3949
|
20 |
210 |
if ($qsign != 0) { } |
3953
|
1 |
13 |
if ($qsign == 1) { } |
|
2 |
11 |
elsif ($qsign == -1) { } |
3963
|
0 |
0 |
if $k < 0 |
3964
|
0 |
0 |
if $k == 0 |
3966
|
0 |
0 |
unless ref $P eq 'Math::BigInt' |
3967
|
0 |
0 |
unless ref $Q eq 'Math::BigInt' |
3979
|
0 |
0 |
unless ref $k eq 'Math::BigInt' |
3982
|
0 |
0 |
if ($kstr =~ /(0+)$/) |
3984
|
0 |
0 |
if ($Q == -1) |
3989
|
0 |
0 |
if (substr $kstr, $bpos, 1) { } |
3992
|
0 |
0 |
if ($ql == 1) { } |
4001
|
0 |
0 |
if ($ql == 1) { } |
4014
|
0 |
0 |
if ($ql == 1) { } |
4024
|
0 |
0 |
if ($ql == 1) { } |
4027
|
0 |
0 |
$_ > '18446744073709551615' ? : |
4032
|
0 |
0 |
if (substr $kstr, $bpos, 1) { } |
4060
|
0 |
0 |
$_ > '18446744073709551615' ? : |
4068
|
0 |
5 |
if $n < 4 |
4069
|
0 |
5 |
if $n % 2 == 0 or _is_perfect_square($n) |
4072
|
0 |
5 |
if $D == 0 |
4073
|
0 |
5 |
if $D != $P * $P - 4 * $Q |
4076
|
5 |
0 |
$U == 0 ? : |
4082
|
0 |
6 |
if $n < 4 |
4083
|
0 |
6 |
if $n % 2 == 0 or _is_perfect_square($n) |
4086
|
0 |
6 |
if $D == 0 |
4087
|
0 |
6 |
if $D != $P * $P - 4 * $Q |
4097
|
2 |
4 |
if $U == 0 |
4098
|
0 |
4 |
unless ref $V eq 'Math::BigInt' |
4099
|
0 |
4 |
unless ref $Qk eq 'Math::BigInt' |
4101
|
3 |
8 |
if $V->is_zero |
4102
|
7 |
1 |
if ($r < $s - 1) |
4113
|
0 |
142 |
if $n < 4 |
4114
|
0 |
142 |
if $n % 2 == 0 or _is_perfect_square($n) |
4117
|
0 |
142 |
if $D == 0 |
4118
|
0 |
142 |
if $D != $P * $P - 4 * $Q |
4122
|
6 |
136 |
unless ref $n eq 'Math::BigInt' |
4132
|
0 |
142 |
unless ref $V eq 'Math::BigInt' |
4133
|
68 |
0 |
if $U == 0 and $V == {sign => '+', value => [2]} || $V == $n - {sign => '+', value => [2]} |
4135
|
58 |
2570 |
if $V->is_zero |
4143
|
46 |
10 |
unless defined $increment |
4145
|
0 |
56 |
if $n < 4 |
4146
|
0 |
56 |
if $n % 2 == 0 or _is_perfect_square($n) |
4149
|
0 |
56 |
if $D == 0 |
4150
|
0 |
56 |
if $D != $P * $P - 4 * $Q |
4152
|
56 |
0 |
unless ref $n eq 'Math::BigInt' |
4163
|
1240 |
1228 |
if (substr $kstr, $bpos, 1) { } |
4172
|
20 |
36 |
if $V == 2 or $V == $n - $TWO |
4174
|
3 |
36 |
if $V->is_zero |
4182
|
0 |
0 |
if $n < 4 |
4183
|
0 |
0 |
unless $n % 2 |
4184
|
0 |
0 |
if _is_perfect_square($n) |
4186
|
0 |
0 |
unless ref $n eq 'Math::BigInt' |
4189
|
0 |
0 |
if ($n % 4 == 3) { } |
|
0 |
0 |
elsif ($n % 8 == 5) { } |
4197
|
0 |
0 |
if $k == 0 or $k == 2 and not $n % 3 |
4199
|
0 |
0 |
$k == 2 ? : |
4202
|
0 |
0 |
if ($d->is_odd) |
4207
|
0 |
0 |
unless ($d->is_zero) |
4212
|
0 |
0 |
$ra == $ea && $rb == $n - 1 ? : |
4217
|
0 |
1 |
if $n < 4 |
4218
|
0 |
1 |
unless $n % 2 |
4221
|
1 |
0 |
if ($n % 4 == 3) { } |
4225
|
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 |
4227
|
0 |
0 |
if $j == -1 |
4228
|
0 |
0 |
if $j == 0 or $a == 20 and _is_perfect_square($n) |
4232
|
0 |
1 |
if $temp1 != 1 and $temp1 != $n |
4234
|
0 |
1 |
unless ref $n eq 'Math::BigInt' |
4246
|
0 |
107 |
if $a != 0 |
4252
|
51 |
56 |
if (substr $np1string, $bit, 1) |
4253
|
51 |
0 |
if ($a == 0) { } |
4261
|
0 |
1 |
$s == 0 && $t == $temp1 ? : |
4267
|
0 |
2 |
if $n <= 1 |
4277
|
645 |
609 |
if (shift @nbin) { } |
4288
|
2 |
0 |
unless defined $restrict |
4289
|
0 |
2 |
if $n < 4 |
4290
|
0 |
2 |
if $restrict > 2 and $n % 2 == 0 |
4292
|
2 |
0 |
unless ref $n eq 'Math::BigInt' |
4295
|
0 |
2 |
unless $S[4] == 0 |
4296
|
2 |
0 |
if $restrict == 0 |
4297
|
0 |
0 |
unless $S[1] == $n - 1 |
4298
|
0 |
0 |
if $restrict == 1 |
4300
|
0 |
0 |
if ($j == -1) { } |
4305
|
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 |
4307
|
0 |
0 |
if $j == 0 and $n != 23 and $restrict > 2 |
4308
|
0 |
0 |
if $S[0] == 1 and $S[2] == 3 and $S[3] == 3 and $S[5] == 2 |
4309
|
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 |
4316
|
0 |
0 |
if $n < 4 |
4318
|
0 |
0 |
$m & 1 ? : |
|
0 |
0 |
binomial($m << 1, $m) % $n == ($m & 1 ? $n - 1 : 1) ? : |
4323
|
1 |
0 |
unless defined $P and defined $Q |
4324
|
0 |
1 |
if $n < 4 |
4326
|
1 |
0 |
unless ref $n eq 'Math::BigInt' |
4327
|
0 |
1 |
if $n->is_even |
4330
|
1 |
0 |
if ($P == 0 and $Q == 0) { } |
4334
|
0 |
1 |
if $P == 3 |
4336
|
0 |
1 |
$D >= 0 ? : |
4337
|
0 |
1 |
if $P >= $n or $Du >= $n |
4339
|
0 |
1 |
if $k == 0 |
4340
|
0 |
1 |
if $P == 10001 and _is_perfect_square($n) |
4344
|
0 |
0 |
$D >= 0 ? : |
4345
|
0 |
0 |
if _is_perfect_square($Du) |
4347
|
0 |
0 |
is_prime($n) ? : |
|
0 |
1 |
if $n <= $Du or $n <= abs $Q or $n <= abs $P |
4348
|
0 |
1 |
if &Math::Prime::Util::gcd(abs $P * $Q * $D, $n) > 1 |
4350
|
0 |
1 |
if ($k == 0) |
4352
|
0 |
0 |
if $k == 0 |
4354
|
0 |
0 |
$Q >= 0 ? : |
|
0 |
0 |
$k == 1 ? : |
4358
|
0 |
1 |
if $U == 0 and $V == $Vcomp |
4374
|
0 |
0 |
if exists $_mersenne_primes{$p} |
4375
|
0 |
0 |
if $p < 34007399 |
4378
|
0 |
0 |
if $p == 2 |
4379
|
0 |
0 |
unless is_prob_prime($p) |
4380
|
0 |
0 |
if $p > 3 and $p % 4 == 3 and $p < 9223372036854775807 and is_prob_prime($p * 2 + 1) |
4385
|
0 |
0 |
if $Math::Prime::Util::_GMPfunc{'lucas_sequence'} |
4398
|
0 |
206 |
unless scalar @poly |
4399
|
0 |
206 |
if ($_poly_bignum) |
4400
|
0 |
0 |
ref $_ eq 'Math::BigInt' ? : |
4424
|
0 |
180410 |
$_poly_bignum ? : |
4430
|
37 |
78516 |
unless $px_at_ix |
4431
|
0 |
78516 |
if ($_poly_bignum) { } |
4454
|
720 |
317 |
if $p & 1 |
4456
|
934 |
103 |
if $p |
4466
|
1 |
102 |
if scalar grep({$_;} @$pp) |
4472
|
3 |
7 |
if $n < 2 or is_power($n) |
4475
|
0 |
7 |
if ($n > 281474976710656) { } |
4476
|
0 |
0 |
unless (defined $Math::BigFloat::VERSION) |
4492
|
0 |
147 |
if $f == $n |
4493
|
1 |
146 |
unless $n % $f |
4497
|
1 |
4 |
unless $n % $r |
4499
|
2 |
2 |
if znorder($n, $r) > $limit |
4503
|
3 |
2 |
if $r >= $n |
4506
|
0 |
2 |
ref $log2n eq 'Math::BigFloat' ? : |
4512
|
2 |
0 |
if ($n < 4294967295) { } |
4516
|
0 |
0 |
unless ref $n eq 'Math::BigInt' |
4520
|
0 |
2 |
if $_verbose |
4521
|
0 |
2 |
if $_verbose > 1 |
4523
|
1 |
102 |
unless _test_anr($a, $n, $r) |
4524
|
0 |
102 |
if $_verbose > 1 |
4526
|
0 |
1 |
if $_verbose > 1 |
4534
|
0 |
0 |
$_[0] == 1 ? : |
|
0 |
39 |
if $_[0] < 4 |
4537
|
17 |
22 |
if (ref $_[0] ne 'Math::BigInt') { } |
4544
|
1 |
21 |
if ref $_[0] and $_[0]->upgrade |
4545
|
1 |
21 |
unless (Math::BigInt::bgcd($_[0], {sign => '+', value => ['30']})->is_one) |
4556
|
0 |
22 |
if $] >= 5.008 and $_[0] <= {sign => '+', value => [709551615, 446744073, 18]} |
4559
|
0 |
39 |
if ($_[0] > 1 and _is_prime7($_[0])) |
4571
|
0 |
251 |
if ($n < 4) |
4572
|
0 |
0 |
$n == 1 ? : |
4578
|
1 |
98 |
if $n > 400000000 and $_primes_small[-1] < 99000 and !defined($limit) || $limit > $_primes_small[-1] |
4584
|
77 |
174 |
if (ref $n eq 'Math::BigInt') |
4587
|
0 |
77 |
if not defined $limit or $limit > $newlim |
4590
|
20 |
20514 |
if $f > $limit |
4591
|
287 |
20227 |
if ($n->copy->bmod($f)->is_zero) |
4596
|
57 |
230 |
if $n < {sign => '+', value => [709551615, 446744073, 18]} |
4598
|
0 |
230 |
if $limit > $newlim |
4601
|
0 |
77 |
if $n->is_one |
4602
|
57 |
20 |
if $n <= {sign => '+', value => [709551615, 446744073, 18]} |
4603
|
0 |
77 |
if $start_idx <= $#_primes_small and $_primes_small[$start_idx] > $limit |
4607
|
20 |
231 |
ref $n eq 'Math::BigInt' ? : |
4608
|
142 |
109 |
if not defined $limit or $limit > $newlim |
4611
|
231 |
20 |
if (ref $n ne 'Math::BigInt') { } |
4614
|
222 |
51029 |
if $p > $limit |
4615
|
308 |
50721 |
if ($n % $p == 0) |
4617
|
9 |
299 |
if $n == 1 |
4619
|
203 |
96 |
if $newlim < $limit |
4622
|
0 |
231 |
if ($_primes_small[-1] < $limit) |
4623
|
0 |
0 |
$_primes_small[-1] % 6 == 1 ? : |
4626
|
0 |
0 |
if ($n % $p == 0) |
4628
|
0 |
0 |
if $n == 1 |
4630
|
0 |
0 |
if $newlim < $limit |
4644
|
0 |
960 |
if ($n->copy->bmod($f)->is_zero and $f->bacmp($limit) <= 0) |
4645
|
0 |
0 |
$f <= {sign => '+', value => [709551615, 446744073, 18]} ? : |
4650
|
0 |
0 |
if $n->is_one |
4652
|
0 |
0 |
if $limit > $newlim |
4658
|
242 |
9 |
if $n > 1 |
4686
|
1 |
238 |
if ($n < 4) |
4687
|
0 |
1 |
$n == 1 ? : |
4690
|
64 |
174 |
if ref $n eq 'Math::BigInt' |
4697
|
167 |
71 |
if $factors[-1] < $lim * $lim |
4704
|
10 |
122 |
if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]} |
4710
|
61 |
65 |
if scalar @ftry >= 2 |
4711
|
0 |
65 |
if Math::Prime::Util::prime_get_config()->{'verbose'} > 1 |
4714
|
61 |
0 |
if (scalar @ftry > 1) { } |
4717
|
16 |
45 |
if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]} |
4727
|
132 |
0 |
if $n != 1 |
4735
|
0 |
96 |
if ($f == 1 or $f == $n) { } |
4739
|
34 |
62 |
ref $n eq 'Math::BigInt' ? : |
4743
|
0 |
96 |
unless $f * $f2 == $n |
4745
|
0 |
96 |
if Math::Prime::Util::prime_get_config()->{'verbose'} > 0 |
4755
|
4 |
1 |
unless defined $rounds |
4756
|
5 |
0 |
unless defined $pa |
4759
|
5 |
0 |
unless ($skipbasic) |
4761
|
0 |
5 |
if $n < 4 |
4768
|
2 |
3 |
if (ref $n eq 'Math::BigInt') { } |
|
2 |
1 |
elsif ($n < 4294967296) { } |
4780
|
0 |
22 |
if ($f->bacmp($n) == 0) { } |
|
2 |
20 |
elsif (not $f->is_one) { } |
4781
|
0 |
0 |
if $inloop++ |
4797
|
39 |
25 |
$U > $V ? : |
4801
|
0 |
2 |
if $f == 1 |
4802
|
1 |
1 |
if ($f == $n) |
4808
|
1 |
1 |
$U > $V ? : |
4810
|
1 |
1 |
if $f != 1 |
4812
|
0 |
1 |
if $f == 1 or $f == $n |
4820
|
5 |
0 |
if ($n <= 9223372036854775807) { } |
4821
|
0 |
5 |
if $U >= $n |
4823
|
0 |
5 |
if $V >= $n |
4833
|
0 |
5 |
if ($f == $n) { } |
|
1 |
4 |
elsif ($f != 1) { } |
4834
|
0 |
0 |
if $inloop++ |
4847
|
4 |
74 |
unless defined $rounds |
4848
|
4 |
74 |
unless defined $pa |
4851
|
17 |
61 |
unless ($skipbasic) |
4853
|
0 |
17 |
if $n < 4 |
4859
|
23 |
55 |
if (ref $n eq 'Math::BigInt') { } |
|
10 |
45 |
elsif ($n < 4294967296) { } |
4873
|
2 |
204 |
$r > $rounds ? : |
4875
|
2144 |
190 |
$rleft > $inner ? : |
4886
|
21 |
2313 |
unless $f->is_one |
4888
|
185 |
21 |
if ($f->is_one) |
4893
|
0 |
21 |
if ($f == $n) |
4899
|
0 |
0 |
if $f == 1 or $f == $n |
4910
|
777 |
876 |
$Xi > $Xm ? : |
4911
|
10 |
1643 |
if $f != 1 and $f != $n |
4912
|
70 |
1573 |
if ($i & $i - 1) == 0 |
4919
|
11781 |
21100 |
$Xi > $Xm ? : |
4920
|
45 |
32836 |
if $f != 1 and $f != $n |
4921
|
442 |
32394 |
if ($i & $i - 1) == 0 |
4933
|
5 |
2 |
unless ($skipbasic) |
4935
|
0 |
5 |
if $n < 4 |
4938
|
1 |
6 |
if (ref $n ne 'Math::BigInt') |
4940
|
1 |
0 |
unless defined $B1 |
4948
|
0 |
1 |
if $pc_end > $B1 |
4952
|
2 |
0 |
if ($q <= $sqrtb1) |
4957
|
0 |
2 |
if ($pa == 0) |
4959
|
1 |
1 |
if $f != 1 |
4961
|
0 |
0 |
if $pc_end >= $B1 |
4972
|
1 |
5 |
unless (defined $B1) |
4978
|
1 |
0 |
if (scalar @nf > 1) |
4986
|
2 |
3 |
unless defined $B2 |
4999
|
3 |
2 |
if $pc_end > $B1 |
5005
|
68 |
4184 |
if ($j++ % 64 == 0) |
5006
|
0 |
68 |
if $pc_beg > 2 and ($j - 1) % 256 |
5009
|
0 |
68 |
if ($pa == 0) |
5011
|
2 |
66 |
if $f == $n |
5012
|
1 |
65 |
unless $f->is_one |
5018
|
4 |
0 |
if not $f->is_one or $pc_end >= $B1 |
5024
|
0 |
4 |
if ($pa == 0) |
5026
|
2 |
2 |
if ($f == $n) |
5034
|
2 |
112 |
if ($f == $n) |
5035
|
0 |
112 |
unless $f->is_one |
5040
|
2 |
0 |
if ($f->is_one and $B2 > $B1) |
5053
|
2 |
0 |
if $pc_end > $B2 |
5059
|
3 |
893 |
unless (defined $precomp_bm[$qdiff]) |
5063
|
0 |
896 |
if ($pa == 0) |
5065
|
7 |
889 |
if ($j++ % 128 == 0) |
5068
|
2 |
5 |
unless $f->is_one |
5071
|
2 |
0 |
if not $f->is_one or $pc_end >= $B2 |
5082
|
3 |
0 |
unless defined $rounds |
5083
|
3 |
0 |
unless defined $startrounds |
5084
|
0 |
3 |
if $startrounds < 1 |
5087
|
0 |
3 |
if $n < 4 |
5089
|
2 |
1 |
if (ref $n eq 'Math::BigInt') { } |
5093
|
0 |
2 |
if ($s * $s == $ni) |
5102
|
0 |
0 |
unless $mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25 |
5104
|
0 |
2 |
unless $f * $f == $m |
5105
|
2 |
0 |
$s > $f ? : |
5111
|
3 |
0 |
if $s * $s != $n * $i |
5112
|
3 |
0 |
$s < 4294967296 ? : |
5115
|
2 |
0 |
unless $mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25 |
5117
|
0 |
1 |
unless $f * $f == $m |
5128
|
2 |
0 |
unless defined $rounds |
5131
|
0 |
2 |
if $n < 4 |
5133
|
1 |
1 |
if (ref $n eq 'Math::BigInt') { } |
5135
|
0 |
1 |
if $pa * $pa == $n |
5141
|
0 |
0 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
5143
|
1 |
0 |
if ($s * $s == $b2) |
5153
|
0 |
1 |
if $pa * $pa == $n |
5159
|
1 |
1 |
if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25) |
5161
|
1 |
0 |
if ($s * $s == $b2) |
5180
|
0 |
7 |
if $n < 4 |
5182
|
0 |
7 |
if ($Math::Prime::Util::_GMPfunc{'ecm_factor'}) |
5183
|
0 |
0 |
unless defined $B1 |
5184
|
0 |
0 |
unless defined $ncurves |
5186
|
0 |
0 |
if (@ef > 1) |
5194
|
1 |
6 |
unless defined $ncurves |
5196
|
1 |
6 |
unless (defined $B1) |
5202
|
1 |
0 |
if (scalar @nf > 1) |
5211
|
0 |
6 |
unless defined $B2 |
5250
|
6 |
27 |
if $q > $sqrt_b1 |
5255
|
6 |
0 |
$B2 > $B1 ? : |
5264
|
24 |
0 |
if $f == 1 |
5265
|
0 |
24 |
if $f == $n |
5266
|
0 |
24 |
if $f != 1 |
5267
|
1 |
23 |
unless ref $cb eq 'Math::BigInt' |
5279
|
86 |
2771 |
if ($i++ % 32 == 0) |
5281
|
1 |
85 |
if $f != 1 |
5285
|
0 |
24 |
if $f == $n |
5287
|
22 |
2 |
if ($f == 1 and $B2 > $B1) |
5288
|
3 |
19 |
if $D % 2 |
5294
|
0 |
22 |
if ($f != 1) |
5295
|
0 |
0 |
if $f == $n |
5305
|
909 |
929 |
if ($i % 2) { } |
5313
|
2 |
1836 |
if $f != 1 |
5317
|
2 |
20 |
if ($f != 1) |
5318
|
0 |
2 |
if $f == $n |
5326
|
862 |
20 |
if ($m != 1) |
5330
|
0 |
862 |
if $f != 1 |
5334
|
0 |
862 |
if $f != 1 |
5336
|
722 |
160 |
if ($m + $D > $B1) |
5337
|
170976 |
166329 |
if $_ >= $m - $D |
5339
|
705 |
4245 |
if $i >= $m |
5343
|
4455 |
4281 |
unless $i > $m |
5344
|
957 |
3324 |
if $i > $m + $m or is_prime($m + $m - $i) |
5349
|
2 |
720 |
if $f != 1 |
5355
|
0 |
22 |
if $f == $n |
5356
|
4 |
18 |
if ($f != 1) |
5372
|
0 |
38 |
unless wantarray |
5373
|
0 |
0 |
$n == 0 ? : |
|
0 |
38 |
if $n <= 1 |
5375
|
0 |
38 |
if ($Math::Prime::Util::_GMPfunc{'divisors'}) |
5378
|
0 |
0 |
$_ <= 18446744073709551615 ? : |
|
0 |
0 |
if ref $n |
5383
|
0 |
38 |
if scalar @factors == 1 |
5386
|
38 |
0 |
if $bigint |
5387
|
38 |
0 |
$bigint ? : |
5396
|
2424 |
296 |
$_ <= 18446744073709551615 ? : |
|
38 |
0 |
if $bigint |
5404
|
1 |
1 |
unless defined $low |
5408
|
2 |
0 |
if $high > $n |
5417
|
0 |
1 |
if $n <= 1 |
5434
|
0 |
0 |
if $n == 0 |
5435
|
0 |
0 |
if $n < 0 or $n % 4 == 1 or $n % 4 == 2 |
5436
|
0 |
0 |
if $n <= 60 |
5440
|
0 |
0 |
if ($b == 0) |
5442
|
0 |
0 |
if (_is_perfect_square($b2)) |
5447
|
0 |
0 |
unless $b2 % $i |
5451
|
0 |
0 |
unless $b2 % $b |
5453
|
0 |
0 |
if (_is_perfect_square($b2)) |
5458
|
0 |
0 |
unless $b2 % $i |
5462
|
0 |
0 |
$square ? : |
|
0 |
0 |
$b2 * 3 == $n ? : |
5469
|
0 |
0 |
if ($e == 1) { } |
5470
|
0 |
0 |
if $p <= 8 |
5478
|
0 |
0 |
if ($e == 2) { } |
|
0 |
0 |
elsif ($e == 3) { } |
5483
|
0 |
0 |
$_ & 1 ? : |
5489
|
0 |
0 |
if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
5497
|
1 |
8 |
if $p == 2 |
5499
|
8 |
0 |
if ($p < 1600) { } |
5522
|
0 |
9 |
if $e <= 0 |
5523
|
7 |
2 |
if $e == 1 |
5526
|
1 |
1 |
if $e == 2 |
5527
|
0 |
1 |
if $e == 3 |
5528
|
0 |
1 |
if $e == 4 |
5535
|
0 |
4 |
if $n <= 0 |
5538
|
4 |
0 |
if ($n < 100000 or not Math::Prime::Util::prime_get_config()->{'xs'}) |
5539
|
0 |
4 |
if ($Math::Prime::Util::_GMPfunc{'ramanujan_tau'}) |
5552
|
0 |
0 |
if $dig > 70 and $Math::Prime::Util::_GMPfunc{'Euler'} |
5558
|
0 |
0 |
if $dig > 70 and $Math::Prime::Util::_GMPfunc{'li'} |
5564
|
0 |
18 |
if $x == 0 |
5565
|
0 |
18 |
if $x == -9**9**9 |
5566
|
0 |
18 |
if $x == 9**9**9 |
5568
|
0 |
18 |
if ($Math::Prime::Util::_GMPfunc{'ei'}) |
5569
|
0 |
0 |
if defined $bignum::VERSION and ref $x ne 'Math::BigFloat' |
5570
|
0 |
0 |
unless ref $x |
5575
|
0 |
18 |
if defined $bignum::VERSION and ref $x ne 'Math::BigFloat' |
5583
|
1 |
17 |
if ($x < -1) { } |
|
5 |
12 |
elsif ($x < 0) { } |
|
9 |
3 |
elsif ($x < -log($tol)) { } |
5593
|
1 |
14 |
if abs $val - $old <= $tol * abs($val) |
5623
|
9 |
392 |
if $term < $tol |
5634
|
3 |
78 |
if $term < $tol |
5635
|
78 |
0 |
if ($term < $last_term) { } |
5649
|
1 |
90 |
if $x == 0 |
5650
|
0 |
90 |
if $x == 1 |
5651
|
0 |
90 |
if $x == 9**9**9 |
5652
|
0 |
90 |
if $x <= 0 |
5653
|
90 |
0 |
unless defined $opt |
5655
|
0 |
90 |
if ($Math::Prime::Util::_GMPfunc{'li'}) |
5656
|
0 |
0 |
if defined $bignum::VERSION and ref $x ne 'Math::BigFloat' |
5657
|
0 |
0 |
unless ref $x |
5662
|
1 |
89 |
if ($x == 2) |
5663
|
0 |
1 |
ref $x eq 'Math::BigFloat' ? : |
5667
|
0 |
89 |
if (defined $bignum::VERSION) { } |
|
79 |
10 |
elsif (ref $x) { } |
5669
|
0 |
0 |
if ref $x ne 'Math::BigFloat' |
5672
|
60 |
19 |
if ($x <= 1e+16) { } |
5675
|
0 |
19 |
if ref $x ne 'Math::BigFloat' |
5679
|
4 |
15 |
if ref $x and ref($_[0]) =~ /^Math::Big/ and $_[0]->accuracy |
5689
|
19 |
70 |
if (ref($x) =~ /^Math::Big/) |
5692
|
4 |
15 |
if $xdigits < $xlen |
5698
|
19 |
70 |
$xdigits ? : |
5731
|
19 |
70 |
if ($x > 1e+16) |
5732
|
19 |
0 |
ref $logx ? : |
5740
|
0 |
947 |
if $term < $tol |
5741
|
928 |
19 |
if ($term < $last_term) { } |
5747
|
928 |
0 |
if $xdigits |
5751
|
19 |
0 |
if ref $invx and $xdigits |
5755
|
70 |
0 |
if ($x >= 1) |
5763
|
70 |
2839 |
if $term < $tol |
5764
|
0 |
2839 |
if $xdigits |
5767
|
70 |
0 |
unless ref($x) =~ /^Math::Big/ |
5770
|
0 |
0 |
if $xdigits |
5824
|
154 |
6 |
$x == int $x ? : |
5827
|
0 |
160 |
if ($Math::Prime::Util::_GMPfunc{'zeta'}) |
5833
|
0 |
0 |
if ($strval =~ s/^(1\.0*)/./) { } |
5834
|
0 |
0 |
if length $1 > 2 |
5839
|
0 |
0 |
$wantbf ? : |
5843
|
4 |
156 |
if (defined $bignum::VERSION or ref($x) =~ /^Math::Big/) |
5849
|
8 |
148 |
if $x == int $x and defined $_Riemann_Zeta_Table[int($x) - 2] |
5875
|
144 |
389 |
if abs $rb / $s < $tol |
5887
|
4 |
25 |
if $t < $tol |
5898
|
0 |
10 |
if $x <= 0 |
5901
|
0 |
10 |
if ($Math::Prime::Util::_GMPfunc{'riemannr'}) |
5904
|
0 |
0 |
$wantbf ? : |
5939
|
0 |
10 |
if (defined $bignum::VERSION or ref($x) =~ /^Math::Big/) |
5947
|
1 |
9 |
if ($x > 1e+17) { } |
5950
|
6 |
13 |
if $mob[$k] == 0 |
5954
|
1 |
12 |
if abs $term < $tol * abs($sum) |
5961
|
277 |
148 |
$k <= $#_Riemann_Zeta_Table ? : |
5967
|
9 |
416 |
if $term < $tol * $sum |
5975
|
0 |
1 |
if $x < -0.36787944118 |
5976
|
0 |
1 |
if ref $x eq 'Math::BigInt' |
5977
|
0 |
1 |
ref $x ? : |
5980
|
0 |
1 |
if ($Math::Prime::Util::_GMPfunc{'lambertw'}) |
5981
|
0 |
0 |
!$xacc ? : |
5988
|
0 |
1 |
if ($x < -0.06) { } |
|
0 |
1 |
elsif ($x < 1.363) { } |
|
0 |
1 |
elsif ($x < 3.7) { } |
5990
|
0 |
0 |
if $ti <= 0 |
6023
|
0 |
1 |
$xacc ? : |
6024
|
0 |
1 |
if $xacc |
6026
|
0 |
200 |
if $w == 0 |
6033
|
0 |
200 |
if abs $wen < $tol |
6035
|
0 |
1 |
if $xacc |
6043
|
0 |
986 |
unless $digits |
6044
|
0 |
986 |
if $digits < 15 |
6045
|
14 |
972 |
if $digits < 30 |
6076
|
0 |
972 |
if ($Math::Prime::Util::_GMPfunc{'Pi'}) |
6077
|
0 |
0 |
if $_verbose |
6084
|
1 |
971 |
if (not $have_xdigits or $have_bigint_gmp and $digits > 100) |
6085
|
0 |
1 |
if $_verbose |
6105
|
971 |
0 |
if ($have_xdigits) |
6106
|
0 |
971 |
if $_verbose |
6133
|
0 |
0 |
if $_verbose |
6150
|
0 |
1 |
if (defined $rhash) |
6151
|
0 |
0 |
unless ref $rhash eq 'HASH' |
6153
|
0 |
0 |
if (defined $rhash->{'amin'}) |
6157
|
0 |
0 |
if (defined $rhash->{'amax'}) |
6161
|
0 |
0 |
if defined $rhash->{'n'} |
6162
|
0 |
0 |
if defined $rhash->{'nmin'} |
6163
|
0 |
0 |
if defined $rhash->{'nmax'} |
6166
|
0 |
0 |
if (defined $rhash->{'prime'}) |
6170
|
0 |
0 |
if $mina < 1 |
6171
|
0 |
0 |
if $maxa > $n |
6172
|
0 |
0 |
if $minn < 1 |
6173
|
0 |
0 |
if $maxn > $n |
6174
|
0 |
0 |
if $primeq != -1 and $primeq != 0 |
6177
|
0 |
1 |
if $n == 0 and $minn <= 1 |
6178
|
0 |
1 |
if $n < $minn or $minn > $maxn or $mina > $maxa or $maxn <= 0 or $maxa <= 0 |
6190
|
5 |
0 |
$ispart ? : |
6203
|
0 |
5 |
if $k + 1 < $minn |
6205
|
0 |
5 |
if ($mina > 1 or $maxa < $n) |
6206
|
0 |
0 |
if $a[0] > $maxa |
6207
|
0 |
0 |
if ($ispart) { } |
6208
|
0 |
0 |
if $a[$k] > $maxa |
6210
|
0 |
0 |
unless $_ < $mina |
|
0 |
0 |
if &Math::Prime::Util::vecany(sub {
$_ > $maxa unless $_ < $mina;
}
, @a[0 .. $k]) |
6213
|
0 |
5 |
if $primeq == 0 and &Math::Prime::Util::vecany(sub {
is_prime($_);
}
, @a[0 .. $k]) |
6214
|
0 |
5 |
if $primeq == 2 and &Math::Prime::Util::vecany(sub {
not is_prime($_);
}
, @a[0 .. $k]) |
6215
|
0 |
5 |
if &Math::Prime::Util::_get_forexit() |
6225
|
1 |
0 |
if (defined $k) { } |
6227
|
0 |
1 |
if $k > $n |
6236
|
0 |
1 |
if ($k == 0) { } |
6242
|
0 |
3 |
if &Math::Prime::Util::_get_forexit() |
6243
|
1 |
2 |
if $c[-1]++ < $n - 1 |
6246
|
1 |
1 |
if $i < 0 |
6251
|
0 |
1 |
if &Math::Prime::Util::_get_forexit() |
6263
|
0 |
6 |
unless ($all_perm) |
6266
|
0 |
0 |
if ($c[$p] == $k - $p - 1) |
6272
|
6 |
0 |
if ($send) |
6274
|
0 |
6 |
if &Math::Prime::Util::_get_forexit() |
6276
|
3 |
3 |
if (++$inc & 1) |
6282
|
1 |
2 |
if $j >= $k |
6293
|
0 |
1 |
if defined $k |
6294
|
0 |
1 |
if $n == 0 |
6295
|
0 |
1 |
if $n == 1 |
6301
|
0 |
0 |
if defined $k |
6302
|
0 |
0 |
if $n == 0 |
6303
|
0 |
0 |
if $n == 1 |
6310
|
1 |
77 |
if $sum == 0 |
6315
|
0 |
77 |
if ($sum == 1) { } |
|
51 |
26 |
elsif ($sum == 2) { } |
6319
|
5 |
46 |
if (@n == 1) { } |
6323
|
45 |
1 |
unless &Math::Prime::Util::_get_forexit() |
6338
|
3 |
70 |
if &Math::Prime::Util::_get_forexit() |
6347
|
0 |
0 |
if $n == 0 |
6348
|
0 |
0 |
if $n == 1 |
6350
|
0 |
0 |
if $k < 0 or int $k / $f >= $n |
6356
|
0 |
0 |
if $n == 0 |
6365
|
0 |
2 |
unless ref $A eq 'ARRAY' |
6368
|
1 |
1 |
if $n == 0 |
6373
|
0 |
26 |
if not defined $v or $v < 0 or $v >= $n or $S{$v}++ |
6381
|
156 |
169 |
if $A->[$j] < $A->[$i] |
6392
|
0 |
0 |
if (defined $k) |
6395
|
0 |
0 |
if not defined $k or $k > $n |
6396
|
0 |
0 |
if $k == 0 |
6399
|
0 |
0 |
if ("$k" / "$n" <= 0.3) { } |
6409
|
0 |
0 |
if $i >= $k |
6435
|
0 |
46 |
if $n <= 0 |
6436
|
0 |
46 |
if $n <= 32 |
6437
|
0 |
46 |
if $n <= 64 |
6446
|
0 |
46 |
if $Math::Prime::Util::_GMPfunc{'urandomm'} |
6447
|
0 |
46 |
if $n <= 1 |
6449
|
0 |
46 |
if ($n <= 4294967295) { } |
|
0 |
46 |
elsif (not ref $n) { } |
6468
|
0 |
2 |
if (scalar @_ == 1) { } |
6473
|
0 |
2 |
if $Math::Prime::Util::_GMPfunc{'random_prime'} |
6483
|
0 |
3 |
if $Math::Prime::Util::_GMPfunc{'random_ndigit_prime'} |
6491
|
0 |
6 |
if $Math::Prime::Util::_GMPfunc{'random_nbit_prime'} |
6499
|
0 |
1 |
if $Math::Prime::Util::_GMPfunc{'random_strong_prime'} |
6509
|
0 |
3 |
if $Math::Prime::Util::_GMPfunc{'random_maurer_prime'} |
6513
|
0 |
3 |
unless Math::Prime::Util::verify_prime($cert) |
6524
|
0 |
1 |
if $Math::Prime::Util::_GMPfunc{'random_shawe_taylor_prime'} |
6528
|
0 |
1 |
unless Math::Prime::Util::verify_prime($cert) |
6537
|
0 |
2 |
if (scalar @_ == 1) { } |
6539
|
0 |
2 |
if $k <= 0 |
6541
|
0 |
2 |
if ($Math::Prime::Util::_GMPfunc{'miller_rabin_random'}) |
6542
|
0 |
0 |
if defined $seed |
6547
|
0 |
2 |
if ($k >= int 3 * $n / 4) |
6549
|
0 |
0 |
unless &Math::Prime::Util::is_strong_pseudoprime($n, $_) |
6554
|
1 |
1 |
unless &Math::Prime::Util::is_strong_pseudoprime($n, &Math::Prime::Util::urandomm($brange) + 2) |
6557
|
0 |
1 |
$k >= 20 ? : |
6558
|
0 |
1 |
unless is_strong_pseudoprime($n, map({urandomm($brange) + 2;} 1 .. $nbases)) |
6566
|
0 |
1 |
if defined $b and int $b < 0 |
6570
|
0 |
1 |
$b <= 64 ? : |
6574
|
0 |
1 |
$b <= 64 ? : |
6578
|
0 |
1 |
if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
6584
|
0 |
1 |
if defined $b and int $b < 0 |
6588
|
0 |
1 |
$b <= 64 ? : |
6591
|
0 |
1 |
if ($b <= 64) { } |
6633
|
95 |
31 |
unless defined $M{$prime} |
6635
|
0 |
31 |
if ($r <= $PR) |
6641
|
1 |
0 |
unless (defined $p) |
6657
|
1 |
0 |
$re < 44.3614195558365 ? : |
6659
|
0 |
1 |
$a < 2 ? : |
6661
|
1 |
0 |
ref $min ? : |
6662
|
1 |
0 |
ref $max ? : |
6666
|
0 |
1 |
if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 |
6672
|
0 |
0 |
if defined $n and int $n < 0 |
6682
|
0 |
0 |
if $r <= $n and 1 + urandomm($n) <= $r |