Branch Coverage

blib/lib/Math/Symbolic/Custom/Factor.pm
Criterion Covered Total %
branch 136 178 76.4


line true false branch
92 0 68 if (not defined $t2) { }
0 68 elsif (not defined $n_hr) { }
1 67 elsif (scalar keys %{$$n_hr{'terms'};} == 1) { }
2 65 elsif (scalar keys %{$$n_hr{'terms'};} == 2 and $n_hr->{'terms'}{'constant_accumulator'} == 0) { }
65 0 elsif (not defined $d_hr) { }
122 66 0 wantarray ? :
129 2 68 if ($t->term_type == 0 and $t->type == 2) { }
151 6 124 if ($index > 1) { }
182 65 0 if (scalar @con == scalar @con_int)
188 64 63 if ($num % $div != 0)
193 13 64 if ($div_ok)
199 13 52 if (defined $GCF)
206 19 46 if ($n_terms{'constant_accumulator'} == 0)
213 5 56 if (exists $c_vars{$v}) { }
215 4 1 if ($p < $c_vars{$v}{'p'})
228 5 51 if ($c->{'c'} == scalar(keys %n_terms) - 1)
242 5 10 if $t eq "constant_accumulator"
247 10 4 if ($vv eq $var) { }
249 4 6 if ($cc > 0) { }
3 3 elsif (scalar @v1 == 1) { }
261 7 3 if (scalar @nt)
267 5 0 if ($pow == 1) { }
288 24 41 if (scalar keys %n_terms == 1 and abs $acc > 1 and $acc eq int $acc) { }
16 36 elsif (scalar keys %n_terms == 2 and $acc == 0) { }
296 22 2 if ($mult > 0)
301 1 3 if (not $t =~ /,/ and $t =~ /:3$/ and defined $cbrt_x and defined $cbrt_y)
306 1 0 if ($acc < -1) { }
0 0 elsif ($acc > 1) { }
308 1 0 if ($cbrt_x == 1) { }
319 0 0 if ($cbrt_x == 1) { }
333 20 1 if (%n_terms and $acc < -1)
339 8 4 if (not $t =~ /,/ and defined $sqrt_x and $pow > 1 and $pow % 2 == 0 and defined $sqrt_y)
343 5 3 if ($pow == 2) { }
3 0 elsif ($pow % 2 == 0) { }
344 4 1 if ($sqrt_x == 1) { }
355 2 1 if ($sqrt_x == 1) { }
383 1 15 if (not $t[0] =~ /,/ and $t[0] =~ /:2$/ and not $t[1] =~ /,/ and $t[1] =~ /:2$/) { }
12 3 elsif (not $t[0] =~ /,/ and $t[0] =~ /:3$/ and not $t[1] =~ /,/ and $t[1] =~ /:3$/) { }
385 0 1 if ($m[0] > 0 and $m[1] < 0) { }
1 0 elsif ($m[0] < 0 and $m[1] > 0) { }
389 0 0 if (defined $sqrt_y and defined $sqrt_x)
390 0 0 if ($sqrt_x == 1 and $sqrt_y == 1) { }
0 0 elsif ($sqrt_x == 1) { }
0 0 elsif ($sqrt_y == 1) { }
415 1 0 if (defined $sqrt_y and defined $sqrt_x)
416 0 1 if ($sqrt_x == 1 and $sqrt_y == 1) { }
1 0 elsif ($sqrt_y == 1) { }
0 0 elsif ($sqrt_x == 1) { }
440 4 8 if ($m[0] > 0 and $m[1] > 0) { }
3 5 elsif ($m[0] > 0 and $m[1] < 0) { }
5 0 elsif ($m[0] < 0 and $m[1] > 0) { }
446 4 0 if (defined $cbrt_y and defined $cbrt_x)
447 1 3 if ($cbrt_x == 1 and $cbrt_y == 1) { }
1 2 elsif ($cbrt_y == 1) { }
1 1 elsif ($cbrt_x == 1) { }
474 3 0 if (defined $cbrt_y and defined $cbrt_x)
475 1 2 if ($cbrt_x == 1 and $cbrt_y == 1) { }
1 1 elsif ($cbrt_y == 1) { }
1 0 elsif ($cbrt_x == 1) { }
502 5 0 if (defined $cbrt_y and defined $cbrt_x)
503 1 4 if ($cbrt_x == 1 and $cbrt_y == 1) { }
1 3 elsif ($cbrt_y == 1) { }
1 2 elsif ($cbrt_x == 1) { }
527 43 0 if (%n_terms)
529 43 0 unless (exists $n_terms{'constant_accumulator'})
543 0 65 unless defined $var
544 0 65 unless defined $coeffs
547 24 41 if $degree <= 1
555 40 1 if (scalar @const_co == scalar @co) { }
558 40 0 if ($degree < 15)
563 14 26 if (defined $root)
573 19 30 if $k % 2 == 1
575 25 24 if ($const_co[$k] == $bin_add)
578 24 25 if ($const_co[$k] == $bin_sub)
583 4 10 if (scalar @pos_matches == scalar @const_co) { }
2 8 elsif (scalar @neg_matches == scalar @const_co) { }
606 22 192 if (abs $p_val < "1e-11")
611 22 0 if ($remainder->value == 0)
621 12 22 unless ($found_root)
632 19 24 if ($factors_in < scalar @factors and defined $nt)
642 7 36 if (scalar @factors == 0) { }
30 12 elsif (%n_terms and scalar @factors > 0) { }
648 0 30 unless (exists $n_terms{'constant_accumulator'})
664 105 27 if ($n % $i == 0)
699 88 62 if $guess ** $n == $v
701 0 62 if $guess ** $n == $v
707 28 35 if $num <= 1
717 0 49 if $k < 0 or $k > $n
718 28 21 if $k == 0 or $k == $n