Branch Coverage

blib/lib/Math/Function/Roots.pm
Criterion Covered Total %
branch 30 36 83.3


line true false branch
122 9 8 if (@_)
124 1 8 if $Math::Function::Roots::E < 0
145 7 4 if (@_)
147 2 5 if $Math::Function::Roots::Max_Iter < 1
220 1 8 if ($ay * $by > 0)
233 6 153 if ($py == 0 or abs $a - $b <= $E) { }
92 61 elsif ($py * $ay < 0) { }
305 1 61 if (abs $p - $last_p <= $E)
352 2 18 if ($q1 eq 0 or abs $p - $p1 <= $E)
392 1 6 if $ay * $by > 0
403 5 85 if (abs $py - $last_py <= $E) { }
82 3 elsif ($py * $by < 0) { }
447 0 1 if (defined $_[0] and $_[0] =~ !/epsilon|max_iter/)
450 0 1 if (defined $_[0] and $_[0] =~ !/epsilon|max_iter/)
458 1 0 unless (defined $b)
461 1 0 unless (defined $a)
491 0 1 unless eval { do { $approx = bisection(\&$f, $a, $b, 'epsilon', 0.1) } }
494 0 1 unless eval { do { $result = false_position(\&$f, $approx - 0.1, $approx + 0.1) } }