Branch Coverage

blib/lib/Math/Polynomial/Solve.pm
Criterion Covered Total %
branch 157 200 78.5


line true false branch
276 0 0 if (scalar @_ > 0)
278 0 0 $_[0] == 0 ? :
293 0 17 if (not exists $def{'order'}) { }
15 2 elsif ($def{'order'} =~ /^ascend/i) { }
2 0 elsif ($def{'order'} =~ /^descend/i) { }
352 30 14 if (@czp)
356 20 86 if (abs $coefficients[$j] > $epsilon)
377 22 22 if ($m > 1)
491 0 135 $ascending_flag == 0 ? :
503 0 135 if (@coefficients == 0)
526 15 120 if ($option{'root_function'} and poly_nonzero_term_count(@coefficients) == 2)
539 22 98 if ($option{'varsubst'} and $#coefficients > 1)
543 22 0 if $subst_degree > 1
562 87 33 if ($option{'hessenberg'} or $#coefficients > 4) { }
15 18 elsif ($#coefficients == 4) { }
4 14 elsif ($#coefficients == 3) { }
5 9 elsif ($#coefficients == 2) { }
9 0 elsif ($#coefficients == 1) { }
590 22 98 if $subst_degree > 1
667 7 15 if scalar @_ == 0
674 15 0 if (exists $option{$okey}) { }
677 7 8 $opts{$okey} ? :
713 0 87 $ascending_flag == 0 ? :
794 525 156 if ($i != $n) { }
808 156 525 if ($i == 0) { }
378 147 elsif ($i != $n) { }
821 9 672 if $c == 0 or $r == 0
839 173 499 if ($c + $r < 0.95 * $s * $f)
852 41 132 if ($i == 0) { }
861 145 28 if ($i != $n) { }
931 157 4058 if (abs $h[$d][$d - 1] <= $epsilon * (abs($h[$d - 1][$d - 1]) + abs($h[$d][$d])))
942 63 1235 if ($l == $n)
955 144 1091 if ($l == $na)
962 17 127 if ($q > 0) { }
967 9 8 if $p < 0
985 0 1091 if $its >= $iteration{'hessenberg'}
987 53 1038 if ($its and $its % 10 == 0)
1034 1083 1726 if $d == $l
1036 8 1718 if (abs($h[$d][$d - 1]) * (abs($q) + abs($r)) <= $epsilon * abs($p) * (abs($h[$d - 1][$d - 1]) + abs($z) + abs($h[$d + 1][$d + 1])))
1070 2809 1091 if ($k != $m)
1074 1718 1091 $notlast ? :
1077 0 2809 if $x == 0
1085 1896 2004 if $p < 0
1087 2809 1091 if ($k != $m) { }
8 1083 elsif ($l != $m) { }
1110 11892 2182 if ($notlast)
1121 2182 1718 if $j > $n
1131 13624 5005 if ($notlast)
1172 0 9 $ascending_flag == 0 ? :
1174 0 9 if (abs $a < $epsilon)
1180 9 0 wantarray ? :
1196 0 40 $ascending_flag == 0 ? :
1198 0 40 if (abs $a < $epsilon)
1204 2 38 if abs $c < $epsilon
1208 26 12 if $b < $epsilon
1231 0 23 $ascending_flag == 0 ? :
1234 0 23 if (abs $a < $epsilon)
1248 2 21 if (abs $d < $epsilon)
1271 10 11 if ($dis > $epsilon) { }
7 4 elsif ($dis < -$epsilon) { }
1284 1 9 if $r_p > 0
1285 7 3 if $r_q > 0
1340 0 22 $ascending_flag == 0 ? :
1343 0 22 if (abs $a < $epsilon)
1357 0 22 if (abs $e < $epsilon)
1397 2 20 if (abs $h < $epsilon) { }
16 4 elsif (abs $g * $g < $epsilon) { }
1568 0 21 if ($#coefficients == 1)
1576 0 0 if $root < $from or $root > $to
1589 0 21 if $range_count == 0
1590 13 8 if $range_count == 1
1618 39 20 if ($frommid_count == 0) { }
12 8 elsif ($midto_count == 0) { }
1636 0 51 if $its >= $iteration{'sturm_bisection'}
1703 16 39 unless $ascending_flag
1712 52 3 if $degree > 0
1714 49 6 if ($degree > 1)
1731 73 4 @remd ? :
1762 627 433 if $s1 != $s2
1844 24 32 ($#coefficients & 1) == 1 ? :
1949 0 0 if scalar @_ > 0
1978 0 16 unless $ascending_flag
1983 3 13 if (ref $xval_ref eq 'ARRAY') { }
1992 0 13 ref $xval_ref eq 'SCALAR' ? :
2013 20 75 if (abs $y <= $tolerance{'laguerre'})
2029 43 32 if abs $g - $f > abs $g + $f
2047 1 74 if (abs $dx <= $tolerance{'laguerre'})
2053 0 74 if $its >= $iteration{'laguerre'}
2088 0 2 unless $ascending_flag
2093 2 0 if (ref $xval_ref eq 'ARRAY') { }
2102 0 0 ref $xval_ref eq 'SCALAR' ? :
2124 6 34 if (abs $dx <= $tolerance{'newtonraphson'})
2136 0 34 if $its >= $iteration{'newtonraphson'}
2208 7 6 if scalar @_ == 0
2216 6 0 if (exists $iteration{$k}) { }
2220 0 6 if $val < 10
2281 3 2 if scalar @_ == 0
2289 2 0 if (exists $tolerance{$k}) { }
2319 91 136 if abs $coefficients[$j] > $epsilon
2325 0 17 unless ($coeff_order_set)