Branch Coverage

blib/lib/Math/NumberCruncher.pm
Criterion Covered Total %
branch 292 584 50.0


line true false branch
47 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
49 0 1 unless defined $arrayref and @$arrayref > 0
53 299 1 if ($zzz > $hi)
56 0 300 if ($zzz < $lo)
60 0 1 if ($lo eq '')
65 1 11 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
67 0 12 unless defined $arrayref and @$arrayref > 0
74 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
77 0 1 unless defined $arrayref and @$arrayref > 0
80 1 0 if (@array % 2) { }
89 1 1 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
91 0 2 unless defined $arrayref and @$arrayref > 0
97 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
99 0 1 unless defined $arrayref and @$arrayref > 0
103 0 300 if @result and $count{$_} != $count{$result[0]}
110 1 1 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
113 0 2 unless (defined $array1ref and defined $array2ref and @$array1ref > 0 and $array2ref > 0)
126 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
129 0 1 unless (defined $array1ref and defined $array2ref and @$array1ref > 0 and $array2ref > 0)
146 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
150 0 1 unless (defined $a_ref and defined $b_ref and @$a_ref > 0 and @$b_ref > 0)
173 1 4 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
176 4 1 if (@p % 2) { }
181 0 5 unless @p >= 3
183 4 1 if $d == 2
194 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
196 0 1 unless @p >= 3
208 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
211 0 1 unless @array >= 2
219 1 1 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
229 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
231 0 1 unless @Math::NumberCruncher::array >= 2
236 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
238 0 1 unless defined $n
240 0 1 unless ($n >= 0 and $n == int $n)
251 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
253 0 1 unless defined $n
255 1 0 unless defined $k
261 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
272 301 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
275 0 301 if ($low > $high)
282 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
288 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
290 0 1 unless defined $arrayref and @$arrayref > 0
293 4 295 if $i == $j
299 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
304 0 1 unless defined $arrayref and @$arrayref > 0
306 5 3 unless $seen{$zzz}++
312 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
314 0 1 unless (defined $arrayref1 and defined $arrayref2 and @$arrayref1 > 0 and @$arrayref2 > 0)
322 3 2 unless ($seen{$item})
330 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
332 0 1 unless (defined $arrayref1 and defined $arrayref2 and @$arrayref1 > 0 and @$arrayref2 > 0)
344 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
346 0 1 unless (defined $arrayref1 and defined $arrayref2 and @$arrayref1 > 0 and @$arrayref2 > 0)
356 2 1 if ($union{$zzz})
365 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
367 0 1 unless (defined $arrayref1 and defined $arrayref2 and @$arrayref1 > 0 and @$arrayref2 > 0)
376 2 4 $count{$zzz} > 1 ? :
382 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
392 0 1 wantarray ? :
396 1 69 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
398 0 70 unless defined $n and defined $k
400 0 70 if ($k > $n or $k < 0)
411 1 68 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
413 0 69 if $p == 0
414 0 69 if $p == 1
419 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
426 1 2 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
429 0 3 unless defined $arrayref and @$arrayref > 0
435 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
439 0 1 unless defined $arrayref and @$arrayref > 0
445 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
448 0 1 unless defined $arrayref and @$arrayref > 0
452 0 1 unless $deviation
461 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
463 0 1 unless defined $trials and defined $hits and defined $probability
472 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
476 0 1 unless defined $var and defined $unit
479 0 1 if ($unit =~ /^k/i) { }
1 0 elsif ($unit =~ /^m/i) { }
489 1 0 if ($var =~ /^m(.*)$/i) { }
0 0 elsif ($var =~ /^e(.*)$/i) { }
502 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
505 0 1 if ($vars[-1] =~ /^\d*$/) { }
514 1 0 if ($vars[0] =~ /^[Aa](.*)$/) { }
0 0 elsif ($vars[0] =~ /^[Ff](.*)$/) { }
519 0 1 if ($vars[1] =~ /^[Ff](.*)$/) { }
1 0 elsif ($vars[1] =~ /^[Mm](.*)$/) { }
524 0 1 if ($acc and $force) { }
1 0 elsif ($acc and $mass) { }
0 0 elsif ($force and $mass) { }
540 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
553 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
555 0 1 if (@_ == 4 or @_ == 7) { }
561 1 0 if (@_ == 3) { }
0 0 elsif (@_ == 6) { }
578 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
581 0 1 if ($xy[-1] =~ /p/i) { }
588 0 1 unless @xy % 2 == 0 and @xy > 0
597 1 2 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
599 0 3 unless defined $x0 and defined $y0 and defined $x1 and defined $y1 and defined $x2 and defined $y2
604 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
606 0 1 unless defined $x and defined $y and @xy > 0
615 1 2 if ($y[$i] <= $y && $y < $y[$j] || $y[$j] <= $y && $y < $y[$i] and $x < ($x[$j] - $x[$i]) * ($y - $y[$i]) / ($y[$j] - $y[$i]) + $x[$i])
621 1 0 $side ? :
625 0 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
627 0 0 unless defined $d and @points > 0
636 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
638 0 1 unless defined $d and @bb > 0
640 0 1 unless @bb
644 2 2 if $p[$ij] < $bb[$i]
645 1 3 if $p[$ij] > $bb[$i + $d]
652 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
654 0 1 unless defined defined $x and defined $y and defined $x0 and defined $y0 and defined $x1 and defined $y1 and defined $x2 and defined $y2
663 0 1 if abs $cw0 < 1e-10
665 0 1 if abs $cw1 < 1e-10
666 1 0 if $cw0 < 0 and $cw1 > 0 or $cw0 > 0 and $cw1 < 0
668 0 0 if abs $cw2 < 1e-10
669 0 0 if $cw0 < 0 and $cw2 > 0 or $cw0 > 0 and $cw2 < 0
674 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
677 0 1 if ($xy[-1] =~ /p/i) { }
683 0 1 unless @xy % 2 == 0 and @xy > 0
694 0 5 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
701 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
705 0 1 unless defined $radius
713 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
716 0 1 unless defined $diameter
724 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
727 0 1 unless defined $radius
735 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
738 0 1 unless defined $radius
746 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
750 0 1 unless defined $pct
757 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
761 0 1 unless defined $radius and defined $height
769 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
773 0 1 unless defined $lowerbase and defined $height
782 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
785 0 1 unless defined $degrees
794 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
797 0 1 unless defined $radians
806 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
809 0 1 unless defined $x
817 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
820 0 1 unless defined $x
828 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
831 0 1 unless defined $x
839 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
842 0 1 unless defined $x
850 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
853 0 1 unless defined $temp
861 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
864 0 1 unless defined $temp
872 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
875 0 1 unless defined $x
883 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
886 0 1 unless defined $x
894 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
897 0 1 unless defined $temp
905 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
908 0 1 unless defined $temp
916 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
920 0 1 unless defined $stride_length and defined $leg_length
928 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
931 0 1 unless defined $temp
939 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
942 0 1 unless defined $temp
950 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
954 0 1 unless defined $speed and defined $legLength
965 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
977 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
993 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
997 0 1 unless ($a and $b)
1005 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1009 0 1 unless ($a and $b)
1017 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1018 0 1 unless (scalar @_ >= 3)
1033 1 4 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1036 0 5 unless defined $x
1038 0 5 if (ref $x eq 'Math::BigFloat') { }
1063 1 6 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1066 0 7 unless defined $x
1068 0 7 if (ref $x eq 'Math::BigFloat') { }
1093 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1105 1 3 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1128 1 1 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1131 0 2 unless defined $x
1132 0 2 if ($x == 0)
1136 0 2 if (ref $x eq 'Math::BigFloat') { }
1149 1 1 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1152 0 2 unless defined $x
1154 1 1 if (ref $x eq 'Math::BigFloat') { }
1177 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1180 0 1 unless defined $num
1181 0 1 if (ref $num eq 'Math::BigFloat')
1190 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1194 0 1 unless defined $x
1196 0 1 if (ref $x eq 'Math::BigFloat') { }
1207 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1217 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1220 0 1 unless defined $x
1227 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1229 0 1 unless defined $x
1239 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1242 0 1 unless defined $num
1252 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1255 0 1 unless defined $x
1264 1 1 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1267 0 2 unless defined $num
1276 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1279 0 1 unless defined $num
1288 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1291 0 1 unless defined $num
1299 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1306 1 15 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1313 0 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1320 1 16 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1325 0 17 if ($num < 0)
1326 0 17 if ($root == 0)
1328 0 17 if (ref $num eq 'Math::BigFloat') { }
1343 17 17 unless $x cmp $y
1352 1 1 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1360 0 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1363 0 0 if ($P <= $max_pi)
1373 0 0 unless $Pi cmp $NewPi
1383 0 2 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1386 2 0 if ($P <= $max_p)
1396 0 0 if ($D >= $Eps)
1406 0 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1409 0 0 unless defined $num
1414 1 2 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1418 2 1 if (ref $x eq 'Math::BigFloat') { }
1427 0 3 if abs $X - $Y > 0.5
1435 3 52 unless $NewSum cmp $Sum
1440 1 2 unless $Y cmp 0
1449 0 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1452 0 0 unless defined $num
1457 1 2 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1460 0 3 ref $X ? :
1463 0 3 if $X < 1
1476 3 41 unless ($NewLn cmp $Ln)
1487 0 3 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1491 3 0 if ($P <= $max_p)
1502 0 0 unless ($NewLn cmp $Ln)
1513 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1517 0 1 if ($s <= 0 or $t <= 0)
1525 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1529 0 1 if ($s <= 0 or $t <= 0)
1537 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1555 1 5 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1558 0 6 unless defined $x
1561 0 6 if (ref $x eq 'Math::BigFloat') { }
1577 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1582 1 0 if ($const[-1] =~ /^\d*$/)
1586 0 1 if (/_gm_/i or /all/i)
1588 0 0 if ($prec)
1591 0 0 if (wantarray)
1595 0 1 if (/_catalan_/i or /all/i)
1597 0 0 if ($prec)
1600 0 0 if (wantarray)
1604 1 0 if (/_apery_/i or /all/i)
1606 1 0 if ($prec)
1609 0 1 if (wantarray)
1613 0 1 if (/_gamma_/i or /all/i)
1615 0 0 if ($prec)
1618 0 0 if (wantarray)
1622 0 1 if (/_khintchine_/i or /all/i)
1624 0 0 if ($prec)
1627 0 0 if (wantarray)
1631 0 1 if (/_landau_/i or /_ramanujan_/i or /_lr_/i or /all/i)
1633 0 0 if ($prec)
1636 0 0 if (wantarray)
1640 0 1 if (/_sierpinski_/i or /all/i)
1642 0 0 if ($prec)
1645 0 0 if (wantarray)
1649 0 1 if (/_wilbraham_/i or /_gibbs_/i or /all/i)
1651 0 0 if ($prec)
1654 0 0 if (wantarray)
1658 0 1 if (/_sqrt2_/i or /all/i)
1660 0 0 if ($prec)
1663 0 0 if (wantarray)
1667 0 1 if (/_sqrt3_/i or /all/i)
1669 0 0 if ($prec)
1672 0 0 if (wantarray)
1676 0 1 if (/_sqrt5_/i or /all/i)
1678 0 0 if ($prec)
1681 0 0 if (wantarray)
1686 0 1 wantarray ? :
1690 1 0 if UNIVERSAL::isa($_[0], 'Math::NumberCruncher')
1692 0 1 if ($n > 498 or $n < 2 or $n % 2)
1947 1 0 wantarray ? :