Condition Coverage

blib/lib/Math/BigRat.pm
Criterion Covered Total %
condition 273 628 43.4


and 3 conditions

line !l l&&!r l&&r condition
101 0 0 0 defined $cmp && $_[2]
262 4 9954 0 @_ == 1 and not defined $_[0]
0 0 4 defined $_[0] && defined $_[1]
9954 4 0 @_ == 2 and not defined $_[0] && defined $_[1]
281 4 12 9942 @args == 1 and not ref $args[0]
305 5285 0 14 defined $expo and $mant ne 0
309 4268 17 1014 $sign eq '-' && $mant ne '0'
346 2068 0 6 defined $expo1 and $mant1 ne 0
350 2067 0 7 defined $expo2 and $mant2 ne 0
354 1587 4 483 $sign eq '-' && $mant1 ne '0'
373 4 12 2569 @args == 1 and not ref $args[0]
16 2477 92 @args == 1 and not ref $args[0] and $args[0] =~ m[ ^ \s* ( \S+ ) \s* / \s* ( \S+ ) \s* $ ]x
385 2569 0 16 ref $args[0] and $args[0]->can("as_rat")
393 88 0 4 ref $args[1] and $args[1]->can("as_rat")
427 0 0 0 $selfref and $self->modify("from_dec")
477 3 0 0 $selfref and $self->modify("from_hex")
533 3 0 0 $selfref and $self->modify("from_oct")
589 3 0 0 $selfref and $self->modify("from_bin")
645 0 0 0 $selfref and $self->modify("from_bytes")
673 0 0 0 $selfref and $self->modify("from_ieee754")
705 0 0 0 $selfref and $self->modify("from_fp80")
736 0 0 0 $selfref and $self->modify("from_base")
783 3 149 0 $selfref and $self->modify("bzero")
788 150 0 2 $dng and $dng ne $class
812 0 0 0 @r >= 2 and defined $r[0]
0 0 0 @r >= 2 and defined $r[0] and defined $r[1]
839 5 59 0 $selfref and $self->modify("bone")
844 63 0 1 $dng and $dng ne $class
852 27 16 20 defined $_[0] and $_[0] =~ /^\s*([+-])\s*$/
876 16 0 0 @r >= 2 and defined $r[0]
16 0 0 @r >= 2 and defined $r[0] and defined $r[1]
910 869 201 0 $selfref and $self->modify("binf")
915 51 4 1015 defined $_[0] and $_[0] =~ /^\s*([+-])(inf|$)/i
927 1064 0 6 $dng and $dng ne $class
947 4 0 0 @r >= 2 and defined $r[0]
4 0 0 @r >= 2 and defined $r[0] and defined $r[1]
981 656 520 0 $selfref and $self->modify("bnan")
984 1167 0 9 $dng and $dng ne $class
1008 0 0 0 @r >= 2 and defined $r[0]
0 0 0 @r >= 2 and defined $r[0] and defined $r[1]
1036 0 0 0 $selfref and $self->modify("bpi")
1248 612 1214 269 $x->{'sign'} eq "+" and $LIB->_is_zero($x->{'_n'})
1264 414 69 154 $LIB->_is_one($x->{'_n'}) and $LIB->_is_one($x->{'_d'})
1273 16 28 40 $LIB->_is_one($x->{'_d'}) and $LIB->_is_odd($x->{'_n'})
1282 16 20 24 $LIB->_is_one($x->{'_d'}) and $LIB->_is_even($x->{'_n'})
1290 3175 4666 7535 $x->is_finite and $LIB->_is_one($x->{'_d'})
1302 45 17 155 @_ == 1 and ref $_[0] ne "HASH"
1330 0 32 168 ref $_[0] && ref $_[0] eq ref $_[1]
1336 16 0 184 $x->is_finite and $y->is_finite
1340 16 0 0 $x->{'sign'} eq $y->{'sign'} and $x->is_inf
1352 58 70 56 $x->{'sign'} eq "+" and $y->{'sign'} eq "-"
1354 70 39 19 $x->{'sign'} eq "-" and $y->{'sign'} eq "+"
1361 97 12 0 $xz and $yz
1362 97 0 12 $xz and $y->{'sign'} eq "+"
1363 89 0 8 $yz and $x->{'sign'} eq "+"
1377 0 0 197 ref $_[0] && ref $_[0] eq ref $_[1]
1384 88 52 57 $x->is_finite and $y->is_finite
1386 48 48 16 $x->is_inf and $y->is_inf
1387 48 0 48 $x->is_inf and not $y->is_inf
1410 62 20 5 $x->{'sign'} eq "+" and $LIB->_is_zero($x->{'_n'})
1531 0 6 510 ref $_[0] && ref $_[0] eq ref $_[1]
1539 84 12 420 $x->is_finite and $y->is_finite
1586 0 5 307 ref $_[0] && ref $_[0] eq ref $_[1]
1596 106 177 29 $x->{'sign'} eq "+" and $x->is_zero
1599 206 41 65 $x->{'sign'} eq "+" and $x->is_zero
1608 0 6 310 ref $_[0] && ref $_[0] eq ref $_[1]
1624 16 16 17 $x->is_positive and $y->is_positive
1625 16 8 8 $x->is_negative and $y->is_negative
1669 0 8 387 ref $_[0] && ref $_[0] eq ref $_[1]
1781 0 0 75 ref $_[0] && ref $_[0] eq ref $_[1]
1844 0 0 0 ref $_[0] && ref $_[0] eq ref $_[1]
1967 0 0 0 ref $_[0] && ref $_[0] eq ref $_[1]
2119 0 6 729 ref $_[0] && ref $_[0] eq ref $_[1]
2142 12 16 12 $x > -1 and $x < 1
2147 12 16 12 $x > -1 and $x < 1
2160 163 140 80 $x->is_negative and not $y->is_int
2180 86 32 48 $x->{'sign'} eq "-" and $LIB->_is_even($y->{'_n'})
2193 0 5 2 ref $_[0] && ref $_[0] eq ref $_[1]
2230 0 0 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2]
2378 0 0 70 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2]
2404 0 0 62 ref $_[0] && ref $_[0] eq ref $_[1]
2436 74 0 0 not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/
2473 8 0 0 defined $base && $base < 1
2480 8 4 0 defined $base && $base < 1
2495 4 0 2 defined builtin::blessed($base) and $base->isa($class)
2722 0 0 0 ref $_[0] && ref $_[0] eq ref $_[1]
2733 0 0 0 $x->is_finite and not $x->is_int
0 0 0 $y->is_finite and not $y->is_int
2750 0 0 0 ref $_[0] && ref $_[0] eq ref $_[1]
2761 0 0 0 $x->is_finite and not $x->is_int
0 0 0 $y->is_finite and not $y->is_int
2847 0 0 0 ref $_[0] && ref $_[0] eq ref $_[1]
2858 0 0 0 $x->is_int and $k->is_int
2946 0 0 0 $x->is_neg && $x->is_even
3020 0 0 0 $x->is_neg && $x->is_even
3032 0 0 0 not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/
3047 0 0 0 ref $b and $b->isa($class)
3063 0 0 0 not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/
3078 0 0 0 ref $b and $b->isa($class)
3104 0 0 0 ref $x and $x->modify("bblsft")
3126 0 0 0 defined builtin::blessed($x) and $x->isa(__PACKAGE__)
3151 0 0 0 ref $x and $x->modify("bbrsft")
3173 0 0 0 defined builtin::blessed($x) and $x->isa(__PACKAGE__)
3372 26 16 8 $x->{'sign'} eq "-" and $LIB->_is_zero($x->{'_n'})
3398 826 0 1 $x->{'sign'} eq "-" and $LIB->_is_zero($x->{'_n'})
3409 0 0 0 @_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i)
3458 0 0 0 @_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i)
3624 6493 0 0 $class->upgrade and not $x->isa($class)
3652 14 0 0 $class->upgrade and not $x->isa($class)
3668 0 0 0 $x->{'sign'} ne "+" and $x->{'sign'} ne "-"
3675 0 0 0 $class->upgrade and not $x->isa(__PACKAGE__)
3686 0 0 0 $x->{'sign'} ne "+" and $x->{'sign'} ne "-"
3693 0 0 0 $class->upgrade and not $x->isa(__PACKAGE__)
3704 1759 16 0 $x->{'sign'} ne "+" and $x->{'sign'} ne "-"
3714 0 0 0 $class->upgrade and not $x->isa(__PACKAGE__)
3736 0 0 0 $class->upgrade and not $x->isa($class)
3805 0 0 0 $class->upgrade and not $x->isa(__PACKAGE__)

or 2 conditions

line l !l condition
1298 217 0 ref $self || $self || __PACKAGE__
3496 36 8 $n || 0

or 3 conditions

line l !l&&r !l&&!r condition
248 0 9958 0 $selfref || $self
262 0 0 9958 @_ == 0 or @_ == 1 and not defined $_[0]
0 0 9958 @_ == 0 or @_ == 1 and not defined $_[0] or @_ == 2 and not defined $_[0] && defined $_[1]
406 67 843 1661 $self->is_int or $self->is_inf
910 658 1003 $self->is_int or $self->is_inf or $self->is_nan
419 0 0 0 $selfref || $self
469 0 3 0 $selfref || $self
525 0 3 0 $selfref || $self
581 0 3 0 $selfref || $self
637 0 0 0 $selfref || $self
665 0 0 0 $selfref || $self
697 0 0 0 $selfref || $self
728 0 0 0 $selfref || $self
742 0 0 0 $base < 2 or not $base->is_int
775 149 3 0 $selfref || $self
831 59 5 0 $selfref || $self
895 204 869 0 $selfref || $self
966 523 656 0 $selfref || $self
1027 0 0 0 $selfref || $self
1100 4080 0 0 $selfref || $self
1257 395 347 0 $sign eq "+" or $sign eq "-"
1338 0 0 16 $x->is_nan or $y->is_nan
1385 16 12 112 $x->is_nan or $y->is_nan
1413 35 25 27 $x->is_int or $x->is_inf
60 5 22 $x->is_int or $x->is_inf or $x->is_nan
1487 4 0 17 $x->is_int or $x->is_inf
4 0 17 $x->is_int or $x->is_inf or $x->is_nan
1520 4 0 17 $x->is_int or $x->is_inf
4 0 17 $x->is_int or $x->is_inf or $x->is_nan
1540 34 26 36 $x->is_nan or $y->is_nan
1616 17 12 287 $x->is_nan or $y->is_nan
1619 33 16 238 $x->is_inf or $y->is_inf
1620 0 0 49 $x->is_zero or $y->is_zero
1631 21 12 205 $x->is_zero or $y->is_zero
1686 10 12 373 $x->is_nan or $y->is_nan
1732 0 0 0 $x->is_zero or $x->bcmp(0) == $y->bcmp(0)
1796 4 4 67 $x->is_nan or $y->is_nan
1817 0 0 0 $x->is_zero or $x->bcmp(0) == $y->bcmp(0)
1861 0 0 0 $x->is_nan or $y->is_nan
1913 0 0 0 $x->is_nan or $x->is_inf
1982 0 0 0 $x->is_nan or $y->is_nan
2058 0 0 0 $x->is_int or $x->is_inf
0 0 0 $x->is_int or $x->is_inf or $x->is_nan
2071 4 4 34 $x->is_zero or $x->is_one
2128 60 56 619 $x->is_nan or $y->is_nan
2165 44 36 223 $x->is_one("+") or $y->is_one
2241 0 0 0 $x->is_nan or $y->is_nan
0 0 0 $x->is_nan or $y->is_nan or $z->is_nan
2457 8 0 14 $base->is_nan or $base->is_one
0 0 14 $base->is_inf or $base->is_zero
2460 0 0 0 $x->is_inf or $x->is_zero
2559 0 0 0 $params[0] or $params[1]
2732 0 0 0 $x->is_nan or $y->is_nan
2733 0 0 0 $x->is_finite and not $x->is_int or $y->is_finite and not $y->is_int
2760 0 0 0 $x->is_nan or $y->is_nan
2761 0 0 0 $x->is_finite and not $x->is_int or $y->is_finite and not $y->is_int
2783 4 0 18 $x->is_nan or $x->is_inf("-")
2785 5 0 13 $x->is_neg or not $x->is_int
2786 1 6 6 $x->is_zero or $x->is_one
2803 0 0 0 $x->is_nan or $x->is_inf("-")
2805 0 0 0 $x <= -2 or not $x->is_int
2826 0 0 0 $x->is_nan or not $x->is_int
2854 0 0 0 $x->is_nan or $x->is_inf("-")
0 0 0 $x->is_nan or $x->is_inf("-") or not $k->is_pos
2859 0 0 0 $k < 1 or $x <= -$k
2890 0 0 0 $x->is_nan or not $x->is_int
2943 0 0 0 $x->is_nan or $x->is_inf("-")
0 0 0 $x->is_nan or $x->is_inf("-") or not $x->is_int
2971 0 0 0 $x->is_nan or not $x->is_int
3017 0 0 0 $x->is_nan or $x->is_inf("-")
0 0 0 $x->is_nan or $x->is_inf("-") or not $x->is_int
3049 0 0 0 $x->is_nan or $y->is_nan
0 0 0 $x->is_nan or $y->is_nan or $b->is_nan
3080 0 0 0 $x->is_nan or $y->is_nan
0 0 0 $x->is_nan or $y->is_nan or $b->is_nan
3191 289 0 0 $xref || $x
3216 289 0 0 $xref || $x
3241 289 0 0 $xref || $x
3266 0 0 0 $xref || $x
3294 4862 945 2060 $x->is_int or $x->is_inf
5807 673 1387 $x->is_int or $x->is_inf or $x->is_nan
3307 5 1 1 $x->is_int or $x->is_inf
6 1 0 $x->is_int or $x->is_inf or $x->is_nan
3320 6 1 1 $x->is_int or $x->is_inf
7 1 0 $x->is_int or $x->is_inf or $x->is_nan
3335 9 77 97 not $x->is_finite or $LIB->_is_one($x->{'_d'})
3361 9 20 50 not $x->is_finite or $LIB->_is_one($x->{'_d'})
3388 25 1190 827 not $x->is_finite or $LIB->_is_one($x->{'_d'})
3409 0 0 0 defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i)
3458 0 0 0 defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i)
3802 0 0 0 $x->is_neg or not $x->is_int