Branch Coverage

blib/lib/Math/Decimal.pm
Criterion Covered Total %
branch 154 154 100.0


line true false branch
288 243 14891 unless &is_dec_number
308 10 130288 unless rand $_[0]
142 130146 unless $_[0] =~ /\A(?:(-)|\+?)0*([1-9][0-9]*|0)(?:(\.[0-9]*[1-9])0*|\.0+|)\z/
36758 93388 defined $1 ? :
49890 80256 defined $3 ? :
8217 121929 $num eq '-0' ? :
342 110 5871 unless rand $_[0]
781 5090 unless $_[0] =~ /\A(?:(-)|\+?)0*(?:0(?:\.0+)?()|[0-9]+(?:\.[0-9]+)?)\z/
2241 2392 defined $1 ? :
457 4633 defined $2 ? :
357 10 4751 unless rand $_[0]
378 60 81333 unless rand $_[0] and rand $_[1]
426 80907 unless defined $ai and defined $bi
38134 42773 unless defined $as
38137 42770 unless defined $bs
26975 53932 unless defined $af
19207 61700 unless defined $bf
11716 69191 if $ai =~ /\A0+\z/ and $af =~ /\A0+\z/
11668 69239 if $bi =~ /\A0+\z/ and $bf =~ /\A0+\z/
40640 40267 if defined $cmp
7771 32496 if ($ld < 0) { }
18840 13656 elsif ($ld > 0) { }
9642 30625 if ($ld < 0) { }
8452 22173 elsif ($ld > 0) { }
6076 34191 if $as eq '-'
430 9153 11583 &dec_cmp eq '-1' ? :
440 9153 11583 &dec_cmp eq '1' ? :
471 30 23370 unless rand $_[0] and rand $_[1]
213 23157 unless defined $ai and defined $bi
13219 9938 unless defined $as
9036 14121 unless defined $bs
7856 15301 unless defined $af
11620 11537 unless defined $bf
3022 20135 if ($ld < 0) { }
9835 10300 elsif ($ld > 0) { }
2538 20619 if ($ld < 0) { }
6343 14276 elsif ($ld > 0) { }
4212 44221 $rv >= 58 ? :
4212 44221 if $c
72 10771 $c ? :
2646 9668 if $ad lt $bd
6767 47072 $rv < 48 ? :
6767 47072 if $c
10843 12314 if ($as eq $bs) { }
549 20 20244 unless rand $_[0]
142 20102 unless defined $pi
10 20092 if defined $pbadf
4 20088 if length $pi > 9
4321 15767 defined $pneg && $pi ne '0' ? :
563 28 82 if ($p < 0) { }
582 10 20137 unless rand $_[0]
71 20066 unless defined $ai
7456 12610 unless defined $af
2106 2187 if $il + $p <= 0
9944 5741 if $p >= $fl
4293 15685 if ($p < 0) { }
609 20 26155 unless rand $_[0] and rand $_[1]
142 26013 unless defined $ai and defined $bi
21708 4305 unless defined $as
21708 4305 unless defined $bs
20037 5976 unless defined $af
21363 4650 unless defined $bf
29946 28723 if $bv == 0
23739 2274 $as eq $bs ? :
658 30 4434 if $_[1] eq '0'
10 4424 if $_[0] eq '0'
4404 20 defined $1 ? :
4374 50 defined $1 ? :
4912 31028 if (dec_cmp($msd, $r) ne '1')
160 6084 unless rand $mode and exists $round_tiebreak{$mode}
2224 2210 $sgn_a == $sgn_b ? :
960 2020 $mode =~ /\ANEAR_/ && ($half_cmp = dec_cmp(dec_mul($r, '2'), $abs_b)) ne '0' ? :
2 2980 $mode eq 'EXACT' ? :
1452 2982 $r eq '0' ? :
1440 2992 if ($r eq '0' ? 0 : ($mode eq 'EXACT' ? croak('inexact division') : ($mode =~ /\ANEAR_/ && ($half_cmp = dec_cmp(dec_mul($r, '2'), $abs_b)) ne '0' ? $half_cmp eq '1' : $base_round_handler{$round_tiebreak{$mode}}($q))))
2210 2222 $sgn_a ne $sgn_b ? :
2190 2242 $sgn_a ne '1' ? :