Branch Coverage

blib/lib/Math/Brent.pm
Criterion Covered Total %
branch 44 60 73.3


line true false branch
169 2 3 if ($fb > $fa)
198 0 2 if (($bx - $u) * ($u - $cx) > 0) { }
2 0 elsif (($cx - $u) * ($u - $ulim) > 0) { }
0 0 elsif (($u - $ulim) * ($ulim - $cx) >= 0) { }
202 0 0 if ($fu < $fc) { }
0 0 elsif ($fu > $fb) { }
223 0 2 if ($fu < $fc)
302 5 44 if abs $x - $xm <= $tol2 - 0.5 * ($b - $a)
304 39 5 if (abs $e > $tol1)
310 17 22 if ($q = 2 * ($q - $r)) > 0
316 34 0 unless (abs $p >= abs 0.5 * $q * $etemp or $p <= $q * ($a - $x) or $p >= $q * ($b - $x))
325 5 29 if ($u - $a < $tol2 or $b - $u < $tol2)
336 8 2 $x >= $xm ? :
342 39 5 abs $d >= $tol1 ? :
349 31 13 if ($fu <= $fx) { }
351 14 17 if ($u >= $x) { }
365 7 6 if ($u < $x) { }
374 7 6 if ($fu <= $fw or $w == $x) { }
6 0 elsif ($fu <= $fv or $v == $x or $v == $w) { }
388 0 5 if $iter >= $ITMAX
398 0 9 if ($fa > 0 and $fb > 0 or $fa < 0 and $fb < 0)
423 50 25 if ($fb > 0 and $fc > 0 or $fb < 0 and $fc < 0)
431 16 59 if (abs $fc < abs $fb)
459 9 66 if abs $xm <= $tol1 or $fb == 0
461 57 9 if (abs $e >= $tol1 and abs $fa > abs $fb) { }
471 41 16 if ($a == $c) { }
495 31 26 if $p > 0
500 57 0 if (2 * $p < min($min1, $min2)) { }
540 57 9 abs $d > $tol1 ? :
545 0 0 if $iter >= $ITMAX