Branch Coverage

blib/lib/Math/SigFigs.pm
Criterion Covered Total %
branch 98 98 100.0


line true false branch
47 74 4 if (defined $n1in)
50 6 72 unless defined $n1
52 70 2 if (defined $n2in)
55 4 68 unless defined $n2
57 21 47 if ($sub)
58 8 13 if ($n2 < 0) { }
12 1 elsif ($n2 > 0) { }
67 1 67 if $n1in eq '0'
68 1 66 if $n2in eq '0'
70 8 58 $lsp1 > $lsp2 ? :
85 10 2 if (defined $n1)
88 2 10 unless defined $n1
90 9 1 if (defined $n2)
93 1 9 unless defined $n2
95 2 7 $sig1 < $sig2 ? :
104 8 2 if (defined $n1)
107 2 8 unless defined $n1
109 7 1 if (defined $n2)
112 2 6 if not defined $n2 or $n2 == 0
114 2 4 $sig1 < $sig2 ? :
121 3 171 if not $n =~ /^\d+$/ or $n == 0
125 1 170 unless defined $N
126 2 168 if $N == 0 and $n == 1
128 25 143 if $sig eq $n
135 98 45 if ($int > 0) { }
38 7 elsif ($dec ne '' and $dec > 0) { }
149 16 127 if ($n < $sig and substr($num, $n + 2, 1) eq '5')
159 38 105 if ($tmp >= 1)
171 1 13 unless defined $N
189 15 124 if ($lsp == 0)
193 33 91 if ($lsp > 0)
220 1 723 unless defined $n
224 26 697 if $s eq '+'
225 2 721 if $n eq ''
227 244 477 if ($n =~ s/[eE]([+-]*\d+)$//) { }
235 132 589 if ($n =~ /^(\d+)$/) { }
233 356 elsif ($n =~ /^0*\.(\d+)$/) { }
348 8 elsif ($n =~ /^0*(\d+)\.(\d*)$/) { }
241 11 121 if $int eq ''
252 31 202 if $dec eq $tmp
266 139 574 if ($exp > 0) { }
66 508 elsif ($exp < 0) { }
267 95 44 if ($exp >= length $dec) { }
276 9 130 unless $int
279 27 39 if (-$exp < length $int) { }
295 248 465 if ($dec eq '') { }
297 34 81 if $lsp == 0 and $int =~ /0$/ and $int ne '0'
299 145 320 if $int eq ''
302 50 663 if $num == 0