Branch Coverage

blib/lib/Math/BigRat.pm
Criterion Covered Total %
branch 582 1376 42.3


line true false branch
38 0 204 $_[2] ? :
43 0 186 $_[2] ? :
46 0 75 $_[2] ? :
49 0 1 $_[2] ? :
52 0 0 $_[2] ? :
55 0 0 $_[2] ? :
82 0 64 $_[2] ? :
85 0 0 $_[2] ? :
88 0 84 $_[2] ? :
91 0 0 $_[2] ? :
101 0 0 defined $cmp && $_[2] ? :
103 0 3525 $_[2] ? :
126 0 289 $_[2] ? :
131 0 289 $_[2] ? :
136 0 289 $_[2] ? :
171 0 0 $_[2] ? :
190 0 0 $_[0]->is_zero ? :
236 2217 1192 if $_[1] =~ /^Math::Big(Int|Float)/
252 0 9958 if $IMPORT == 0
254 0 9958 if (@_ > 2)
262 0 9958 if (@_ == 0 or @_ == 1 and not defined $_[0] or @_ == 2 and not defined $_[0] && defined $_[1])
281 9942 16 if (@args == 1 and not ref $args[0])
285 5299 4643 if ($args[0] =~ / ^ \s* # optional sign ( [+-]? ) # integer mantissa with optional leading zeros 0* ( [1-9] \d* (?: _ \d+ )* | 0 ) # optional non-negative exponent (?: [eE] \+? ( \d+ (?: _ \d+ )* ) )? \s* $ /x)
305 14 5285 if defined $expo and $mant ne 0
309 1014 4285 $sign eq '-' && $mant ne '0' ? :
316 2074 2569 if ($args[0] =~ m[ ^ \s* # optional leading sign ( [+-]? ) # integer mantissa with optional leading zeros 0* ( [1-9] \d* (?: _ \d+ )* | 0 ) # optional non-negative exponent (?: [eE] \+? ( \d+ (?: _ \d+ )* ) )? # fraction \s* / \s* # non-zero integer mantissa with optional leading zeros 0* ( [1-9] \d* (?: _ \d+ )* ) # optional non-negative exponent (?: [eE] \+? ( \d+ (?: _ \d+ )* ) )? \s* $ ]x)
346 6 2068 if defined $expo1 and $mant1 ne 0
350 7 2067 if defined $expo2 and $mant2 ne 0
354 483 1591 $sign eq '-' && $mant1 ne '0' ? :
358 174 1900 unless ($LIB->_is_one($gcd))
363 159 1915 if $self->is_int
373 92 2489 if (@args == 1 and not ref $args[0] and $args[0] =~ m[ ^ \s* ( \S+ ) \s* / \s* ( \S+ ) \s* $ ]x)
384 2585 0 if (@args >= 1)
385 16 2569 if (ref $args[0] and $args[0]->can('as_rat')) { }
392 92 2479 if (@args >= 2)
393 4 88 if (ref $args[1] and $args[1]->can('as_rat')) { }
400 92 2479 if defined $d
406 1501 1003 if $self->is_int or $self->is_inf or $self->is_nan
423 0 0 if $IMPORT == 0
427 0 0 if $selfref and $self->modify("from_dec")
432 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
436 0 0 unless ($selfref)
446 0 0 if ($expo_sgn eq '+') { }
454 0 0 unless ($LIB->_is_one($gcd))
459 0 0 if $self->is_int
473 0 3 if $IMPORT == 0
477 0 3 if $selfref and $self->modify("from_hex")
482 3 0 if (my(@parts) = $class->_hex_str_to_flt_lib_parts($str))
486 3 0 unless ($selfref)
496 3 0 if ($expo_sgn eq '+') { }
509 0 0 unless ($LIB->_is_one($gcd))
515 3 0 if $self->is_int
529 0 3 if $IMPORT == 0
533 0 3 if $selfref and $self->modify("from_oct")
538 3 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
542 3 0 unless ($selfref)
552 3 0 if ($expo_sgn eq '+') { }
565 0 0 unless ($LIB->_is_one($gcd))
571 3 0 if $self->is_int
585 0 3 if $IMPORT == 0
589 0 3 if $selfref and $self->modify("from_bin")
594 3 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
598 3 0 unless ($selfref)
608 3 0 if ($expo_sgn eq '+') { }
621 0 0 unless ($LIB->_is_one($gcd))
627 3 0 if $self->is_int
641 0 0 if $IMPORT == 0
645 0 0 if $selfref and $self->modify("from_bytes")
652 0 0 unless $selfref
669 0 0 if $IMPORT == 0
673 0 0 if $selfref and $self->modify("from_ieee754")
685 0 0 unless $selfref
690 0 0 if $self->is_int
701 0 0 if $IMPORT == 0
705 0 0 if $selfref and $self->modify("from_fp80")
716 0 0 unless $selfref
721 0 0 if $self->is_int
732 0 0 if $IMPORT == 0
736 0 0 if $selfref and $self->modify("from_base")
740 0 0 unless ref $base
742 0 0 if $base < 2 or not $base->is_int
747 0 0 unless $selfref
752 0 0 unless (defined $cs)
753 0 0 if $base == 2
754 0 0 if $base == 8
755 0 0 if $base == 16
756 0 0 if $base == 10
759 0 0 unless $LIB->can("_from_base")
764 0 0 defined $cs ? :
779 0 152 if $IMPORT == 0
783 0 152 if $selfref and $self->modify("bzero")
788 2 150 if ($dng and $dng ne $class)
789 1 1 if $selfref
799 2 148 unless $selfref
811 0 150 if (@r) { }
812 0 0 if (@r >= 2 and defined $r[0] and defined $r[1])
819 2 148 unless ($selfref)
835 0 64 if $IMPORT == 0
839 0 64 if $selfref and $self->modify("bone")
844 1 63 if ($dng and $dng ne $class)
845 0 1 if $selfref
852 20 43 if (defined $_[0] and $_[0] =~ /^\s*([+-])\s*$/)
863 4 59 unless $selfref
875 16 47 if (@r) { }
876 0 0 if (@r >= 2 and defined $r[0] and defined $r[1])
883 4 43 unless ($selfref)
899 3 1070 if (${"${class}::_trap_inf";})
906 0 1070 if $IMPORT == 0
910 0 1070 if $selfref and $self->modify("binf")
915 1015 55 if (defined $_[0] and $_[0] =~ /^\s*([+-])(inf|$)/i)
927 6 1064 if ($dng and $dng ne $class)
928 5 1 if $selfref
934 868 196 unless $selfref
946 4 1060 if (@r) { }
947 0 0 if (@r >= 2 and defined $r[0] and defined $r[1])
954 868 192 unless ($selfref)
970 3 1176 if (${"${class}::_trap_nan";})
977 0 1176 if $IMPORT == 0
981 0 1176 if $selfref and $self->modify("bnan")
984 9 1167 if ($dng and $dng ne $class)
985 8 1 if $selfref
995 655 512 unless $selfref
1007 0 1167 if (@r) { }
1008 0 0 if (@r >= 2 and defined $r[0] and defined $r[1])
1015 655 512 unless ($selfref)
1032 0 0 if $IMPORT == 0
1036 0 0 if $selfref and $self->modify("bpi")
1040 0 0 unless $selfref
1047 0 0 defined $r[1] ? :
0 0 defined $r[0] ? :
1082 0 0 if $err->copy->babs->ble($tol)
1085 0 0 if $xtmp->is_zero
1104 0 4080 unless $selfref
1111 0 4080 if defined $self->{'accuracy'}
1112 0 4080 if defined $self->{'precision'}
1121 1792 0 ref $_[0] ? :
1131 0 1792 if ($x->isa('Math::BigInt')) { }
1134 16 1776 if ($x->is_inf) { }
8 1768 elsif ($x->is_nan) { }
1158 2 0 ref $_[0] ? :
1169 2 0 if ($x->isa('Math::BigRat')) { }
1173 0 0 if ($x->is_inf) { }
0 0 elsif ($x->is_nan) { }
1197 9 0 ref $_[0] ? :
1208 0 9 if ($x->isa('Math::BigFloat')) { }
1211 0 9 if ($x->is_inf) { }
0 9 elsif ($x->is_nan) { }
1216 9 0 if ($x->isa('Math::BigRat')) { }
1217 7 2 if ($x->is_int) { }
1246 2095 0 ref $_[0] ? :
1248 269 1826 if $x->{'sign'} eq "+" and $LIB->_is_zero($x->{'_n'})
1254 1148 0 ref $_[0] ? :
1256 742 406 if (defined $sign) { }
1257 0 742 unless $sign eq "+" or $sign eq "-"
1263 511 637 if $x->{'sign'} ne $sign
1264 154 483 if $LIB->_is_one($x->{'_n'}) and $LIB->_is_one($x->{'_d'})
1270 100 0 ref $_[0] ? :
1272 16 84 unless $x->is_finite
1273 40 44 if $LIB->_is_one($x->{'_d'}) and $LIB->_is_odd($x->{'_n'})
1279 72 0 ref $_[0] ? :
1281 12 60 unless $x->is_finite
1282 24 36 if $LIB->_is_one($x->{'_d'}) and $LIB->_is_even($x->{'_n'})
1288 15376 0 ref $_[0] ? :
1290 7535 7841 if $x->is_finite and $LIB->_is_one($x->{'_d'})
1302 155 62 if (@_ == 1 and ref $_[0] ne "HASH")
1304 1 154 if $param eq "class"
1305 0 154 if $param eq "with"
1315 48 12 unless (ref $self)
1330 168 32 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1334 0 200 if @r
1336 16 184 unless ($x->is_finite and $y->is_finite)
1338 0 16 if $x->is_nan or $y->is_nan
1340 0 16 if $x->{'sign'} eq $y->{'sign'} and $x->is_inf
1342 8 8 if $x->is_inf("+")
1344 8 0 if $x->is_inf("-")
1346 0 0 if $y->is_inf("+")
1352 56 128 if $x->{'sign'} eq "+" and $y->{'sign'} eq "-"
1354 19 109 if $x->{'sign'} eq "-" and $y->{'sign'} eq "+"
1361 0 109 if $xz and $yz
1362 12 97 if $xz and $y->{'sign'} eq "+"
1363 8 89 if $yz and $x->{'sign'} eq "+"
1369 39 50 if $x->{'sign'} eq "-"
1377 197 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1381 0 197 if @r
1384 140 57 unless ($x->is_finite and $y->is_finite)
1385 28 112 if $x->is_nan or $y->is_nan
1386 16 96 if $x->is_inf and $y->is_inf
1387 48 48 if $x->is_inf and not $y->is_inf
1402 87 0 ref $_[0] ? :
1406 0 87 if $x->modify("bneg")
1410 82 5 unless $x->{'sign'} eq "+" and $LIB->_is_zero($x->{'_n'})
1413 30 22 if $x->is_int or $x->is_inf or $x->is_nan
1419 1268 24 ref $_[0] ? :
1422 0 1292 if (my $c = $LIB->_check($x->{'_n'}))
1425 0 1292 if (my $c = $LIB->_check($x->{'_d'}))
1430 51 1241 unless ($x->is_finite)
1436 155 1086 if ($LIB->_is_zero($x->{'_n'}))
1438 38 117 unless $LIB->_is_one($x->{'_d'})
1444 581 505 if ($LIB->_is_one($x->{'_d'}))
1451 152 353 unless ($LIB->_is_one($gcd))
1461 27 0 ref $_[0] ? :
1465 0 27 if $x->modify("binc")
1467 6 21 unless ($x->is_finite)
1473 12 9 if ($x->{'sign'} eq '-') { }
1474 8 4 if ($LIB->_acmp($x->{'_n'}, $x->{'_d'}) < 0) { }
1487 0 17 if $x->is_int or $x->is_inf or $x->is_nan
1493 27 0 ref $_[0] ? :
1497 0 27 if $x->modify("bdec")
1499 6 21 unless ($x->is_finite)
1505 4 17 if ($x->{'sign'} eq '-') { }
1508 9 8 if ($LIB->_acmp($x->{'_n'}, $x->{'_d'}) < 0) { }
1520 0 17 if $x->is_int or $x->is_inf or $x->is_nan
1531 510 6 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1537 0 516 if $x->modify("badd")
1539 96 420 unless ($x->is_finite and $y->is_finite)
1540 60 36 if ($x->is_nan or $y->is_nan) { }
17 19 elsif ($x->is_inf('+')) { }
17 2 elsif ($x->is_inf('-')) { }
2 0 elsif ($y->is_inf('+')) { }
0 0 elsif ($y->is_inf('-')) { }
1543 8 9 if $y->is_inf("-")
1546 8 9 if $y->is_inf("+")
1586 307 5 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1592 0 312 if $x->modify("bsub")
1596 283 29 unless $x->{'sign'} eq "+" and $x->is_zero
1599 247 65 unless $x->{'sign'} eq "+" and $x->is_zero
1608 310 6 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1614 0 316 if $x->modify("bmul")
1616 29 287 if $x->is_nan or $y->is_nan
1619 49 238 if ($x->is_inf or $y->is_inf)
1620 0 49 if $x->is_zero or $y->is_zero
1624 17 32 if $x->is_positive and $y->is_positive
1625 8 24 if $x->is_negative and $y->is_negative
1629 0 238 if $class->upgrade
1631 33 205 if ($x->is_zero or $y->is_zero)
1653 157 48 $x->{'sign'} eq $y->{'sign'} ? :
1657 131 74 if $x->is_int
1669 387 8 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1679 0 395 if $x->modify("bfdiv")
1686 22 373 if ($x->is_nan or $y->is_nan)
1687 0 22 $wantarray ? :
1695 36 337 if ($y->is_zero)
1697 12 24 if ($wantarray)
1699 12 0 if $rem->is_int
1701 10 26 if ($x->is_zero) { }
1706 12 20 $wantarray ? :
1713 20 317 if ($x->is_inf)
1715 0 20 if $wantarray
1716 4 16 if ($y->is_inf) { }
1719 8 8 $x->bcmp(0) == $y->bcmp(0) ? :
1722 0 20 $wantarray ? :
1729 24 293 if ($y->is_inf)
1731 0 24 if ($wantarray) { }
1732 0 0 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
1734 0 0 if $rem->is_int
1743 0 24 $wantarray ? :
1760 223 70 $x->{'sign'} eq $y->{'sign'} ? :
1763 28 265 if ($wantarray)
1768 28 0 if $x->is_int
1769 20 8 if $rem->is_int
1773 148 117 if $x->is_int
1781 75 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1791 0 75 if $x->modify("bfmod")
1796 8 67 if ($x->is_nan or $y->is_nan)
1802 0 67 if ($y->is_zero)
1809 0 67 if ($x->is_inf)
1816 0 67 if ($y->is_inf)
1817 0 0 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
1818 0 0 if $x->is_int
1828 0 67 if ($x->is_zero)
1844 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1854 0 0 if $x->modify("btdiv")
1861 0 0 if ($x->is_nan or $y->is_nan)
1862 0 0 $wantarray ? :
1870 0 0 if ($y->is_zero)
1872 0 0 if ($wantarray)
1874 0 0 if $rem->is_int
1876 0 0 if ($x->is_zero) { }
1881 0 0 $wantarray ? :
1888 0 0 if ($x->is_inf)
1890 0 0 if $wantarray
1891 0 0 if ($y->is_inf) { }
1894 0 0 $x->bcmp(0) == $y->bcmp(0) ? :
1897 0 0 $wantarray ? :
1904 0 0 if ($y->is_inf)
1906 0 0 if ($wantarray) { }
1908 0 0 if $rem->is_int
1912 0 0 if ($y->is_inf)
1913 0 0 if ($x->is_nan or $x->is_inf) { }
1922 0 0 if ($x->is_zero)
1924 0 0 if $x->is_int
1925 0 0 if ($wantarray)
1946 0 0 $x->{'sign'} eq $y->{'sign'} ? :
1949 0 0 if ($wantarray)
1954 0 0 if $x->is_int
1955 0 0 if $rem->is_int
1959 0 0 if $x->is_int
1967 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1977 0 0 if $x->modify("btmod")
1982 0 0 if ($x->is_nan or $y->is_nan)
1988 0 0 if ($y->is_zero)
1995 0 0 if ($x->is_inf)
2002 0 0 if ($y->is_inf)
2003 0 0 if $x->is_int
2010 0 0 if ($x->is_zero)
2045 0 0 ref $_[0] ? :
2049 0 0 if $x->modify("binv")
2051 0 0 if $x->is_nan
2052 0 0 if $x->is_inf
2053 0 0 if $x->is_zero
2058 0 0 if $x->is_int or $x->is_inf or $x->is_nan
2063 59 0 ref $_[0] ? :
2067 0 59 if $x->modify("bsqrt")
2069 13 46 unless $x->{'sign'} =~ /^[+]/
2070 4 42 if $x->is_inf("+")
2071 8 34 if $x->is_zero or $x->is_one
2084 32 2 if ($LIB->_acmp($n, $n2) == 0)
2087 31 1 if ($LIB->_acmp($d, $d2) == 0)
2119 729 6 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2125 0 735 if $x->modify("bpow")
2128 116 619 if $x->is_nan or $y->is_nan
2131 52 567 if ($x->is_inf('-')) { }
52 515 elsif ($x->is_inf('+')) { }
44 471 elsif ($y->is_inf('-')) { }
44 427 elsif ($y->is_inf('+')) { }
2132 24 28 if $y->is_negative
2133 4 24 if $y->is_zero
2134 8 16 if $y->is_odd
2137 24 28 if $y->is_negative
2138 4 24 if $y->is_zero
2141 4 40 if $x->is_one("-")
2142 12 28 if $x > -1 and $x < 1
2143 4 24 if $x->is_one("+")
2146 4 40 if $x->is_one("-")
2147 12 28 if $x > -1 and $x < 1
2148 4 24 if $x->is_one("+")
2152 44 383 if ($x->is_zero)
2153 4 40 if $y->is_zero
2154 20 20 if $y->is_negative
2160 80 303 if ($x->is_negative and not $y->is_int)
2161 0 80 if $class->upgrade
2165 80 223 if ($x->is_one("+") or $y->is_one)
2169 24 199 if ($x->is_one("-"))
2170 12 12 if $y->is_odd
2175 96 103 if $y->is_negative
2177 166 33 unless ($LIB->_is_one($y->{'_n'}))
2180 48 118 if $x->{'sign'} eq "-" and $LIB->_is_even($y->{'_n'})
2183 2 197 unless ($LIB->_is_one($y->{'_d'}))
2184 1 1 if $LIB->_is_two($y->{'_d'})
2193 2 5 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2199 0 7 if $x->modify("broot")
2230 0 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
2237 0 0 if $x->modify("bmuladd")
2241 0 0 if $x->is_nan or $y->is_nan or $z->is_nan
2247 0 0 if ($x->is_inf('-')) { }
0 0 elsif ($x->is_inf('+')) { }
0 0 elsif ($x->is_neg) { }
0 0 elsif ($x->is_zero) { }
0 0 elsif ($x->is_pos) { }
2249 0 0 if ($y->is_neg) { }
0 0 elsif ($y->is_zero) { }
2250 0 0 if ($z->is_inf('-')) { }
2258 0 0 if ($z->is_inf('+')) { }
2267 0 0 if ($y->is_neg) { }
0 0 elsif ($y->is_zero) { }
2268 0 0 if ($z->is_inf('+')) { }
2276 0 0 if ($z->is_inf('-')) { }
2285 0 0 if ($y->is_inf('-')) { }
0 0 elsif ($y->is_inf('+')) { }
2286 0 0 if ($z->is_inf('-')) { }
2292 0 0 if ($z->is_inf('+')) { }
2298 0 0 if ($z->is_inf('-')) { }
0 0 elsif ($z->is_inf('+')) { }
2307 0 0 if ($y->is_inf('-')) { }
0 0 elsif ($y->is_inf('+')) { }
2312 0 0 if ($z->is_inf('-')) { }
0 0 elsif ($z->is_inf('+')) { }
2321 0 0 if ($y->is_inf('-')) { }
0 0 elsif ($y->is_inf('+')) { }
2322 0 0 if ($z->is_inf('+')) { }
2328 0 0 if ($z->is_inf('-')) { }
2334 0 0 if ($z->is_inf('-')) { }
0 0 elsif ($z->is_inf('+')) { }
2365 0 0 $x->{'sign'} eq $y->{'sign'} ? :
2378 70 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
2385 0 70 if $x->modify("bmodpow")
2404 62 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2410 0 62 if $x->modify("bmodinv")
2436 0 74 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
2438 0 0 defined $_[2] ? :
2442 34 40 defined $_[1] ? :
2448 0 74 if $x->modify("blog")
2453 20 54 if $x->is_nan
2455 22 32 if (defined $base)
2456 0 22 unless ref $base
2457 8 14 if ($base->is_nan or $base->is_one) { }
0 14 elsif ($base->is_inf or $base->is_zero) { }
8 6 elsif ($base->is_negative) { }
2460 0 0 if $x->is_inf or $x->is_zero
2463 0 8 if $x->is_one
2464 0 8 if $x == $base
2467 0 6 if $x == $base
2472 8 30 if ($x->is_inf) { }
8 22 elsif ($x->is_neg) { }
4 18 elsif ($x->is_one) { }
12 6 elsif ($x->is_zero) { }
2473 0 8 defined $base && $base < 1 ? :
2480 0 12 defined $base && $base < 1 ? :
2491 0 6 if ($x->numerator->is_one)
2495 2 4 if (defined builtin::blessed($base) and $base->isa($class))
2496 0 2 if ($base->numerator->is_one)
2512 2 4 if defined $base
2527 0 6 $neg ? :
2532 1 0 ref $_[0] ? :
2536 0 1 if $x->modify("bexp")
2538 0 1 if $x->is_inf("+")
2539 0 1 if $x->is_inf("-")
2547 0 1 if $x->is_nan
2550 1 0 if (scalar @params == 0) { }
2562 0 1 if $x->is_zero
2568 1 0 if ($scale <= 75) { }
2603 1 0 if (not $x_org->is_one) { }
2610 0 0 if (defined $params[0]) { }
2616 1 0 if ($fallback)
2625 0 0 ref $_[0] ? :
2629 0 0 if $x->modify("bilog2")
2631 0 0 if $x->is_nan
2632 0 0 if $x->is_inf("+")
2633 0 0 if $x->is_zero
2635 0 0 if ($x->is_neg)
2636 0 0 if $class->upgrade
2649 0 0 ref $_[0] ? :
2653 0 0 if $x->modify("bilog10")
2655 0 0 if $x->is_nan
2656 0 0 if $x->is_inf("+")
2657 0 0 if $x->is_zero
2659 0 0 if ($x->is_neg)
2660 0 0 if $class->upgrade
2673 0 0 ref $_[0] ? :
2677 0 0 if $x->modify("bclog2")
2679 0 0 if $x->is_nan
2680 0 0 if $x->is_inf("+")
2681 0 0 if $x->is_zero
2683 0 0 if ($x->is_neg)
2684 0 0 if $class->upgrade
2697 0 0 ref $_[0] ? :
2701 0 0 if $x->modify("bclog10")
2703 0 0 if $x->is_nan
2704 0 0 if $x->is_inf("+")
2705 0 0 if $x->is_zero
2707 0 0 if ($x->is_neg)
2708 0 0 if $class->upgrade
2722 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2726 0 0 if @r
2730 0 0 if $x->modify("bnok")
2732 0 0 if $x->is_nan or $y->is_nan
2733 0 0 if $x->is_finite and not $x->is_int or $y->is_finite and not $y->is_int
2750 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2754 0 0 if @r
2758 0 0 if $x->modify("bperm")
2760 0 0 if $x->is_nan or $y->is_nan
2761 0 0 if $x->is_finite and not $x->is_int or $y->is_finite and not $y->is_int
2777 22 0 ref $_[0] ? :
2781 0 22 if $x->modify("bfac")
2783 4 18 if $x->is_nan or $x->is_inf("-")
2784 0 18 if $x->is_inf("+")
2785 5 13 if $x->is_neg or not $x->is_int
2786 7 6 if $x->is_zero or $x->is_one
2797 0 0 ref $_[0] ? :
2801 0 0 if $x->modify("bdfac")
2803 0 0 if $x->is_nan or $x->is_inf("-")
2804 0 0 if $x->is_inf("+")
2805 0 0 if $x <= -2 or not $x->is_int
2806 0 0 if $x <= 1
2808 0 0 unless $LIB->can("_dfac")
2820 0 0 ref $_[0] ? :
2824 0 0 if $x->modify("btfac")
2826 0 0 if $x->is_nan or not $x->is_int
2827 0 0 if $x->is_inf("+")
2830 0 0 if $x <= -$k
2833 0 0 if $x <= $one
2847 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2852 0 0 if $x->modify("bmfac")
2854 0 0 if $x->is_nan or $x->is_inf("-") or not $k->is_pos
2856 0 0 if $x->is_inf("+")
2857 0 0 if $k->is_inf("+")
2858 0 0 unless $x->is_int and $k->is_int
2859 0 0 if $k < 1 or $x <= -$k
2862 0 0 if $x <= $one
2875 0 0 ref $_[0] ? :
2877 0 0 unless $LIB->can("_fib")
2882 0 0 if $x->modify("bfib")
2886 0 0 if (wantarray) { }
2887 0 0 if $x->is_inf
2890 0 0 if $x->is_nan or not $x->is_int
2902 0 0 if $n == 0
2907 0 0 if $n == 1
2917 0 0 if ($x->is_neg)
2942 0 0 if $x->is_inf("+")
2943 0 0 if $x->is_nan or $x->is_inf("-") or not $x->is_int
2946 0 0 $x->is_neg && $x->is_even ? :
2956 0 0 ref $_[0] ? :
2958 0 0 unless $LIB->can("_lucas")
2963 0 0 if $x->modify("blucas")
2967 0 0 if (wantarray) { }
2968 0 0 if $x->is_inf
2971 0 0 if $x->is_nan or not $x->is_int
2982 0 0 if $n == 0
2986 0 0 if $n == 1
2996 0 0 if ($x->is_neg)
3016 0 0 if $x->is_inf("+")
3017 0 0 if $x->is_nan or $x->is_inf("-") or not $x->is_int
3020 0 0 $x->is_neg && $x->is_even ? :
3032 0 0 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
3034 0 0 defined $_[3] ? :
3038 0 0 defined $_[2] ? :
3044 0 0 if $x->modify("blsft")
3046 0 0 unless defined $b
3047 0 0 unless ref $b and $b->isa($class)
3049 0 0 if $x->is_nan or $y->is_nan or $b->is_nan
3052 0 0 if $y->{'sign'} =~ /^-/
3063 0 0 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
3065 0 0 defined $_[3] ? :
3069 0 0 defined $_[2] ? :
3075 0 0 if $x->modify("brsft")
3077 0 0 unless defined $b
3078 0 0 unless ref $b and $b->isa($class)
3080 0 0 if $x->is_nan or $y->is_nan or $b->is_nan
3083 0 0 if $y->{'sign'} =~ /^-/
3100 0 0 ref $_[0] ? :
3104 0 0 if ref $x and $x->modify("bblsft")
3126 0 0 if (defined builtin::blessed($x) and $x->isa(__PACKAGE__)) { }
3147 0 0 ref $_[0] ? :
3151 0 0 if ref $x and $x->modify("bbrsft")
3173 0 0 if (defined builtin::blessed($x) and $x->isa(__PACKAGE__)) { }
3195 0 289 if $x->modify("band")
3197 0 289 unless $xref
3198 0 289 if @_ < 1
3201 0 289 unless ref $y
3220 0 289 if $x->modify("bior")
3222 0 289 unless $xref
3223 0 289 if @_ < 1
3226 0 289 unless ref $y
3245 0 289 if $x->modify("bxor")
3247 0 289 unless $xref
3248 0 289 if @_ < 1
3251 0 289 unless ref $y
3270 0 0 if $x->modify("bnot")
3272 0 0 unless $xref
3292 0 7867 if $x->modify("round")
3294 1618 1387 if $x->is_int or $x->is_inf or $x->is_nan
3305 0 7 if $x->modify("bround")
3307 2 0 if $x->is_int or $x->is_inf or $x->is_nan
3318 0 8 if $x->modify("bfround")
3320 2 0 if $x->is_int or $x->is_inf or $x->is_nan
3327 188 0 ref $_[0] ? :
3331 0 188 if $x->modify("bfloor")
3333 5 183 if $x->is_nan
3335 86 97 if (not $x->is_finite or $LIB->_is_one($x->{'_d'}))
3345 44 53 if $x->{'sign'} eq "-"
3353 84 0 ref $_[0] ? :
3357 0 84 if $x->modify("bceil")
3359 5 79 if $x->is_nan
3361 29 50 if (not $x->is_finite or $LIB->_is_one($x->{'_d'}))
3371 26 24 if $x->{'sign'} eq "+"
3372 8 42 if $x->{'sign'} eq "-" and $LIB->_is_zero($x->{'_n'})
3380 2107 0 ref $_[0] ? :
3384 0 2107 if $x->modify("bint")
3386 65 2042 if $x->is_nan
3388 1215 827 if (not $x->is_finite or $LIB->_is_one($x->{'_d'}))
3398 1 826 if $x->{'sign'} eq "-" and $LIB->_is_zero($x->{'_n'})
3409 0 0 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i))
3423 0 0 unless $arg->is_finite
3442 0 0 if $x->is_one
3450 0 0 if $x->is_int
3458 0 0 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i))
3472 0 0 unless $arg->is_finite
3476 0 0 if $arg->is_zero
3493 44 0 ref $_[0] ? :
3495 0 44 unless $x->is_int
3500 20 0 ref $_[0] ? :
3502 0 20 unless $x->is_int
3507 40 0 ref $_[0] ? :
3511 4 36 if $x->is_nan
3512 4 32 if $x->is_inf("+")
3513 4 28 if $x->is_inf("-")
3525 0 0 unless $class
3527 0 0 if ($x->is_nan)
3528 0 0 if wantarray
3532 0 0 if ($x->is_inf)
3533 0 0 if wantarray
3542 0 0 unless wantarray
3556 0 2 if ($x->is_nan)
3557 0 0 if wantarray
3563 0 2 if ($x->is_inf)
3564 0 0 if wantarray
3572 0 2 unless wantarray
3585 52 0 ref $_[0] ? :
3588 21 31 unless $x->is_finite
3596 48 0 ref $_[0] ? :
3599 11 37 if $x->is_nan
3601 10 27 unless $x->is_finite
3611 7497 0 ref $_[0] ? :
3613 0 7497 if @r
3617 1004 6493 unless ($x->is_finite)
3618 769 235 unless $x->is_inf("+")
3624 0 6493 if $class->upgrade and not $x->isa($class)
3630 383 6110 if $x->{'sign'} ne "+"
3632 383 6110 $x->{'sign'} eq '-' ? :
3634 2086 4407 unless $LIB->_is_one($x->{'_d'})
3639 26 0 ref $_[0] ? :
3641 0 26 if @r
3645 12 14 unless ($x->is_finite)
3646 8 4 unless $x->is_inf("+")
3652 0 14 if $class->upgrade and not $x->isa($class)
3657 1 13 $x->{'sign'} eq '-' ? :
3659 6 8 unless $LIB->_is_one($x->{'_d'})
3664 0 0 ref $_[0] ? :
3668 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
3669 0 0 unless $x->is_inf("+")
3675 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
3682 0 0 ref $_[0] ? :
3686 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
3687 0 0 unless $x->is_inf("+")
3693 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
3700 1775 0 ref $_[0] ? :
3704 0 1775 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
3705 0 0 unless $x->is_inf("+")
3710 16 1759 $x->{'sign'} eq '-' ? :
1775 0 if $x->is_int
3714 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
3723 0 0 ref $_[0] ? :
3725 0 0 if @r
3729 0 0 unless ($x->is_finite)
3730 0 0 unless $x->is_inf("+")
3736 0 0 if $class->upgrade and not $x->isa($class)
3741 0 0 $x->{'sign'} eq '-' ? :
3743 0 0 unless $LIB->_is_one($x->{'_d'})
3748 0 0 ref $_[0] ? :
3752 0 0 unless ($x->is_finite)
3753 0 0 unless $x->is_inf("+")
3757 0 0 unless $x->is_int
3760 0 0 $x->{'sign'} eq '-' ? :
3764 0 0 ref $_[0] ? :
3768 0 0 unless ($x->is_finite)
3769 0 0 unless $x->is_inf("+")
3773 0 0 unless $x->is_int
3776 0 0 $x->{'sign'} eq '-' ? :
3780 0 0 ref $_[0] ? :
3784 0 0 unless ($x->is_finite)
3785 0 0 unless $x->is_inf("+")
3789 0 0 unless $x->is_int
3792 0 0 $x->{'sign'} eq '-' ? :
3798 0 0 ref $_[0] ? :
3800 0 0 if @r
3802 0 0 if $x->is_neg or not $x->is_int
3805 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
3808 0 0 unless $LIB->can("_to_bytes")
3815 0 0 ref $_[0] ? :
3818 0 0 if @r
3824 0 0 ref $_[0] ? :
3831 2 0 ref $_[0] ? :
3833 0 2 unless $x->is_int
3835 2 0 if $s eq "+"
3840 2 0 ref $_[0] ? :
3842 0 2 unless $x->is_int
3844 2 0 if $s eq "+"
3849 2 0 ref $_[0] ? :
3851 0 2 unless $x->is_int
3854 2 0 if $s eq "+"
3860 39 0 ref $_[0] ? :
3864 1 38 if ($x->is_nan)
3870 2 36 if ($x->is_inf)
3873 1 1 $x->is_negative ? :
3881 15 21 $LIB->_is_one($x->{'_d'}) ? :
3883 3 33 $x->{'sign'} eq '-' ? :
3901 0 4 if ($param eq ":constant")
3915 0 0 if $_[0] =~ /^0_*[0-7]/
3923 0 4 if ($param eq "upgrade")
3930 1 3 if ($param eq "downgrade")
3937 0 3 if ($param eq "accuracy")
3944 0 3 if ($param eq "precision")
3951 0 3 if ($param eq "round_mode")
3958 0 3 if ($param eq "div_scale")
3965 3 0 if ($param =~ /^(lib|try|only)\z/)
3967 3 0 if @_
3971 0 0 if ($param eq "with")
3991 0 18 if @a