Branch Coverage

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


line true false branch
74 1 35 unless ref $func eq "CODE"
78 859 2 if defined $r
79 1 1 if $Math::Numerical::EVAL_ERROR
86 5 5 $_[0] * $_[1] > 0 ? :
165 41 15 if ($s->{'fb'} > 0 and $s->{'fc'} > 0 or $s->{'fb'} < 0 and $s->{'fc'} < 0)
169 10 46 if (abs $s->{'fc'} < abs $s->{'fb'})
175 8 48 if (abs $s->{'xm'} <= $s->{'tol1'} or $s->{'fb'} == 0)
179 38 10 if (abs $s->{'e'} >= $s->{'tol1'} and abs $s->{'fa'} > abs $s->{'fb'}) { }
181 34 4 if ($s->{'a'} == $s->{'c'}) { }
193 19 19 if $s->{'p'} > 0
198 1 37 $min1 < $min2 ? :
37 1 if (2 * $s->{'p'} < ($min1 < $min2 ? $min1 : $min2)) { }
208 38 10 if (abs $s->{'d'} > $s->{'tol1'}) { }
222 10 2 if ($do_bracket) { }
224 1 7 unless defined $xa
228 1 1 if $fa > 0 and $fb > 0 or $fa < 0 and $fb < 0
235 8 48 if (defined $brent_state and _do_find_root_brent($f, $brent_state))
236 1 7 wantarray ? :
333 1 18 if $s->{'split'} < 2
335 1 17 if $s->{'factor'} < 2
349 2 498 if ($fa * $fb < 0)
362 1 16 if $s->{'factor'} <= 1
370 12 270 if ($s->{'f1'} * $s->{'f2'} < 0)
374 50 220 if (abs $s->{'f1'} < abs $s->{'f2'}) { }
385 7 17 if (not defined $x2 or $x1 == $x2)
390 1 23 if $max_iter <= 0
396 19 2 if ($params{'do_inward'} // 1)
400 17 2 if ($params{'do_outward'} // 1)
404 1 17 unless defined $outward_state or defined $inward_state
410 12 370 if (defined $outward_state and _do_bracket_outward($f, $outward_state))
413 2 368 if (defined $inward_state and _do_bracket_inward($f, $inward_state))
419 4 364 if (defined $inward_state and $inward_state->{'split'} > $max_iter)