Branch Coverage

blib/lib/Math/Prime/Util/RandomPrimes.pm
Criterion Covered Total %
branch 121 236 51.2


line true false branch
27 1 3 unless (defined $Math::BigInt::VERSION)
52 0 3 if $_big_gcd_use >= 0
53 0 3 if (prime_get_config()->{'gmp'})
58 0 3 if (defined $biclass and $biclass =~ /^Math::GMP/) { }
3 0 elsif (not 'Math::BigInt'->config->{'lib'} =~ /^Math::BigInt::(GMP|Pari)/) { }
368 0 0 unless defined $dv
378 0 2 if $high < 2 or $low > $high
380 2 0 if ($high - $low > 1000000000) { }
382 0 2 if $low < 2
383 0 2 if $low > 2 and $low % 2 == 0
384 0 2 if $high % 2 == 0
387 0 0 $low <= 2 ? :
388 0 0 $high == 18446744073709551615 ? :
389 0 0 if $low == $high and &is_prob_prime($low)
390 0 0 if $low >= $high
400 0 3 unless $D >= 1
402 0 3 if $D <= 6 and 1
404 2 1 unless defined $_digit_loprime[$D]
405 2 1 unless defined $_digit_hiprime[$D]
406 1 5 if ($_ >= 18446744073709551615 and not ref $_) { }
409 1 2 if ($D >= 20 and prime_get_config()->{'nobigint'})
410 0 1 if $D > 20
420 0 15 unless $mod <= '18446744073709551615' and $mod * $plist[-1] < '18446744073709551615'
432 5 0 if @plist >= $fn and $plist[$fn - 1] <= $fp
439 0 14 unless $bits >= 2
443 0 14 if ($bits <= 19 and 1)
444 0 0 if ($bits <= 4)
445 0 0 if $bits == 2
446 0 0 if $bits == 3
447 0 0 if $bits == 4
472 5 9 if ($bits > 64)
473 3 2 $bits > 79 ? :
474 0 5 if $l == 63 and !!0
475 0 5 if $bits - 2 < $l
483 1 4 if $_big_gcd_use < 0
490 1 20 if $a % 3 == $PM[3] or $a % 5 == $PM[5] or $a % 7 == $PM[7] or $a % 11 == $PM[11] or $a % 13 == $PM[13] or $a % 17 == $PM[17] or $a % 19 == $PM[19] or $a % 23 == $PM[23] or $a % 29 == $PM[29] or $a % 31 == $PM[31] or $a % 37 == $PM[37] or $a % 41 == $PM[41] or $a % 43 == $PM[43] or $a % 47 == $PM[47] or $a % 53 == $PM[53] or $a % 59 == $PM[59] or $a % 61 == $PM[61] or $a % 67 == $PM[67] or $a % 71 == $PM[71] or $a % 73 == $PM[73] or $a % 79 == $PM[79] or $a % 83 == $PM[83] or $a % 89 == $PM[89]
504 0 20 if ($_big_gcd_use and $p > $_big_gcd_top)
505 0 0 unless &gcd($p, $_big_gcd[0]) == 1
506 0 0 unless &gcd($p, $_big_gcd[1]) == 1
507 0 0 unless &gcd($p, $_big_gcd[2]) == 1
508 0 0 unless &gcd($p, $_big_gcd[3]) == 1
511 15 5 unless Math::Prime::Util::PP::is_bpsw_prime($p)
524 0 9 if ($bits > 64) { }
528 0 0 if &is_prob_prime($n)
534 9 103 if &is_prob_prime($n)
577 0 0 unless $k >= 2
580 0 0 if $k <= 64 and Deparse error: Can't locate object method "object_2svref" via package "B::SPECIAL" at /usr/local/lib/perl5/5.42.0/B/Deparse.pm line 5762.
583 0 0 unless verify_prime($cert)
590 0 6 unless $k >= 2
594 0 6 if ref $k eq "Math::BigInt"
600 3 3 if ($k <= $p0)
603 0 3 if $isp != 2
609 0 3 if $verbose > 2
611 1 2 unless (defined $Math::BigFloat::VERSION)
620 3 0 if ($k > 2 * $m)
632 0 3 if $verbose and $verbose != 3
633 3 0 &cmpint($q, '18446744073709551615') <= 0 ? :
637 1 2 if $_big_gcd_use < 0
648 0 58 if $verbose > 2
654 33 25 unless &gcd($n, 111546435) == 1
655 0 25 if ($_big_gcd_use and $n > $_big_gcd_top)
656 0 0 unless &gcd($n, $_big_gcd[0]) == 1
657 0 0 unless &gcd($n, $_big_gcd[1]) == 1
658 0 0 unless &gcd($n, $_big_gcd[2]) == 1
659 0 0 unless &gcd($n, $_big_gcd[3]) == 1
661 0 25 if $verbose > 2
662 22 3 unless &is_strong_pseudoprime($n, 3)
664 0 3 if $verbose > 2
681 0 3 unless (&is_odd($q) and $q > 2 and $m > 0 and &mulint($m, $q) + 1 == $n and &mulint(2, $q) + 1 > &sqrtint($n))
689 0 10 unless &powmod($a, $R, $n) != $nm1
690 7 3 unless &powmod($a, scalar &mulint($R, $q), $n) == $nm1
691 0 3 if $verbose > 2
692 0 3 unless &is_prob_prime($n)
712 0 1 unless $status
713 0 1 unless verify_prime($cert)
722 12 0 unless vec($s, $i, 8) == 0
729 0 3 if $k < 2
732 0 3 unless defined $input_seed and length $input_seed >= 32
735 0 3 unless (defined $Digest::SHA::VERSION)
740 0 0 unless (eval { do { require Digest::SHA; my $version = $Digest::SHA::VERSION; $version =~ s/[^\d.]//g; $version >= 4 } })
745 1 2 if ($k < 33)
761 1 1 if $isp
762 0 1 if $prime_gen_counter > 10000 + 16 * $k
767 0 2 unless $status
768 2 0 &cmpint($c0, '18446744073709551615') <= 0 ? :
781 0 2 if $_big_gcd_use < 0
784 0 6 if ($c > 2 * $k2)
798 0 3 if ($looks_prime and $_big_gcd_use and $c > $_big_gcd_top)
804 1 5 if $looks_prime and not &is_strong_pseudoprime($c, 3)
807 2 4 if ($looks_prime) { }
817 2 0 if (&gcd($z - 1, $c) == 1 and &powmod($z, $c0, $c) == 1)
818 0 2 unless &is_prob_prime($c)
832 0 4 if $prime_gen_counter > 10000 + 16 * $k + $old_counter
839 0 2 unless $bits >= 3
840 0 2 if $bits == 3
841 0 2 if $bits == 4
842 0 2 if $bits == 5
843 0 2 if $bits == 6
844 0 2 if $bits == 7
848 2 0 if $bits > 35
854 0 0 if $qm % 3 != 2 or $qm % 5 == 2 or $qm % 7 == 3 or $qm % 11 == 5
859 0 0 if &is_prob_prime($p)
866 0 2 if $bits <= 35
884 363 185 if ($qmod > 0)
886 0 363 if 1 + &logint($q, 2) != $bits - 1
892 15 110 if $pmod % 5 >> 1 == 0 or $pmod % 7 >> 1 == 0 or $pmod % 11 >> 1 == 0 or $pmod % 13 >> 1 == 0 or $pmod % 17 >> 1 == 0 or $pmod % 19 >> 1 == 0 or $pmod % 23 >> 1 == 0 or $pmod % 37 >> 1 == 0
901 3 86 if $pmod % 29 >> 1 == 0 or $pmod % 31 >> 1 == 0 or $pmod % 41 >> 1 == 0 or $pmod % 43 >> 1 == 0 or $pmod % 47 >> 1 == 0 or $pmod % 53 >> 1 == 0
908 4 78 if $pmod % 59 >> 1 == 0 or $pmod % 61 >> 1 == 0 or $pmod % 67 >> 1 == 0 or $pmod % 71 >> 1 == 0 or $pmod % 73 >> 1 == 0
927 66 12 unless &is_pseudoprime($p, 2)
930 10 2 unless &is_strong_pseudoprime($q, 2)
931 0 2 unless &is_extra_strong_lucas_pseudoprime($q)
932 0 2 unless $p == 2 * $q + 1
943 0 1 unless $t >= 128
962 41 1 unless &is_prob_prime($q)
970 1 11 if &is_prob_prime($p)
979 0 0 unless verify_prime($cert)
987 0 1 if (prime_get_config()->{'gmp'} and $k <= 450)
990 0 0 if $isp != 2