Branch Coverage

blib/lib/Math/Numerical.pm
Criterion Covered Total %
branch 64 64 100.0


line true false branch
73 1 35 unless ref $func eq "CODE"
77 859 2 if defined $r
78 1 1 if $Math::Numerical::EVAL_ERROR
85 5 5 $_[0] * $_[1] > 0 ? :
157 41 15 if ($s->{'fb'} > 0 and $s->{'fc'} > 0 or $s->{'fb'} < 0 and $s->{'fc'} < 0)
161 10 46 if (abs $s->{'fc'} < abs $s->{'fb'})
167 8 48 if (abs $s->{'xm'} <= $s->{'tol1'} or $s->{'fb'} == 0)
171 38 10 if (abs $s->{'e'} >= $s->{'tol1'} and abs $s->{'fa'} > abs $s->{'fb'}) { }
173 34 4 if ($s->{'a'} == $s->{'c'}) { }
185 19 19 if $s->{'p'} > 0
190 1 37 $min1 < $min2 ? :
37 1 if (2 * $s->{'p'} < ($min1 < $min2 ? $min1 : $min2)) { }
200 38 10 if (abs $s->{'d'} > $s->{'tol1'}) { }
214 10 2 if ($do_bracket) { }
216 1 7 unless defined $xa
220 1 1 if $fa > 0 and $fb > 0 or $fa < 0 and $fb < 0
227 8 48 if (defined $brent_state and _do_find_root_brent($f, $brent_state))
228 1 7 wantarray ? :
325 1 18 if $s->{'split'} < 2
327 1 17 if $s->{'factor'} < 2
340 2 498 if ($fa * $fb < 0)
353 1 16 if $s->{'factor'} <= 1
360 12 270 if ($s->{'f1'} * $s->{'f2'} < 0)
364 50 220 if (abs $s->{'f1'} < abs $s->{'f2'}) { }
375 7 17 if (not defined $x2 or $x1 == $x2)
380 1 23 if $max_iter <= 0
386 19 2 if ($params{'do_inward'} // 1)
390 17 2 if ($params{'do_outward'} // 1)
394 1 17 unless defined $outward_state or defined $inward_state
400 12 370 if (defined $outward_state and _do_bracket_outward($f, $outward_state))
403 2 368 if (defined $inward_state and _do_bracket_inward($f, $inward_state))
409 4 364 if (defined $inward_state and $inward_state->{'split'} > $max_iter)