Condition Coverage

blib/lib/Math/Prime/Util.pm
Criterion Covered Total %
condition 69 159 43.4


and 3 conditions

line !l l&&!r l&&r condition
96 0 148 0 $_Config{'xs'} and $_Config{'secure'}
118 69 0 0 defined $ENV{'MPU_NO_XS'} and $ENV{'MPU_NO_XS'} == 1
127 0 0 0 defined $ENV{'MPU_NO_XS'} and $ENV{'MPU_NO_XS'} == 1
157 69 0 0 $_Config{'gmp'} >= 42 and not Math::Prime::Util::GMP::is_csprng_well_seeded()
69 0 0 $_Config{'gmp'} >= 42 and not Math::Prime::Util::GMP::is_csprng_well_seeded() and &_is_csprng_well_seeded()
217 0 0 0 not $value and $_Config{'secure'}
298 13 0 0 $strn =~ tr[0-9][\000-/:-\377]c and not $strn =~ /^\+?\d+$/
307 7 125 0 ref $_[0] eq 'Math::BigInt' and $_[0]->upgrade
308 132 0 0 defined $min and $_[0] < $min
309 132 0 0 defined $max and $_[0] > $max
348 1107 0 1 $high > 100000000000000 and $high - $low < 50000
386 3 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::sieve_twin_primes
3 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::sieve_twin_primes and $low > 2147483648
471 30 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::primorial
483 25 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::pn_primorial
496 103 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::consecutive_integer_lcm
512 0 57 1 defined $n and $n <= 0
515 57 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::partitions
552 0 1 0 ref $end ne 'Math::BigInt' and $end == 18446744073709551615
558 4 1 8 $beg < $p and $beg <= $end
577 0 1 0 ref $end ne 'Math::BigInt' and $end == 18446744073709551615
583 4 1 2 $beg < $p and $beg <= $end
638 1 0 22 ref $p ne 'Math::BigInt' and $p <= $_XS_MAXVAL
648 22 0 0 $p + $segment > 18446744073709551615 and $p + 1 < 18446744073709551615
686 1 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::prime_count
1 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::prime_count and ref $high eq 'Math::BigInt' || $high - $low < int $low / 1000000
748 0 95 0 defined $n and $n < 2
758 11 0 0 $_HAVE_GMP and defined &Math::Prime::Util::GMP::is_provable_prime_with_cert
813 0 0 6 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat'
0 0 6 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat' and $_Config{'xs'}
824 0 0 9 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat'
0 0 9 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat' and $_Config{'xs'}
837 0 0 20 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat'
0 2 18 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat' and $_Config{'xs'}
851 0 0 23 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat'
0 0 23 not defined $bignum::VERSION and ref $n ne 'Math::BigFloat' and $_Config{'xs'}
864 0 0 9 not defined $bignum::VERSION and ref $x ne 'Math::BigFloat'
0 0 9 not defined $bignum::VERSION and ref $x ne 'Math::BigFloat' and $_Config{'xs'}
874 0 116 0 defined $n and $n < 0
876 4 101 11 $n > 1 and $n & 1
923 21 0 0 defined $precision and $precision <= 13

or 3 conditions

line l !l&&r !l&&!r condition
147 69 0 0 not defined $ENV{'MPU_NO_GMP'} or $ENV{'MPU_NO_GMP'} != 1
205 8 0 9 $param =~ /^(assume[_ ]?)?[ge]?rh$/ or $param =~ /riemann\s*h/
250 0 7338 113 !defined($_[0]) || ref $_[0] eq 'Math::BigInt'
290 0 0 119 $n->sign ne '+' or not $n->is_int
298 0 0 13 $strn eq '' or $strn =~ tr[0-9][\000-/:-\377]c and not $strn =~ /^\+?\d+$/
325 8 2 1126 $low > $high or $high < 2
348 17 1 1107 $low + 1 >= $high or $high > 100000000000000 and $high - $low < 50000
1098 2 7 $high <= 1966080 or $high <= &_get_prime_cache_size()
382 0 0 20 $low > $high or $high < 2
407 0 0 15 $low > $high or $high < 2
683 0 0 1 $high < 2 or $low > $high
686 0 0 0 ref $high eq 'Math::BigInt' || $high - $low < int $low / 1000000