Branch Coverage

blib/lib/Math/Prime/Util/PP.pm
Criterion Covered Total %
branch 1637 3222 50.8


line true false branch
12 26 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 181 unless defined $n
143 33 148 if ref $n
144 0 148 if $n eq '' or $n =~ tr[0-9][\000-/:-\377]c and not $n =~ /^\+\d+$/
146 0 148 if defined $min and $n < $min
147 0 148 if defined $max and $n > $max
148 0 148 if substr($n, 0, 1) eq '+'
149 4 144 unless $n < 18446744073709551615 or int $n eq '18446744073709551615'
155 0 13862 unless defined $n
156 0 13862 if (ref $n eq 'CODE')
160 723 13139 if (ref $n eq 'Math::BigInt') { }
0 13139 elsif (ref $n eq 'Math::GMPz') { }
161 0 723 if $n->sign ne '+' or not $n->is_int
163 11 712 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 13138 if $strn eq '' or $strn =~ tr[0-9][\000-/:-\377]c and not $strn =~ /^\+?\d+$/
171 13004 134 if ($n <= 18446744073709551615) { }
172 0 13004 if ref $n
177 0 13861 if ref $_[0] eq 'Math::BigInt' and $_[0]->upgrade
178 0 13861 if defined $min and $_[0] < $min
179 0 13861 if defined $max and $_[0] > $max
185 0 1215 unless defined $n
186 0 1215 if (ref $n eq 'CODE')
192 1185 30 if (ref $n eq 'Math::BigInt') { }
193 0 1185 unless $n->is_int
194 496 689 if $n <= $poscmp and $n >= $negcmp
197 0 30 if $strn eq '' or $strn =~ tr[\-0-9][\000-,./:-\377]c and not $strn =~ /^[-+]?\d+$/
199 27 3 if ($n <= $poscmp and $n >= $negcmp) { }
200 0 27 if ref $n
205 0 1215 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 8443 if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]}
254 241 8202 if (ref $n eq 'Math::BigInt')
255 44 197 unless Math::BigInt::bgcd($n, {sign => '+', value => [568529303, 51702675, 261944]})->is_one
256 93 104 unless _miller_rabin_2($n)
258 0 90 $n <= '18446744073709551615' ? :
90 14 $is_esl_prime ? :
261 2368 5834 if ($n < 3721)
263 1499 11511 if $i * $i > $n
264 785 10726 unless $n % $i
269 166 3606 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 238 3368 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 175 440 if $i > $limit
295 15 425 unless $n % $i
301 3284 84 if ($n < 47636622961201)
306 3169 115 if ($n < 19471033) { }
4 111 elsif ($n < 38010307) { }
12 99 elsif ($n < 316349281) { }
29 70 elsif ($n < 4759123141) { }
69 1 elsif ($n < 154639673381) { }
1 0 elsif ($n < 47636622961201) { }
0 0 elsif ($n < 3770579582154547) { }
314 384 2900 is_strong_pseudoprime($n, @bases) ? :
318 9 75 unless _miller_rabin_2($n)
319 13 62 is_almost_extra_strong_lucas_pseudoprime($n) ? :
324 0 4180 if defined $n and int $n < 0
327 267 3913 if (ref $n eq 'Math::BigInt') { }
328 69 198 unless Math::BigInt::bgcd($n, {sign => '+', value => ['30']})->is_one
330 59 9 $n == 2 || $n == 3 || $n == 5 ? :
68 3845 if ($n < 7)
331 1480 1814 unless $n % 2 and $n % 3 and $n % 5
345 0 60 if defined $n and int $n < 0
347 53 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 48 if ($end & 1) == 0
394 0 54 if $whole > 1145324612
415 14 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 65 104 if (scalar @_ > 1) { }
523 8 57 if $low < 2
529 6 163 if $low > $high or $high < 2
530 268242 1945 if $_ >= $low
150 13 if $high <= $_primes_small[-1]
534 0 13 if $Math::Prime::Util::_GMPfunc{'sieve_primes'} and $Math::Prime::Util::GMP::VERSION >= 0.34
539 0 12 if ref $low eq 'Math::BigInt' or ref $high eq 'Math::BigInt' or $low > 1000000000000 and $high - $low < int $low / 1000000
543 4 8 if $low <= 2 and $high >= 2
544 4 8 if $low <= 3 and $high >= 3
545 4 8 if $low <= 5 and $high >= 5
546 5 7 if $low < 7
547 5 7 if $low % 2 == 0
548 9 3 if $high % 2 == 0
549 0 12 if $low > $high
552 5 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
686 24 46 if ($lo < 10000000000000) { }
691 0 884 unless (&Math::Prime::Util::is_prime($p + $c))
693 442 0 if $good
700 100 40 unless (&Math::Prime::Util::is_strong_pseudoprime($p + $c, 2))
702 100 6 unless $good
705 0 12 unless (&Math::Prime::Util::is_extra_strong_lucas_pseudoprime($p + $c))
707 6 0 if $good
713 0 12 if $_verbose
720 0 0 if $n <= 0
725 0 0 if is_prime($k)
726 0 0 if $s < $n
727 0 0 if ($k & 3) == 1 and is_prime($k + 1 >> 1)
728 0 0 if $s < $n
735 0 0 unless defined $high
736 0 0 if $low > $high or $high < 2
746 0 0 if $n == 2
747 0 0 if $n < 11
749 0 0 scalar @$L > 0 ? :
754 0 0 if $n <= 0
762 4025 933 if $n <= $#_prime_next_small
766 5 928 if ref $n ne 'Math::BigInt' and $n >= 18446744073709551557
770 0 11 if ($n > 4294967295 and Math::Prime::Util::prime_get_config()->{'gmp'})
774 11 917 if (ref $n eq 'Math::BigInt') { }
790 1 156 if $n <= 11
791 0 2 if ($n > 4294967295 and Math::Prime::Util::prime_get_config()->{'gmp'})
795 2 154 if (ref $n eq 'Math::BigInt') { }
813 4 53 $n >= 400 ? :
818 9683 464380 if $p > $j
819 237074 227306 if (++$k & 2) { }
834 30 37 if ($n < $max)
844 893 67 if ($m <= 18446744073709551615) { }
854 57 46 $n >= $max ? :
0 103 ref $n ? :
860 47 56 if $pn <= {sign => '+', value => [709551615, 446744073, 18]}
866 0 0 $n == 1 ? :
0 25 if $k == 0
867 0 25 if $k == 1
868 0 0 $n == 1 ? :
0 25 if $n <= 1
871 0 25 if $Math::Prime::Util::_GMPfunc{'jordan_totient'}
875 23 2 unless ref $n eq 'Math::BigInt'
883 23 2 if $totient->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
888 3 105 if scalar @_ > 1
890 0 105 if defined $n and $n < 0
893 0 105 if $Math::Prime::Util::_GMPfunc{'totient'}
896 4 101 if $n <= 1
901 1 100 if (ref $n eq 'Math::BigInt') { }
903 1 0 if ($n->is_even)
905 0 1 if $s > 1
909 50 50 if ($n % 2 == 0)
914 100 1 if (ref $n ne 'Math::BigInt') { }
929 0 101 if ref $totient eq 'Math::BigInt' and $totient->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
944 0 3 if $hi < $lo
946 3 0 if ($hi > 1073741824 or $hi - $lo < 100) { }
953 0 0 unless $tot[$i] == $i
959 0 0 if $lo > 0
966 3 11 if scalar @_ > 1
968 0 11 if defined $n and $n < 0
969 10 1 unless _validate_num($n)
970 0 0 $n == 1 ? :
0 11 if $n <= 1
971 1 10 if $n >= 49 and not $n % 4 && $n % 9 && $n % 25 && $n % 49
974 0 44 if $factors[$i] == $factors[$i - 1]
976 4 6 scalar(@factors) % 2 ? :
979 3 1 &Math::Prime::Util::moebius($_[0]) != 0 ? :
984 0 1 if $n < 6
985 0 0 &Math::Prime::Util::is_prob_prime($n >> 1) ? :
0 1 if $n % 2 == 0
986 0 0 &Math::Prime::Util::is_prob_prime($n / 3) ? :
0 1 if $n % 3 == 0
987 0 0 &Math::Prime::Util::is_prob_prime($n / 5) ? :
0 1 if $n % 5 == 0
990 1 0 if @f > 2
991 0 0 _is_prime7($f[1]) ? :
0 0 if @f == 2
993 0 0 if _is_prime7($n)
996 0 0 if @f > 2
997 0 0 _is_prime7($f[1]) ? :
0 0 if @f == 2
1001 0 0 if @f > 2
1002 0 0 _is_prime7($f[1]) ? :
0 0 if @f == 2
1004 0 0 scalar &Math::Prime::Util::factor($n) == 2 ? :
1009 370 0 ref $n ? :
141 229 if ref $n ? $n->is_odd : $n & 1
1011 1 228 if $n == 1 or $n < $maxd and &Math::Prime::Util::is_prime(2 * $n + 1)
1013 218 881 if $d >= $maxd
1014 879 2 $d < 9223372036854775807 ? :
1015 546 335 unless &Math::Prime::Util::is_prime($p)
1018 4 364 if $r == $p or _totpred($r, $d)
1019 331 33 if $r % $p
1028 0 3 if $n == 1
1029 0 3 if $n <= 0
1038 0 6 if $hi < $lo
1039 0 6 if $lo == $hi
1040 2 4 if ($lo < 0)
1041 1 1 if ($hi < 0) { }
1047 0 4 if ($hi > 4294967296)
1055 1 3 if $lo == 0
1059 8 1 $lo % $i ? :
9 5 if $i < $lo
1065 8 3 $lo % $i ? :
11 3 if $i < $lo
1074 37 7 if abs $m != $i
1086 0 1 if $n <= 1
1093 25 39 if $mu[$m] == 0
1101 1066 982 if $this_k == $next_k
1112 0 0 if $k < 1 or $n < 1
1115 0 0 if $m == 0 or $k == $g
1130 2 3 unless &Math::Prime::Util::is_prime_power($n, \$p)
1136 0 3 if $n < 8
1137 0 3 if ($n & $n - 1) == 0
1140 0 3 if $pe[0][0] == 2 and $pe[0][1] > 2
1147 2 1 if $lcm->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
1158 0 1 if $n < 561 or $n % 2 == 0
1159 0 1 unless $n % 9 and $n % 25 and $n % 49 and $n % 121
1164 0 12 if ($fn % $a == 0)
1165 0 0 if ($n - 1) % ($a - 1) != 0
1167 0 0 unless $fn % $a
1170 0 1 if &Math::Prime::Util::powmod(2, $n - 1, $n) != 1
1175 0 1 if (length $fn > 50)
1176 0 0 if &Math::Prime::Util::is_prime($n)
1180 0 0 if ($gcd == 1) { }
1181 0 0 if &Math::Prime::Util::powmod($a, $n - 1, $n) != 1
1183 0 0 if $gcd != $a
1184 0 0 if ($n - 1) % ($a - 1) != 0
1193 0 1 if scalar @pe < 3
1195 0 3 if $pe->[1] > 1 or ($n - 1) % ($pe->[0] - 1) != 0
1204 0 0 if $n < 35
1205 0 0 unless $n % 4 and $n % 9 and $n % 25 and $n % 49 and $n % 121
1209 0 0 if scalar @pe < 2
1212 0 0 if $pe->[1] > 1
1216 0 0 if ($n < 2000) { }
1222 0 0 if &Math::Prime::Util::vecall(sub { $nb % ($_ - $b) == 0; } , @f)
1224 0 0 if (scalar @f > 2)
1227 0 0 if &Math::Prime::Util::vecall(sub { $nb % ($_ + $b) == 0; } , @f)
1232 0 0 if (scalar @f == 2) { }
1236 0 0 if $d >= $spf
1237 0 0 if $j
0 0 if &Math::Prime::Util::vecall(sub { my $j = $_ - $k; $p % $j == 0 if $j; } , @f)
1243 0 0 if $k == 0 or $k >= $spf
1244 0 0 if $j
0 0 if &Math::Prime::Util::vecall(sub { my $j = $_ - $k; $p % $j == 0 if $j; } , @f)
1253 0 0 if defined $p and int $p < 0
1255 0 0 if $p <= 2
1261 0 0 if $nfac == $pm1 and $p % $n != 1
1270 1 1 if $neg
1272 2 0 if ($r)
1274 1 1 if (not $neg) { }
1275 0 0 $r == 4 ? :
0 1 if $r4 == 0
1276 1 0 if $r4 == 1
1278 0 1 $r == 12 ? :
1 0 if $r4 == 0
1279 0 0 if $r4 == 3
1291 0 0 defined $k && $k == 0 ? :
0 920 if $n == 0
1292 84 836 if $n == 1
1294 831 5 if (defined $k and ref $k eq 'CODE')
1298 12 3474 $refn ? :
1303 0 4 unless not defined $k or _validate_num($k) or _validate_positive_integer($k)
1305 1 4 unless defined $k
1308 0 5 if $Math::Prime::Util::_GMPfunc{'sigma'}
1310 3 0 $k <= 5 ? :
2 3 $k == 0 ? :
1321 1 4 !$will_overflow ? :
1322 2 3 if ($k == 0) { }
0 3 elsif (not $will_overflow) { }
0 3 elsif (ref $n and ref $n ne 'Math::BigInt') { }
1341 0 0 if ($e >= 2)
1352 64 15 if ($e == 1) { }
4 11 elsif ($e == 2) { }
1378 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) { }
1396 11 10 if $a <= 6
1397 0 10 unless defined $primes
1398 0 0 $x > 0 ? :
0 10 if $x < $primes->[$a]
1407 1011 1201 if ($sval < $primea) { }
1416 0 1114 if $vals{$v} == 0
1428 3 58 if $high < 7
1429 20 38 unless $high & 1
1435 5437 2990 unless defined $high
1437 5458 2969 if ($low < 3) { }
1439 4232 4195 unless $high & 1
1440 0 8427 if $low > $high
1444 498 7929 if (not defined $sref or $send >= length $$sref)
1454 55 21 if $x < 1000
1455 0 21 if (ref $x eq 'Math::BigInt')
1457 21 0 ref $x ne 'Math::BigInt' ? :
1462 21 0 ref $x ne 'Math::BigInt' ? :
1466 0 84 ref($_) =~ /^Math::Big/ ? :
1470 0 21 $b <= 10 ? :
1490 252 2738 if ($i <= $c)
1504 7 13 unless (defined $high)
1513 6 14 if $low <= 2 and $high >= 2
1514 7 13 if $low < 3
1516 7 13 if $low % 2 == 0
1517 10 10 if $high % 2 == 0
1518 2 18 if $low > $high
1520 1 16 if (ref $low eq 'Math::BigInt' or ref $high eq 'Math::BigInt' or $high - $low < 10 or $high - $low < int $low / 100000000000)
1533 10 6 if ($high > 50000)
1534 5 5 if ($high / ($high - $low + 1) < 100)
1536 2 3 $low == 3 ? :
1541 4 7 if $low == 3
1553 0 20 if $n <= 0
1554 10 10 if $n <= $#_primes_small
1556 0 10 if ($n > 425656284035217743 and ref $n ne 'Math::BigFloat')
1557 0 0 unless (defined $Math::BigFloat::VERSION)
1568 0 10 $n <= 10 ? :
1569 3 7 if ($nth_prime_upper > 100000)
1572 2 1 unless $nth_prime_lower % 2
1579 7 3 $n < 10000 ? :
0 10 $n < 1000 ? :
1584 10 25 if $count + $segcount >= $n
1592 3696 14755 unless substr $$sieveref, $prime - $start >> 1, 1
1603 0 1 if $n <= 0
1604 0 1 if $n <= $#_primes_small
1606 1 0 if $n > 425656284035217743 or $n > 35184372088832
1612 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) { }
1634 0 3 unless _validate_num($n)
1636 0 3 if $n <= 0
1637 0 3 if $n <= $#_primes_small
1639 3 0 if $n > 425656284035217743 or $n > 35184372088832
1658 0 0 unless _validate_num($n)
1660 0 0 if $n <= 5
1661 0 0 if $n > 425656284035217743 or $n > 35184372088832
1669 0 0 if abs $term >= abs $old_term
1672 0 0 if abs $term < 1e-06
1674 0 0 if (ref $t) { }
1676 0 0 if $t->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
1684 0 0 unless _validate_num($n)
1686 0 0 if $n <= 5
1687 0 0 if $n > 425656284035217743 or $n > 35184372088832
1695 0 0 if abs $term >= abs $old_term
1698 0 0 if abs $term < 1e-06
1700 0 0 if (ref $t) { }
1702 0 0 if $t->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
1711 0 1 unless _validate_num($n)
1713 0 1 if $n <= 0
1714 0 1 if $n <= $#_primes_small
1717 0 1 if $n > 1000000000000
1719 0 1 if ref $n eq 'Math::BigInt' or $n >= 425656284035217743
1746 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) { }
1767 4 1 unless _validate_num($x)
1770 4 1 if ref $_[0] eq 'Math::BigInt'
1794 5 0 if ($x < 1e+36 or _MPFR_available() or $Math::Prime::Util::_GMPfunc{'riemannr'}) { }
1795 4 1 if (ref $x eq 'Math::BigFloat')
1817 4 1 if ref $result eq 'Math::BigFloat'
1823 8 3 unless _validate_num($x)
1825 1 10 if $x < $_primes_small[-1]
1827 8 2 if ref $x eq 'Math::BigInt' or ref $_[0] eq 'Math::BigInt'
1833 8 2 ref $x eq 'Math::BigFloat' ? :
1844 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'}) { }
1847 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) { }
1860 0 8 if (_MPFR_available()) { }
1877 0 0 if ($x < 1e+19) { }
1899 0 0 $wantbf ? :
1903 1 7 if ($x < 1e+19) { }
1906 7 0 if (ref $x eq 'Math::BigFloat') { }
1915 0 1 if (_MPFR_available()) { }
1957 0 0 $wantbf ? :
1965 8 2 if ref $result eq 'Math::BigFloat'
1971 8 3 unless _validate_num($x)
1974 1 10 if $x < $_primes_small[-1]
1976 8 2 if ref $x eq 'Math::BigInt' or ref $_[0] eq 'Math::BigInt'
1992 8 2 ref $x eq 'Math::BigFloat' ? :
1994 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'}) { }
1995 0 0 $x < 5000 ? :
0 0 $x < 1621 ? :
1998 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) { }
2025 0 0 $x < 101260000000 ? :
0 0 $x < 10010000000 ? :
0 0 $x < 1100000000 ? :
2029 0 8 if (_MPFR_available()) { }
2051 0 0 $wantbf ? :
2055 8 0 if (ref $x eq 'Math::BigFloat') { }
2063 0 0 if (_MPFR_available()) { }
2105 0 0 $wantbf ? :
2113 8 2 if ref $result eq 'Math::BigFloat'
2119 0 1 if (defined $high) { }
2125 1 0 if $seghigh > $high
2133 0 0 if (defined $high) { }
2139 0 0 if $seghigh > $high
2148 0 2 if $n < 2000
2149 2 0 if ref $n
2157 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) { }
2174 0 2 if defined $fm
2181 0 1 if $n < 0
2182 0 1 if $n <= 6
2197 0 0 if $n < 6
2198 0 0 if ref $n or $n > 1.27e+16
2202 0 0 if $n > 59 and $n <= 1092
2205 0 0 $n > 480 ? :
0 0 $n > 1e+16 ? :
2216 0 0 if $n <= 2
2217 0 0 if $n > 6148914691236517205
2219 0 0 if $n < 10000
2220 0 0 if $nth > 1.0421889307180538e+17
2221 0 0 if ($n < 1000000) { }
0 0 elsif ($n < 10000000000) { }
2224 0 0 if ref $nth and $nth->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2229 0 0 if $n <= 2
2230 0 0 if $n > 9.2233720368547758e+18
2232 0 0 if $nth > 67079069358943824
2233 0 0 if ($n < 10000) { }
0 0 elsif ($n < 10000000000) { }
2235 0 0 if ref $nth and $nth->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2240 0 0 if $n <= 2
2246 0 0 $n < 2 ? :
0 0 if $n < 11
2254 0 0 $n < 2 ? :
0 0 if $n < 11
2262 0 0 $n < 2 ? :
0 0 if $n < 11
2273 0 0 if $n < 5
2278 0 0 $k <= $r ? :
2286 0 0 if $v < $p2
2288 0 0 if $a > $r
2289 0 0 if $b > $r
2298 0 0 if (defined $high) { }
2302 0 0 if $high > 29505444490
2306 0 0 if ($low <= 2 and $high >= 29505444491)
2311 0 0 if $low > $high
2315 0 0 if (not Math::Prime::Util::prime_get_config()->{'xs'} || ref $sum and 1 and $high - $low > 1000000)
2317 0 0 if $high >= 4294967295
2319 0 0 if $low > 2
2324 0 0 $xssum && $high > 50000000000000 ? :
2328 0 0 if $next > $high
2330 0 0 $xssum ? :
2331 0 0 if $next == $high
2338 0 0 if (defined $high) { }
2342 0 0 unless defined $fd
2345 0 0 if ($high >= $low)
2349 0 0 if $p2 > $high
2350 0 0 if ($Math::Prime::Util::_GMPfunc{'sieve_primes'}) { }
2366 3409 64641 if ($x | $y) < 4294967296
2369 0 64641 if $x >= $n
2370 0 64641 if $y >= $n
2371 2811 61830 if $x < $y
2372 64217 424 if ($n <= 9223372036854775807) { }
2374 710171 751499 if $r >= $n
1461670 1541256 if ($y & 1)
2376 1528235 1474691 if $x >= $n
2378 31424 32793 if $r >= $n
64217 0 if ($y & 1)
2381 6152 6600 $x >= $r ? :
12752 13266 if ($y & 1)
2383 12884 13134 $x > $n - $x ? :
2385 190 234 $x >= $r ? :
424 0 if ($y & 1)
2391 0 51903 if $x >= $n
2392 15 51888 if $y >= $n
2393 215 51688 if ($n - $x <= $y)
2394 131 84 if $y > $x
2406 45166 21699 if $power & 1
2408 63263 3602 if $power
2417 0 302 if $n >= $m
2418 12 290 if ($m < 4294967296) { }
2420 74 145 if $power & 1
2422 207 12 if $power
2426 5278 6259 if $power & 1
2428 11247 290 if $power
2438 1 6 if (0 == scalar grep({ref $_;} @_))
2443 1 1 if $x < 0
2448 13 0 $_ < 2147483647 && !ref($_) || ref $_ eq 'Math::BigInt' ? :
2451 6 0 if $gcd->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2455 0 4 unless @_
2457 12 0 $_ < 2147483647 && !ref($_) || ref $_ eq 'Math::BigInt' ? :
2458 0 12 if $v == 0
2459 0 12 if $v < 0
2462 1 3 if $lcm->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2467 0 3 if ($x == 0)
2468 0 3 if ($y == 0)
2470 0 3 if ($Math::Prime::Util::_GMPfunc{'gcdext'})
2479 1 2 if (abs $x < 9223372036854775807 and abs $y < 9223372036854775807) { }
2480 0 1 if ref $x eq 'Math::BigInt'
2481 0 1 if ref $y eq 'Math::BigInt'
2497 1 1 if $a->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2498 1 1 if $b->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2499 2 0 if $g->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2501 0 3 if ($g < 0)
2506 0 7 unless scalar @_
2507 0 7 if scalar @_ == 1
2510 0 7 if ($Math::Prime::Util::_GMPfunc{'chinese'} and $Math::Prime::Util::GMP::VERSION >= 0.42)
2512 0 0 if (defined $sum)
2514 0 0 if ref $sum and $sum->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2520 0 12 if not ref $ai and abs $ai > 9223372036854775807 || 0
2521 2 10 if not ref $ni and abs $ni > 9223372036854775807 || 0
2522 7 7 unless (defined $lcm)
2530 35 131 ref $g ? :
2533 0 7 if $g < 0
2534 0 7 if $g != 1 and $sum % $g != $ai % $g
2535 5 2 if $s < 0
2536 2 5 if $t < 0
2538 4 3 if (not ref $lcm and $lcm * $s > 18446744073709551615)
2539 6 1 if (ref $lcm) { }
2548 0 1 if $u < 0
2549 1 0 if $v < 0
2557 1 6 if ref $sum and $sum->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2563 0 0 unless defined $hi and defined $lo
2569 0 0 @_ ? :
0 528 if @_ <= 1
2572 0 528 if $Math::Prime::Util::_GMPfunc{'vecsum'}
2577 514 1558 if ($sum > 18446744073709551365 or $sum < $neglim)
2587 0 14074 unless @_
2589 0 14074 if $Math::Prime::Util::_GMPfunc{'vecprod'}
2594 5 14069 if $prod->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0 and $prod->bcmp({sign => '-', value => [854775807, 223372036, 9]}) > 0
2599 0 1 unless @_
2601 2 0 if $_ < $min
2605 0 1 unless @_
2607 0 2 if $_ > $max
2614 0 0 if ref $mask eq 'ARRAY'
2621 0 0 if $mask & 1
2631 0 0 if not defined $base and $n =~ s/^0b//
2632 0 0 if not defined $base and $n =~ s/^0x//
2633 0 0 if (not defined $base or $base == 10) { }
2637 0 0 if $base < 2
2641 0 0 if $p > 0
2649 0 4 if $n == 0 or $a == 0
2650 0 4 if $n == 1
2651 1 3 if $n < 0
2652 0 4 if ($n > 18446744073709551615)
2654 0 0 if not defined $invmod or $invmod->is_nan
2655 0 0 if $invmod->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2665 1 3 if $r > 1
2666 1 2 if $t < 0
2672 1 0 if (ref $r) { }
2673 0 1 if $r->copy->bmul($r)->bmod($n)->bcmp($a)
2674 0 1 if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2676 0 0 unless $r * $r % $n == $a
2678 0 1 if $n - $r < $r
2684 0 1 if $n == 0
2685 0 1 if ($n <= 2 or $a <= 1)
2687 0 0 $a * $a % $n == $a ? :
2690 0 1 if ($n < 10000000)
2695 0 0 if $a == 1
2698 0 0 if $r * $r % $n == $a
2703 1 0 unless ref $a eq 'Math::BigInt'
2704 1 0 unless ref $n eq 'Math::BigInt'
2708 1 0 if ($n % 4 == 3)
2712 0 0 if ($n % 8 == 5)
2714 0 0 if ($q->is_one) { }
2723 0 0 if $n->is_odd and not $a->copy->bmodpow($n - 1 >> 1, $n)->is_one
2729 0 0 if $r->copy->bmul($r)->bmod($n) == $a
2737 0 19419 if $n <= 1
2738 432 0 if $n < 18446744073709551615 and $a >= 0 and $a < 18446744073709551615 and $b >= 0 and $b < 18446744073709551615
2740 87 18900 if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2746 0 7368 if $n <= 1
2747 0 0 if $n < 18446744073709551615 and $a > 0 and $a < 18446744073709551615 and $b > 0 and $b < 18446744073709551615
2749 0 7368 if $Math::Prime::Util::_GMPfunc{'mulmod'}
2751 43 7325 if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2756 0 0 if $n <= 1
2758 0 0 if ($ret->is_nan) { }
2761 0 0 if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2767 0 22 if $n <= 1
2768 0 22 if ($Math::Prime::Util::_GMPfunc{'powmod'})
2770 0 0 defined $r ? :
2773 0 22 if ($ret->is_nan) { }
2776 9 13 if $ret->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2784 27618 53278 if ($y < $x) { }
3 53275 elsif ($x < 0) { }
2794 0 1194 if defined $refp and not ref $refp
2796 4 1190 if abs $n <= 3 and not $a
2798 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)
2801 0 0 unless defined $a
2803 0 0 unless $k > 0
2804 0 0 if (defined $refp)
2805 0 0 unless $a
2807 0 0 if $isneg
2809 0 0 if $$refp > 18446744073709551615
2810 0 0 if $isneg
2815 0 1190 if (defined $a and $a != 0) { }
2816 0 0 if $a == 1
2817 0 0 if $n < 0 and $a % 2 == 0
2818 0 0 if ($a == 2) { }
2819 0 0 if (_is_perfect_square($n))
2820 0 0 if defined $refp
2824 0 0 unless ref $n eq 'Math::BigInt'
2826 0 0 if $n->is_neg
2827 0 0 if ($root->copy->bpow($a) == $n)
2828 0 0 if defined $refp
2833 501 689 unless ref $n eq 'Math::BigInt'
2834 256 934 if ($n < 0)
2837 0 256 unless $root
2838 128 128 if ($root % 2 == 0)
2841 6 122 if $root == 1
2843 61 61 if defined $refp
2845 125 125 if defined $refp
2851 263 3505 if $root->is_one
2852 671 2834 if ($root->copy->bpow($e) == $n)
2854 128 543 if not $next and defined $refp
2855 412 259 if $next != 0
2866 0 1 if $n < 0
2874 0 0 if defined $refp and not ref $refp
2875 0 0 if $n <= 1
2877 0 0 if defined $refp
0 0 if (&Math::Prime::Util::is_prime($n))
2880 0 0 if ($k)
2881 0 0 if ref $r and $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
2882 0 0 unless &Math::Prime::Util::is_prime($r)
2883 0 0 if defined $refp
2890 0 2 if defined $refp and not ref $refp
2891 0 2 if $k < 3
2892 0 2 if $n <= 0
2893 0 0 if defined $refp
0 2 if ($n == 1)
2895 0 2 if ($Math::Prime::Util::_GMPfunc{'polygonal_nth'})
2897 0 0 unless $nth
2899 0 0 if defined $refp
2904 0 2 if ($k == 4)
2905 0 0 unless _is_perfect_square($n)
2906 0 0 if defined $refp
2909 0 2 if ($n <= 4294967296 and $k <= 4294967296) { }
2910 0 0 $k == 3 ? :
2911 0 0 unless _is_perfect_square($D)
2915 2 0 if ($k == 3) { }
2920 1 1 unless _is_perfect_square($D)
2924 0 1 if $D % $R != 0
2925 0 1 if defined $refp
2931 0 132 if defined $n and $n < 0
2932 2 130 unless _validate_num($n)
2933 0 132 if $n < 2 or $k < 2
2935 130 2 if ($k == 2)
2936 1 129 if (ref $n eq 'Math::BigInt')
2937 0 1 unless $n->is_even
2961 0 3 if ($base == 10) { }
2 1 elsif ($base == 2) { }
0 1 elsif ($base == 16) { }
2974 0 3 if ($len >= 0 and $len != scalar @d)
2983 0 3 unless defined $base
2984 3 0 unless defined $len
2985 0 3 if $base < 2
2986 0 3 if $n == 0
2987 0 3 if $n < 0
2988 3 0 unless _validate_num($n)
2994 0 0 unless defined $base
2995 0 0 unless defined $len
2997 0 0 if $base == 2 and $len < 0
2998 0 0 if $base == 8 and $len < 0
2999 0 0 if $base == 16 and $len < 0
3000 0 0 $n == 0 ? :
3001 0 0 if $base <= 10
3002 0 0 if $base > 36
3008 0 1 unless defined $base
3009 0 1 if $base == 10 and ref($r) =~ /^Math::/
3011 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) { }
3012 0 0 unless ref $r eq 'ARRAY'
3033 16 0 if ($c ne '0')
3035 0 16 unless $d >= 0
3040 0 1 if $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3052 0 2 unless $k > 0
3055 0 2 if (defined $refp)
3056 0 0 unless ref $refp
3064 0 0 if defined $refp and not ref $refp
3066 0 0 if ($Math::Prime::Util::_GMPfunc{'logint'})
3068 0 0 if (defined $refp)
3070 0 0 if $r == 0
3076 0 0 unless $n > 0
3077 0 0 unless defined $b
3078 0 0 if ($b == 10)
3080 0 0 if defined $refp
3083 0 0 if ($b == 2)
3085 0 0 if defined $refp
3088 0 0 unless $b > 1
3091 0 0 if defined $refp
3099 0 103 if $n == 0
3100 0 103 if $n > 1 and $n % 2
3107 2477 2477 if ($w ^= 1) { }
3119 50 53 if $n % 4 == 0
3126 4 107 if $n == 0
3127 2 105 if $n == 1
3128 2 103 if $n < 0 or $n & 1
3139 0 518 if $m == $n
3140 0 518 if $n == 0 or $m == 0 or $m > $n
3141 1 517 unless defined $type
3142 0 470 unless $type == 1 or $type == 2 or $type == 3
3143 0 518 if ($m == 1)
3144 0 0 if $type == 2
3145 0 0 if $type == 3
3146 0 0 if $n & 1
3150 0 518 if $Math::Prime::Util::_GMPfunc{'stirling'}
3153 5 513 if ($type == 3) { }
465 48 elsif ($type == 2) { }
3162 7355 7586 $m - $j & 1 ? :
3173 402 380 $k & 1 ? :
3182 212 1047 if $b - $a == {sign => '+', value => [1]}
3183 457 590 if $b - $a == {sign => '+', value => [2]}
3192 0 79 if $n <= 0
3193 79 0 unless ref $n eq 'Math::BigInt'
3202 0 21 unless (defined $Math::BigFloat::VERSION)
3203 0 21 if $n <= 0
3205 0 21 if (_MPFR_available(3, 0))
3206 0 0 unless defined $precision
3224 21 0 unless defined $sprec
3225 21 0 unless defined $sprec
3226 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)
3236 0 0 if $term->bacmp($eps) < 0
3255 0 10 if int $n < 0
3257 0 10 unless scalar @bases > 0
3258 0 10 if $n < 4
3261 0 10 if $base < 2
3262 0 10 if $base >= $n
3263 10 0 if ($base > 1 and $base != $n - 1)
3264 0 10 ref $n eq 'Math::BigInt' ? :
3267 0 10 unless $x == 1
3275 0 0 if int $n < 0
3277 0 0 unless scalar @bases > 0
3278 0 0 if $n < 4
3281 0 0 if $base < 2
3282 0 0 if $base >= $n
3283 0 0 if ($base > 1 and $base != $n - 1)
3285 0 0 if $j == 0
3286 0 0 $j > 0 ? :
3287 0 0 ref $n eq 'Math::BigInt' ? :
3290 0 0 unless $x == $j
3298 0 0 if int $n < 0
3300 0 0 if $n < 4
3301 0 0 if $n % 2 == 0
3305 0 0 if ($ap == 1)
3306 0 0 if ($ap == $n - 1)
3313 484 3292 if (ref $n eq 'Math::BigInt') { }
3315 484 0 unless (defined $nm1)
3325 118 366 if $x->is_one or $x->bcmp($nm1) == 0
3328 0 323 if $x->is_one
3329 64 259 if $x->bcmp($nm1) == 0
3334 3292 0 unless (defined $nm1)
3344 3206 86 if ($n < 4294967296) { }
3346 10 3196 if $x == 1 or $x == $nm1
3349 3 3804 if $x == 1
3350 306 3498 if $x == $n - 1
3354 67 19 if $x == 1 or $x == $nm1
3356 0 31 $x < 4294967296 ? :
3357 0 31 if $x == 1
3358 10 21 if $x == $n - 1
3367 0 3614 if int $n < 0
3369 0 3614 unless scalar @bases > 0
3371 4 3610 if $n < 4
3372 0 3610 if $n % 2 == 0
3374 3365 245 if ($bases[0] == 2)
3375 2990 375 unless _miller_rabin_2($n)
3377 50 325 unless @bases
3382 0 771 if $base < 2
3383 5 766 if $base >= $n
3384 0 771 if $base == 0 or $base == $n - 1 and $base % 2 == 1
3389 118 452 if (ref $n eq 'Math::BigInt') { }
3406 90 70 if $x->is_one or $x->bcmp($nminus1) == 0
3409 0 74 if $x->is_one
3410 40 34 if ($x->bcmp($nminus1) == 0)
3412 30 40 if $ma != 0
3424 382 70 if ($n < 4294967296) { }
3427 66 330 if $x == 1 or $x == $n - 1
3430 1 953 if $x == 1
3431 323 630 if $x == $n - 1
3433 6 323 if $x != $n - 1
3438 198 6 if $x == 1 or $x == $n - 1
3441 2 5 $x < 4294967296 ? :
3442 0 7 if $x == 1
3443 3 4 if $x == $n - 1
3445 3 3 if $x != $n - 1
3458 0 0 abs $a == 1 ? :
0 708 if $b == 0
3460 0 708 if ($b % 2 == 0)
3461 0 0 if $a % 2 == 0
3464 0 0 if $v % 2 == 1 and $a % 8 == 3 || $a % 8 == 5
3466 1 707 if ($b < 0)
3468 0 1 if $a < 0
3470 13 3 if $b % 4 == 3
16 692 if ($a < 0)
3471 2 706 if ref $b eq 'Math::BigInt' and $b <= {sign => '+', value => [709551615, 446744073, 18]}
3472 0 708 if ref $a eq 'Math::BigInt' and $a <= {sign => '+', value => [709551615, 446744073, 18]}
3475 450 574 if ($a % 2 == 0)
3478 252 40 if $v % 2 == 1 and $b % 8 == 3 || $b % 8 == 5
3480 75 949 if $a % 4 == 3 and $b % 4 == 3
3483 274 286 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]})
3488 434 0 $b == 1 ? :
3493 0 0 $k == $n ? :
0 5235 if $k >= $n
3494 2608 2627 if $k > $n >> 1
3496 13809 75550 if ($r >= int 18446744073709551615 / $n) { }
3500 5233 8576 if $r >= int 18446744073709551615 / $nr
3517 0 5235 if $Math::Prime::Util::_GMPfunc{'binomial'}
3520 0 5234 if $k < 0 or $k > $n
5234 1 if ($n >= 0) { }
3521 0 1 if $k < 0 and $k > $n
3522 1 5234 if $k < 0
3526 5234 1 if ($n >= 0) { }
3528 1 5233 if $r > 0
3531 0 1 if $r > 0 and not $k & 1
3532 1 0 if $r > 0 and $r <= 9223372036854775807
3536 0 5233 if $k == 0
3537 0 5233 if $k == $n - 1
3538 5233 0 if ($n >= 0) { }
3540 0 5233 if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3543 0 0 if ($k & 1) { }
3545 0 0 if $r->bacmp('9223372036854775807') <= 0
3547 0 0 if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3555 2 14870 if ($b <= $a) { }
13681 1189 elsif ($b == $a + 1) { }
790 399 elsif ($b == $a + 2) { }
3571 204 564 if $n <= 12
3572 0 564 if ref $n eq 'Math::GMP'
3573 0 564 if (ref $n eq 'Math::GMPz')
3575 564 0 unless ('Math::BigInt'->config->{'lib'} =~ /GMP|Pari/)
3578 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'}) { }
3585 0 564 if defined $r
3588 96 468 if $r->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3596 0 0 if $Math::Prime::Util::_GMPfunc{'factorialmod'}
3598 0 0 if $n >= $m or $m == 1
3600 0 0 if ($n > 10)
3622 141 101 if (ref $n eq 'Math::BigInt') { }
3624 22 102 if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25)
3627 2 37 if $sq == $n
3631 8 93 if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25)
3633 0 8 if $sq * $sq == $n
3641 0 0 if $n < 0
3642 0 0 $n == 1 ? :
0 0 if $n <= 1
3643 0 0 if $a < 0 or $a >= $n
3646 0 0 if $Math::Prime::Util::_GMPfunc{'is_primitive_root'}
3648 0 0 if ($Math::Prime::Util::_GMPfunc{'znorder'} and $Math::Prime::Util::_GMPfunc{'totient'})
3650 0 0 unless defined $order
3652 0 0 $order eq $totient ? :
3655 0 0 if &Math::Prime::Util::gcd($a, $n) != 1
3657 0 0 if $s % 2 == 0 and &Math::Prime::Util::powmod($a, $s / 2, $n) == 1
3658 0 0 if $s % 3 == 0 and &Math::Prime::Util::powmod($a, $s / 3, $n) == 1
3659 0 0 if $s % 5 == 0 and &Math::Prime::Util::powmod($a, $s / 5, $n) == 1
3662 0 0 if $fp > 5 and &Math::Prime::Util::powmod($a, $s / $fp, $n) == 1
3669 0 10 if $n <= 0
3670 0 10 if $n == 1
3671 0 10 if $a <= 0
3672 0 10 if $a == 1
3675 0 10 if $Math::Prime::Util::_GMPfunc{'znorder'}
3678 2 8 if &Math::Prime::Util::gcd($a, $n) > 1
3682 6 2 unless ref $a eq 'Math::BigInt'
3685 7 1 if ($lambda <= 1.8446744073709552e+19)
3687 7 47 if &Math::Prime::Util::powmod($a, $k, $n) == 1
3693 0 1 unless ref $lambda eq 'Math::BigInt'
3700 0 10 if $enum++ >= $ei
3705 0 1 if $k->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3711 0 2 if not defined $limit or $limit > $p
3714 2 0 if ($limit < 1000000000)
3716 1 212 if $t == $a
3723 0 0 if ($t == $a)
3724 0 0 if $k->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3734 0 1 unless defined $invg
3738 0 1 $b > 4000000 ? :
3739 1 0 $maxm > $b ? :
3749 87 0 if ($m <= $maxm)
3751 0 87 if (defined $r)
3752 0 0 if $_verbose
3758 0 87 if ($am == $a)
3759 0 0 if $_verbose
3766 1 86 if (defined $r)
3767 0 1 if $_verbose
3771 86 0 if $m <= $maxm
3779 3 3 ref $_ eq 'Math::BigInt' ? :
3782 0 2 if $a == 1 or $g == 0 or $p < 2
3787 1 1 if ($x == 0)
3789 1 0 if (defined $n and $n > 1000)
3790 1 0 unless ref $n eq 'Math::BigInt'
3792 0 1 if ref $x and $x->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3793 1 0 if $x > 0 and $g->copy->bmodpow($x, $p) == $a
3794 0 0 if $x == 0 and $_verbose
3795 0 0 if $x > 0 and $_verbose > 1
3799 0 1 if ref $x and $x->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
3800 0 1 $x == 0 ? :
3805 1 7 if $n < 0
3806 2 6 if ($n <= 4)
3807 1 1 if $n == 0
3810 1 5 if $n % 4 == 0
3813 2 3 unless (is_prob_prime($n))
3816 1 1 if $phi != &Math::Prime::Util::carmichael_lambda($n)
3826 0 97 if $a >= $n
3828 93 44 if (&Math::Prime::Util::powmod($a, $f, $n) == 1)
3833 4 93 unless $fail
3847 7 25 ref $n eq 'Math::BigInt' ? :
3849 0 32 if $gcd > 1 and $gcd != $n
3851 11 21 if $j == -1
3853 0 21 if $d > 4000000000
3864 143 85 unless defined $increment
3868 278 118 ref $n eq 'Math::BigInt' ? :
3870 0 396 if $gcd > 1 and $gcd != $n
3871 228 168 if kronecker($D, $n) == -1
3873 0 168 if $P > 65535
3883 0 157 if $n < 2
3884 0 157 if $k < 0
3885 0 157 if abs $P >= $n
3886 0 157 if abs $Q >= $n
3888 0 157 if ($Math::Prime::Util::_GMPfunc{'lucas_sequence'} and $Math::Prime::Util::GMP::VERSION >= 0.3)
3889 0 0 $_ > '18446744073709551615' ? :
3893 10 147 unless ref $n eq 'Math::BigInt'
3896 155 2 unless ref $P eq 'Math::BigInt'
3897 155 2 unless ref $Q eq 'Math::BigInt'
3899 0 157 if ($D->is_zero)
3910 0 157 if $k == 0
3911 10 147 unless ref $k eq 'Math::BigInt'
3915 0 157 if ($n % 2 == 0) { }
143 14 elsif ($Q->is_one) { }
3920 0 0 if ($kstr =~ /(0+)$/)
3923 0 0 if (substr $kstr, $bpos, 1) { }
3948 143 0 if ($P > {sign => '+', value => [2]} and not $Dinverse->is_nan) { }
3952 5857 6116 if (substr $kstr, $bpos, 1) { }
3966 0 0 if (substr $kstr, $bpos, 1)
3969 0 0 if $U->is_odd
3972 0 0 if $V->is_odd
3978 3 11 $Q == -1 ? :
3981 19 408 if ($qsign == 1) { }
20 388 elsif ($qsign == -1) { }
3984 197 230 if (substr $kstr, $bpos, 1) { }
3987 102 95 if $U->is_odd
3991 69 128 if $V->is_odd
3994 19 178 if ($qsign != 0) { }
3997 20 210 if ($qsign != 0) { }
4001 1 13 if ($qsign == 1) { }
2 11 elsif ($qsign == -1) { }
4011 0 0 if $k < 0
4012 0 0 if $k == 0
4014 0 0 unless ref $P eq 'Math::BigInt'
4015 0 0 unless ref $Q eq 'Math::BigInt'
4027 0 0 unless ref $k eq 'Math::BigInt'
4030 0 0 if ($kstr =~ /(0+)$/)
4032 0 0 if ($Q == -1)
4037 0 0 if (substr $kstr, $bpos, 1) { }
4040 0 0 if ($ql == 1) { }
4049 0 0 if ($ql == 1) { }
4062 0 0 if ($ql == 1) { }
4072 0 0 if ($ql == 1) { }
4075 0 0 $_ > '18446744073709551615' ? :
4080 0 0 if (substr $kstr, $bpos, 1) { }
4108 0 0 $_ > '18446744073709551615' ? :
4116 0 5 if $n < 4
4117 0 5 if $n % 2 == 0 or _is_perfect_square($n)
4120 0 5 if $D == 0
4121 0 5 if $D != $P * $P - 4 * $Q
4124 5 0 $U == 0 ? :
4130 0 6 if $n < 4
4131 0 6 if $n % 2 == 0 or _is_perfect_square($n)
4134 0 6 if $D == 0
4135 0 6 if $D != $P * $P - 4 * $Q
4145 2 4 if $U == 0
4146 0 4 unless ref $V eq 'Math::BigInt'
4147 0 4 unless ref $Qk eq 'Math::BigInt'
4149 3 8 if $V->is_zero
4150 7 1 if ($r < $s - 1)
4161 0 143 if $n < 4
4162 0 143 if $n % 2 == 0 or _is_perfect_square($n)
4165 0 143 if $D == 0
4166 0 143 if $D != $P * $P - 4 * $Q
4170 6 137 unless ref $n eq 'Math::BigInt'
4180 63 0 if $U == 0 and $V == {sign => '+', value => [2]} || $V == $n - {sign => '+', value => [2]}
4181 0 80 unless ref $V eq 'Math::BigInt'
4183 64 2577 if $V->is_zero
4191 75 10 unless defined $increment
4193 0 85 if $n < 4
4194 0 85 if $n % 2 == 0 or _is_perfect_square($n)
4197 0 85 if $D == 0
4198 0 85 if $D != $P * $P - 4 * $Q
4200 85 0 unless ref $n eq 'Math::BigInt'
4211 1936 1953 if (substr $kstr, $bpos, 1) { }
4220 20 65 if $V == 2 or $V == $n - $TWO
4222 3 65 if $V->is_zero
4230 0 0 if $n < 4
4231 0 0 unless $n % 2
4232 0 0 if _is_perfect_square($n)
4234 0 0 unless ref $n eq 'Math::BigInt'
4242 0 0 if $k == 0
4246 0 0 if ($d->is_odd)
4251 0 0 unless ($d->is_zero)
4256 0 0 $ra == 1 && $rb == $n - 1 ? :
4261 0 1 if $n < 4
4262 0 1 unless $n % 2
4265 1 0 if ($n % 4 == 3) { }
4269 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
4271 0 0 if $j == -1
4272 0 0 if $j == 0 or $a == 20 and _is_perfect_square($n)
4276 0 1 if $temp1 != 1 and $temp1 != $n
4278 0 1 unless ref $n eq 'Math::BigInt'
4290 0 107 if $a != 0
4296 51 56 if (substr $np1string, $bit, 1)
4297 51 0 if ($a == 0) { }
4305 0 1 $s == 0 && $t == $temp1 ? :
4311 0 2 if $n <= 1
4321 645 609 if (shift @nbin) { }
4332 2 0 unless defined $restrict
4333 0 2 if $n < 4
4334 0 2 if $restrict > 2 and $n % 2 == 0
4336 2 0 unless ref $n eq 'Math::BigInt'
4339 0 2 unless $S[4] == 0
4340 2 0 if $restrict == 0
4341 0 0 unless $S[1] == $n - 1
4342 0 0 if $restrict == 1
4344 0 0 if ($j == -1) { }
4349 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
4351 0 0 if $j == 0 and $n != 23 and $restrict > 2
4352 0 0 if $S[0] == 1 and $S[2] == 3 and $S[3] == 3 and $S[5] == 2
4353 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
4360 0 0 if $n < 4
4362 0 0 $m & 1 ? :
0 0 binomial($m << 1, $m) % $n == ($m & 1 ? $n - 1 : 1) ? :
4367 1 0 unless defined $P and defined $Q
4368 0 1 if $n < 4
4370 1 0 unless ref $n eq 'Math::BigInt'
4371 0 1 if $n->is_even
4374 1 0 if ($P == 0 and $Q == 0) { }
4378 0 1 if $P == 3
4380 0 1 $D >= 0 ? :
4381 0 1 if $P >= $n or $Du >= $n
4383 0 1 if $k == 0
4384 0 1 if $P == 10001 and _is_perfect_square($n)
4388 0 0 $D >= 0 ? :
4389 0 0 if _is_perfect_square($Du)
4391 0 0 is_prime($n) ? :
0 1 if $n <= $Du or $n <= abs $Q or $n <= abs $P
4392 0 1 if &Math::Prime::Util::gcd(abs $P * $Q * $D, $n) > 1
4394 0 1 if ($k == 0)
4396 0 0 if $k == 0
4398 0 0 $Q >= 0 ? :
0 0 $k == 1 ? :
4402 0 1 if $U == 0 and $V == $Vcomp
4418 0 0 if exists $_mersenne_primes{$p}
4419 0 0 if $p < 34007399
4422 0 0 if $p == 2
4423 0 0 unless is_prob_prime($p)
4424 0 0 if $p > 3 and $p % 4 == 3 and $p < 9223372036854775807 and is_prob_prime($p * 2 + 1)
4429 0 0 if $Math::Prime::Util::_GMPfunc{'lucas_sequence'}
4442 0 206 unless scalar @poly
4443 0 206 if ($_poly_bignum)
4444 0 0 ref $_ eq 'Math::BigInt' ? :
4468 0 180410 $_poly_bignum ? :
4474 37 78516 unless $px_at_ix
4475 0 78516 if ($_poly_bignum) { }
4498 720 317 if $p & 1
4500 934 103 if $p
4510 1 102 if scalar grep({$_;} @$pp)
4516 3 7 if $n < 2 or is_power($n)
4519 0 7 if ($n > 281474976710656) { }
4520 0 0 unless (defined $Math::BigFloat::VERSION)
4536 0 147 if $f == $n
4537 1 146 unless $n % $f
4541 1 4 unless $n % $r
4543 2 2 if znorder($n, $r) > $limit
4547 3 2 if $r >= $n
4550 0 2 ref $log2n eq 'Math::BigFloat' ? :
4556 2 0 if ($n < 4294967295) { }
4560 0 0 unless ref $n eq 'Math::BigInt'
4564 0 2 if $_verbose
4565 0 2 if $_verbose > 1
4567 1 102 unless _test_anr($a, $n, $r)
4568 0 102 if $_verbose > 1
4570 0 1 if $_verbose > 1
4578 0 0 $_[0] == 1 ? :
0 39 if $_[0] < 4
4581 17 22 if (ref $_[0] ne 'Math::BigInt') { }
4588 1 21 if ref $_[0] and $_[0]->upgrade
4589 1 21 unless (Math::BigInt::bgcd($_[0], {sign => '+', value => ['30']})->is_one)
4600 0 22 if $] >= 5.008 and $_[0] <= {sign => '+', value => [709551615, 446744073, 18]}
4603 0 39 if ($_[0] > 1 and _is_prime7($_[0]))
4615 0 280 if ($n < 4)
4616 0 0 $n == 1 ? :
4622 1 127 if $n > 400000000 and $_primes_small[-1] < 99000 and !defined($limit) || $limit > $_primes_small[-1]
4628 106 174 if (ref $n eq 'Math::BigInt')
4631 0 106 if not defined $limit or $limit > $newlim
4634 20 22603 if $f > $limit
4635 355 22248 if ($n->copy->bmod($f)->is_zero)
4640 86 269 if $n < {sign => '+', value => [709551615, 446744073, 18]}
4642 0 269 if $limit > $newlim
4645 0 106 if $n->is_one
4646 86 20 if $n <= {sign => '+', value => [709551615, 446744073, 18]}
4647 0 106 if $start_idx <= $#_primes_small and $_primes_small[$start_idx] > $limit
4651 20 260 ref $n eq 'Math::BigInt' ? :
4652 142 138 if not defined $limit or $limit > $newlim
4655 260 20 if (ref $n ne 'Math::BigInt') { }
4658 251 68341 if $p > $limit
4659 337 68004 if ($n % $p == 0)
4661 9 328 if $n == 1
4663 203 125 if $newlim < $limit
4666 0 260 if ($_primes_small[-1] < $limit)
4667 0 0 $_primes_small[-1] % 6 == 1 ? :
4670 0 0 if ($n % $p == 0)
4672 0 0 if $n == 1
4674 0 0 if $newlim < $limit
4688 0 960 if ($n->copy->bmod($f)->is_zero and $f->bacmp($limit) <= 0)
4689 0 0 $f <= {sign => '+', value => [709551615, 446744073, 18]} ? :
4694 0 0 if $n->is_one
4696 0 0 if $limit > $newlim
4702 271 9 if $n > 1
4730 1 267 if ($n < 4)
4731 0 1 $n == 1 ? :
4734 93 174 if ref $n eq 'Math::BigInt'
4741 167 100 if $factors[-1] < $lim * $lim
4748 10 180 if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]}
4754 90 94 if scalar @ftry >= 2
4755 0 94 if Math::Prime::Util::prime_get_config()->{'verbose'} > 1
4758 90 0 if (scalar @ftry > 1) { }
4761 16 74 if ref $n eq 'Math::BigInt' and $n <= {sign => '+', value => [709551615, 446744073, 18]}
4771 190 0 if $n != 1
4779 0 125 if ($f == 1 or $f == $n) { }
4783 34 91 ref $n eq 'Math::BigInt' ? :
4787 0 125 unless $f * $f2 == $n
4789 0 125 if Math::Prime::Util::prime_get_config()->{'verbose'} > 0
4799 4 1 unless defined $rounds
4800 5 0 unless defined $pa
4803 5 0 unless ($skipbasic)
4805 0 5 if $n < 4
4812 2 3 if (ref $n eq 'Math::BigInt') { }
2 1 elsif ($n < 4294967296) { }
4824 0 22 if ($f->bacmp($n) == 0) { }
2 20 elsif (not $f->is_one) { }
4825 0 0 if $inloop++
4841 39 25 $U > $V ? :
4845 0 2 if $f == 1
4846 1 1 if ($f == $n)
4852 1 1 $U > $V ? :
4854 1 1 if $f != 1
4856 0 1 if $f == 1 or $f == $n
4864 5 0 if ($n <= 9223372036854775807) { }
4865 0 5 if $U >= $n
4867 0 5 if $V >= $n
4877 0 5 if ($f == $n) { }
1 4 elsif ($f != 1) { }
4878 0 0 if $inloop++
4891 4 103 unless defined $rounds
4892 4 103 unless defined $pa
4895 17 90 unless ($skipbasic)
4897 0 17 if $n < 4
4903 23 84 if (ref $n eq 'Math::BigInt') { }
10 74 elsif ($n < 4294967296) { }
4917 2 204 $r > $rounds ? :
4919 2144 190 $rleft > $inner ? :
4930 21 2313 unless $f->is_one
4932 185 21 if ($f->is_one)
4937 0 21 if ($f == $n)
4943 0 0 if $f == 1 or $f == $n
4954 777 876 $Xi > $Xm ? :
4955 10 1643 if $f != 1 and $f != $n
4956 70 1573 if ($i & $i - 1) == 0
4963 17204 34266 $Xi > $Xm ? :
4964 74 51396 if $f != 1 and $f != $n
4965 732 50664 if ($i & $i - 1) == 0
4977 5 2 unless ($skipbasic)
4979 0 5 if $n < 4
4982 1 6 if (ref $n ne 'Math::BigInt')
4984 1 0 unless defined $B1
4992 0 1 if $pc_end > $B1
4996 2 0 if ($q <= $sqrtb1)
5001 0 2 if ($pa == 0)
5003 1 1 if $f != 1
5005 0 0 if $pc_end >= $B1
5016 1 5 unless (defined $B1)
5022 1 0 if (scalar @nf > 1)
5030 2 3 unless defined $B2
5043 3 2 if $pc_end > $B1
5049 68 4184 if ($j++ % 64 == 0)
5050 0 68 if $pc_beg > 2 and ($j - 1) % 256
5053 0 68 if ($pa == 0)
5055 2 66 if $f == $n
5056 1 65 unless $f->is_one
5062 4 0 if not $f->is_one or $pc_end >= $B1
5068 0 4 if ($pa == 0)
5070 2 2 if ($f == $n)
5078 2 112 if ($f == $n)
5079 0 112 unless $f->is_one
5084 2 0 if ($f->is_one and $B2 > $B1)
5097 2 0 if $pc_end > $B2
5103 3 893 unless (defined $precomp_bm[$qdiff])
5107 0 896 if ($pa == 0)
5109 7 889 if ($j++ % 128 == 0)
5112 2 5 unless $f->is_one
5115 2 0 if not $f->is_one or $pc_end >= $B2
5126 3 0 unless defined $rounds
5127 3 0 unless defined $startrounds
5128 0 3 if $startrounds < 1
5131 0 3 if $n < 4
5133 2 1 if (ref $n eq 'Math::BigInt') { }
5137 0 2 if ($s * $s == $ni)
5146 0 0 unless $mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25
5148 0 2 unless $f * $f == $m
5149 2 0 $s > $f ? :
5155 3 0 if $s * $s != $n * $i
5156 3 0 $s < 4294967296 ? :
5159 2 0 unless $mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25
5161 0 1 unless $f * $f == $m
5172 2 0 unless defined $rounds
5175 0 2 if $n < 4
5177 1 1 if (ref $n eq 'Math::BigInt') { }
5179 0 1 if $pa * $pa == $n
5185 0 0 if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25)
5187 1 0 if ($s * $s == $b2)
5197 0 1 if $pa * $pa == $n
5203 1 1 if ($mc == 0 or $mc == 1 or $mc == 4 or $mc == 9 or $mc == 16 or $mc == 17 or $mc == 25)
5205 1 0 if ($s * $s == $b2)
5224 0 7 if $n < 4
5226 0 7 if ($Math::Prime::Util::_GMPfunc{'ecm_factor'})
5227 0 0 unless defined $B1
5228 0 0 unless defined $ncurves
5230 0 0 if (@ef > 1)
5238 1 6 unless defined $ncurves
5240 1 6 unless (defined $B1)
5246 1 0 if (scalar @nf > 1)
5255 0 6 unless defined $B2
5294 6 27 if $q > $sqrt_b1
5299 6 0 $B2 > $B1 ? :
5308 12 0 if $f == 1
5309 0 12 if $f == $n
5310 0 12 if $f != 1
5311 1 11 unless ref $cb eq 'Math::BigInt'
5323 41 1320 if ($i++ % 32 == 0)
5325 1 40 if $f != 1
5329 0 12 if $f == $n
5331 10 2 if ($f == 1 and $B2 > $B1)
5332 2 8 if $D % 2
5338 0 10 if ($f != 1)
5339 0 0 if $f == $n
5349 405 414 if ($i % 2) { }
5357 1 818 if $f != 1
5361 1 9 if ($f != 1)
5362 0 1 if $f == $n
5370 337 9 if ($m != 1)
5374 0 337 if $f != 1
5378 0 337 if $f != 1
5380 276 70 if ($m + $D > $B1)
5381 70578 64399 if $_ >= $m - $D
5383 270 1675 if $i >= $m
5387 1754 1696 unless $i > $m
5388 377 1319 if $i > $m + $m or is_prime($m + $m - $i)
5393 3 273 if $f != 1
5399 0 11 if $f == $n
5400 5 6 if ($f != 1)
5416 0 67 unless wantarray
5417 0 0 $n == 0 ? :
0 67 if $n <= 1
5419 0 67 if ($Math::Prime::Util::_GMPfunc{'divisors'})
5422 0 0 $_ <= 18446744073709551615 ? :
0 0 if ref $n
5427 0 67 if scalar @factors == 1
5430 67 0 if $bigint
5431 67 0 $bigint ? :
5440 4253 515 $_ <= 18446744073709551615 ? :
67 0 if $bigint
5448 1 1 unless defined $low
5452 2 0 if $high > $n
5461 0 1 if $n <= 1
5478 0 0 if $n == 0
5479 0 0 if $n < 0 or $n % 4 == 1 or $n % 4 == 2
5480 0 0 if $n <= 60
5484 0 0 if ($b == 0)
5486 0 0 if (_is_perfect_square($b2))
5491 0 0 unless $b2 % $i
5495 0 0 unless $b2 % $b
5497 0 0 if (_is_perfect_square($b2))
5502 0 0 unless $b2 % $i
5506 0 0 $square ? :
0 0 $b2 * 3 == $n ? :
5513 0 0 if ($e == 1) { }
5514 0 0 if $p <= 8
5522 0 0 if ($e == 2) { }
0 0 elsif ($e == 3) { }
5527 0 0 $_ & 1 ? :
5533 0 0 if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
5541 1 8 if $p == 2
5543 8 0 if ($p < 1600) { }
5566 0 9 if $e <= 0
5567 7 2 if $e == 1
5570 1 1 if $e == 2
5571 0 1 if $e == 3
5572 0 1 if $e == 4
5579 0 4 if $n <= 0
5582 4 0 if ($n < 100000 or not Math::Prime::Util::prime_get_config()->{'xs'})
5583 0 4 if ($Math::Prime::Util::_GMPfunc{'ramanujan_tau'})
5596 0 18 if $x == 0
5597 0 18 if $x == -9**9**9
5598 0 18 if $x == 9**9**9
5601 0 18 if ($x > 0 and _MPFR_available())
5612 0 0 $wantbf ? :
5615 0 18 if defined $bignum::VERSION and ref $x ne 'Math::BigFloat'
5623 1 17 if ($x < -1) { }
5 12 elsif ($x < 0) { }
9 3 elsif ($x < -log($tol)) { }
5633 1 14 if abs $val - $old <= $tol * abs($val)
5663 9 392 if $term < $tol
5674 3 78 if $term < $tol
5675 78 0 if ($term < $last_term) { }
5689 1 26 if $x == 0
5690 0 26 if $x == 1
5691 0 26 if $x == 9**9**9
5692 0 26 if $x <= 0
5693 26 0 unless defined $opt
5696 0 26 if ($x >= 1 and _MPFR_available())
5699 0 0 if ($opt) { }
0 0 elsif (defined $bignum::VERSION or ref($x) =~ /^Math::Big/) { }
5717 0 0 $wantbf ? :
5720 1 25 if ($x == 2)
5721 0 1 ref $x eq 'Math::BigFloat' ? :
5725 0 15 if ref $x and not defined $bignum::VERSION and $x <= 1e+16
5726 0 25 if defined $bignum::VERSION and ref $x ne 'Math::BigFloat'
5727 0 15 if ref $x and ref $x ne 'Math::BigFloat' and $x > 1e+16
5737 15 10 if (ref($x) =~ /^Math::Big/)
5740 0 15 if $xdigits < $xlen
5746 15 10 $xdigits ? :
5748 15 10 if ($x > 1e+16)
5749 15 0 ref $logx ? :
5757 0 746 if $term < $tol
5758 731 15 if ($term < $last_term) { }
5764 731 0 if $xdigits
5767 15 0 if $xdigits
5771 10 0 if ($x >= 1)
5779 10 567 if $term < $tol
5780 0 567 if $xdigits
5782 0 10 ref $x eq 'Math::BigFloat' ? :
5784 0 10 if $xdigits
5838 154 6 $x == int $x ? :
5841 0 160 if (_MPFR_available())
5851 0 0 if ($ix) { }
5861 0 0 $wantbf ? :
5865 0 160 if ($Math::Prime::Util::_GMPfunc{'zeta'})
5871 0 0 if ($strval =~ s/^(1\.0*)/./) { }
5872 0 0 if length $1 > 2
5877 0 0 $wantbf ? :
5881 4 156 if (defined $bignum::VERSION or ref($x) =~ /^Math::Big/)
5887 8 148 if $x == int $x and defined $_Riemann_Zeta_Table[int($x) - 2]
5913 144 389 if abs $rb / $s < $tol
5925 4 25 if $t < $tol
5936 0 14 if $x <= 0
5939 0 14 if (_MPFR_available())
5976 0 0 if Math::MPFR::Rmpfr_less_p($rterm, $rstop)
5980 0 0 $wantbf ? :
5983 0 14 if ($Math::Prime::Util::_GMPfunc{'riemannr'})
5986 0 0 $wantbf ? :
6020 4 10 if (defined $bignum::VERSION or ref($x) =~ /^Math::Big/)
6028 1 9 if ($x > 1e+17) { }
6031 6 13 if $mob[$k] == 0
6035 1 12 if abs $term < $tol * abs($sum)
6042 277 148 $k <= $#_Riemann_Zeta_Table ? :
6048 9 416 if $term < $tol * $sum
6056 0 1 if $x < -0.36787944118
6057 0 1 if ref $x eq 'Math::BigInt'
6058 0 1 ref $x ? :
6061 0 1 if ($Math::Prime::Util::_GMPfunc{'lambertw'})
6062 0 0 !$xacc ? :
6069 0 1 if ($x < -0.06) { }
0 1 elsif ($x < 1.363) { }
0 1 elsif ($x < 3.7) { }
6071 0 0 if $ti <= 0
6104 0 1 $xacc ? :
6105 0 1 if $xacc
6107 0 200 if $w == 0
6114 0 200 if abs $wen < $tol
6116 0 1 if $xacc
6124 0 986 unless $digits
6125 0 986 if $digits < 15
6126 14 972 if $digits < 30
6158 0 972 if ($Math::Prime::Util::_GMPfunc{'Pi'})
6159 0 0 if $_verbose
6164 0 972 if (!$have_xdigits || $digits > 60 and _MPFR_available())
6165 0 0 if $_verbose
6178 1 971 if (not $have_xdigits or $have_bigint_gmp and $digits > 100)
6179 0 1 if $_verbose
6199 971 0 if ($have_xdigits)
6200 0 971 if $_verbose
6227 0 0 if $_verbose
6244 0 1 if (defined $rhash)
6245 0 0 unless ref $rhash eq 'HASH'
6247 0 0 if (defined $rhash->{'amin'})
6251 0 0 if (defined $rhash->{'amax'})
6255 0 0 if defined $rhash->{'n'}
6256 0 0 if defined $rhash->{'nmin'}
6257 0 0 if defined $rhash->{'nmax'}
6260 0 0 if (defined $rhash->{'prime'})
6264 0 0 if $mina < 1
6265 0 0 if $maxa > $n
6266 0 0 if $minn < 1
6267 0 0 if $maxn > $n
6268 0 0 if $primeq != -1 and $primeq != 0
6271 0 1 if $n == 0 and $minn <= 1
6272 0 1 if $n < $minn or $minn > $maxn or $mina > $maxa or $maxn <= 0 or $maxa <= 0
6284 5 0 $ispart ? :
6297 0 5 if $k + 1 < $minn
6299 0 5 if ($mina > 1 or $maxa < $n)
6300 0 0 if $a[0] > $maxa
6301 0 0 if ($ispart) { }
6302 0 0 if $a[$k] > $maxa
6304 0 0 unless $_ < $mina
0 0 if &Math::Prime::Util::vecany(sub { $_ > $maxa unless $_ < $mina; } , @a[0 .. $k])
6307 0 5 if $primeq == 0 and &Math::Prime::Util::vecany(sub { is_prime($_); } , @a[0 .. $k])
6308 0 5 if $primeq == 2 and &Math::Prime::Util::vecany(sub { not is_prime($_); } , @a[0 .. $k])
6309 0 5 if &Math::Prime::Util::_get_forexit()
6319 1 0 if (defined $k) { }
6321 0 1 if $k > $n
6330 0 1 if ($k == 0) { }
6336 0 3 if &Math::Prime::Util::_get_forexit()
6337 1 2 if $c[-1]++ < $n - 1
6340 1 1 if $i < 0
6345 0 1 if &Math::Prime::Util::_get_forexit()
6357 0 6 unless ($all_perm)
6360 0 0 if ($c[$p] == $k - $p - 1)
6366 6 0 if ($send)
6368 0 6 if &Math::Prime::Util::_get_forexit()
6370 3 3 if (++$inc & 1)
6376 1 2 if $j >= $k
6387 0 1 if defined $k
6388 0 1 if $n == 0
6389 0 1 if $n == 1
6395 0 0 if defined $k
6396 0 0 if $n == 0
6397 0 0 if $n == 1
6404 1 77 if $sum == 0
6409 0 77 if ($sum == 1) { }
51 26 elsif ($sum == 2) { }
6413 5 46 if (@n == 1) { }
6417 45 1 unless &Math::Prime::Util::_get_forexit()
6432 3 70 if &Math::Prime::Util::_get_forexit()
6441 0 0 if $n == 0
6442 0 0 if $n == 1
6444 0 0 if $k < 0 or int $k / $f >= $n
6450 0 0 if $n == 0
6459 0 2 unless ref $A eq 'ARRAY'
6462 1 1 if $n == 0
6467 0 26 if not defined $v or $v < 0 or $v >= $n or $S{$v}++
6475 156 169 if $A->[$j] < $A->[$i]
6486 0 0 if (defined $k)
6489 0 0 if not defined $k or $k > $n
6490 0 0 if $k == 0
6493 0 0 if ("$k" / "$n" <= 0.3) { }
6503 0 0 if $i >= $k
6529 0 35 if $n <= 0
6530 0 35 if $n <= 32
6531 0 35 if $n <= 64
6540 0 34 if $Math::Prime::Util::_GMPfunc{'urandomm'}
6541 0 34 if $n <= 1
6543 0 34 if ($n <= 4294967295) { }
0 34 elsif (not ref $n) { }
6562 0 2 if (scalar @_ == 1) { }
6567 0 2 if $Math::Prime::Util::_GMPfunc{'random_prime'}
6577 0 3 if $Math::Prime::Util::_GMPfunc{'random_ndigit_prime'}
6585 0 6 if $Math::Prime::Util::_GMPfunc{'random_nbit_prime'}
6593 0 1 if $Math::Prime::Util::_GMPfunc{'random_strong_prime'}
6603 0 3 if $Math::Prime::Util::_GMPfunc{'random_maurer_prime'}
6607 0 3 unless Math::Prime::Util::verify_prime($cert)
6618 0 1 if $Math::Prime::Util::_GMPfunc{'random_shawe_taylor_prime'}
6622 0 1 unless Math::Prime::Util::verify_prime($cert)
6631 0 2 if (scalar @_ == 1) { }
6633 0 2 if $k <= 0
6635 0 2 if ($Math::Prime::Util::_GMPfunc{'miller_rabin_random'})
6636 0 0 if defined $seed
6641 0 2 if ($k >= int 3 * $n / 4)
6643 0 0 unless &Math::Prime::Util::is_strong_pseudoprime($n, $_)
6648 1 1 unless &Math::Prime::Util::is_strong_pseudoprime($n, &Math::Prime::Util::urandomm($brange) + 2)
6651 0 1 $k >= 20 ? :
6652 0 1 unless is_strong_pseudoprime($n, map({urandomm($brange) + 2;} 1 .. $nbases))
6660 0 1 if defined $b and int $b < 0
6664 0 1 $b <= 64 ? :
6668 0 1 $b <= 64 ? :
6672 0 1 if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0
6678 0 1 if defined $b and int $b < 0
6682 0 1 $b <= 64 ? :
6685 0 1 if ($b <= 64) { }
6727 5 5 unless defined $M{$prime}
6729 1 4 if ($r <= $PR)
6735 0 1 unless (defined $p)
6751 0 0 $re < 44.3614195558365 ? :
6753 0 0 $a < 2 ? :
6755 1 0 ref $min ? :
6756 1 0 ref $max ? :
6760 0 1 if ref $n and $n->bacmp({sign => '+', value => [709551615, 446744073, 18]}) <= 0