Branch Coverage

blib/lib/Math/BigInt.pm
Criterion Covered Total %
branch 1352 2528 53.4


line true false branch
52 56 298 $_[2] ? :
57 3 336 $_[2] ? :
60 3 350 $_[2] ? :
63 3 436 $_[2] ? :
66 0 20 $_[2] ? :
69 0 20 $_[2] ? :
96 0 318 $_[2] ? :
99 4 614 $_[2] ? :
102 0 506 $_[2] ? :
105 0 140 $_[2] ? :
115 0 0 defined $cmp && $_[2] ? :
117 0 8098 $_[2] ? :
140 3 137 $_[2] ? :
145 3 198 $_[2] ? :
150 3 196 $_[2] ? :
185 0 0 $_[2] ? :
204 3 3 $_[0]->is_zero ? :
281 1205 76221 if (@_) { }
284 503 702 if (defined $a)
285 0 0 $a->can('numify') ? :
0 503 if ref $a
286 0 503 unless $a =~ /^\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\s*\z/
288 0 503 if $a != int $a
292 518 687 if (ref $x) { }
293 450 68 if defined $a
306 113 76108 if (ref $x) { }
321 1285 86005 if (@_) { }
324 230 1055 if (defined $p)
325 0 0 $p->can('numify') ? :
0 230 if ref $p
326 0 230 unless $p =~ /^\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\s*\z/
328 0 230 if $p != int $p
332 219 1066 if (ref $x) { }
333 170 49 if defined $p
346 114 85891 if (ref $x) { }
361 382 50240 if (@_) { }
363 0 382 unless defined $m
365 4 378 unless $m =~ /^(even|odd|\+inf|\-inf|zero|trunc|common)$/
368 0 378 if (ref $self and exists $self->{'round_mode'}) { }
379 0 50240 if (ref $self and exists $self->{'round_mode'}) { }
384 50240 0 defined $m ? :
395 31 1206 if (@_) { }
397 0 31 unless defined $f
398 0 0 $f->can('numify') ? :
0 31 if ref $f
400 0 31 unless $f =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
402 0 31 if $f != int $f
407 0 31 if $f < 0
409 0 31 if (ref $self and exists $self->{'div_scale'}) { }
420 0 1206 if (ref $self and exists $self->{'div_scale'}) { }
425 1206 0 defined $f ? :
436 22 185 if (@_) { }
437 13 9 shift() ? :
438 0 22 if (ref $self and exists $self->{'trap_inf'}) { }
449 0 185 if (ref $self and exists $self->{'trap_inf'}) { }
464 34 194 if (@_) { }
465 19 15 shift() ? :
466 0 34 if (ref $self and exists $self->{'trap_nan'}) { }
477 0 194 if (ref $self and exists $self->{'trap_nan'}) { }
492 15126 65585 if (@_) { }
494 0 15126 if (ref $self and exists $self->{'upgrade'}) { }
505 0 65585 if (ref $self and exists $self->{'upgrade'}) { }
520 45877 102396 if (@_) { }
522 0 45877 if (ref $self and exists $self->{'downgrade'}) { }
533 0 102396 if (ref $self and exists $self->{'downgrade'}) { }
560 166 753 if (@_ > 1 or @_ == 1 and ref $_[0] eq "HASH")
566 51 115 ref $_[0] eq 'HASH' ? :
576 0 166 if defined $args->{'accuracy'} and defined $args->{'precision'}
578 18 148 if (defined $args->{'accuracy'}) { }
24 124 elsif (defined $args->{'precision'}) { }
598 128 868 if exists $args->{$key}
604 6 160 if (keys %$args)
617 743 170 if (@_ == 1 and ref $_[0] ne 'HASH') { }
620 289 454 if $param eq "lib"
621 3 451 if $param eq "lib_version"
622 1 450 if $param eq "class"
623 3 447 if $param eq "version"
632 36 134 if (ref $self) { }
670 4574 72636 unless defined $scale
674 13407 63803 unless defined $mode
676 72639 4571 if (defined $scale)
677 462 0 $scale->can('numify') ? :
462 72177 if ref $scale
690 4 971 unless defined $scale
694 4 971 unless defined $scale
695 724 251 unless defined $mode
697 971 4 if (defined $scale)
698 0 0 $scale->can('numify') ? :
0 971 if ref $scale
713 59795 141 unless $downgrade
714 0 141 if ref $self eq $downgrade
733 92 190 if exists $self->{$param}
749 0 74 unless $upgrade
750 0 74 if ref $self eq $upgrade
769 4 144 if exists $self->{$param}
786 0 9 if "SUPER"->can("_init")
813 1 22381 if $IMPORT == 0
818 8 22374 unless @_
822 0 22374 unless (defined $wanted)
828 4 22370 if (not ref $wanted and $wanted eq "")
848 1 22369 if (defined builtin::blessed($wanted) and $wanted->isa(__PACKAGE__))
855 0 0 unless @r >= 2 and not defined $r[0] and not defined $r[1]
867 18009 4360 if ($wanted =~ / ^ # optional leading whitespace \s* # optional sign ( [+-]? ) # integer mantissa with optional leading zeros 0* ( [1-9] \d* (?: _ \d+ )* | 0 ) # ... with optional zero fraction part (?: \.0* )? # optional non-negative exponent (?: [eE] \+? ( \d+ (?: _ \d+ )* ) )? # optional trailing whitespace \s* $ /x)
894 74 17935 if defined $expo and $mant ne 0
896 2991 15018 $sign eq '-' && $mant ne '0' ? :
904 1838 2522 if ($wanted =~ / ^ \s* ( [+-]? ) inf (?: inity )? \s* \z /xi)
918 494 2028 if ($wanted =~ / ^ \s* ( [+-]? ) nan \s* \z /xi)
931 118 643 if ($wanted =~ /^\s*[+-]?0?[Xx]/ and @parts = $class->_hex_str_to_flt_lib_parts($wanted) or $wanted =~ /^\s*[+-]?0?[Oo]/ and @parts = $class->_oct_str_to_flt_lib_parts($wanted) or $wanted =~ /^\s*[+-]?0?[Bb]/ and @parts = $class->_bin_str_to_flt_lib_parts($wanted) or @parts = $class->_dec_str_to_flt_lib_parts($wanted) or $wanted =~ /^\s*[+-]?0_*\d/ and @parts = $class->_oct_str_to_flt_lib_parts($wanted))
976 1340 45 if ($parts[2] eq "+")
979 0 0 unless @r >= 2 and not defined $r[0] and not defined $r[1]
987 10 35 if $upg
1007 0 0 if $IMPORT == 0
1011 0 0 if $selfref and $self->modify("from_dec")
1016 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
1020 0 0 unless ($selfref)
1027 0 0 if ($parts[2] eq "+")
1036 0 0 if ($upg)
1037 0 0 if $selfref and $selfref ne $upg
1055 0 2 if $IMPORT == 0
1059 0 2 if $selfref and $self->modify("from_hex")
1064 2 0 if (my(@parts) = $class->_hex_str_to_flt_lib_parts($str))
1068 2 0 unless ($selfref)
1075 2 0 if ($parts[2] eq "+")
1084 0 0 if ($upg)
1085 0 0 if $selfref and $selfref ne $upg
1103 0 2 if $IMPORT == 0
1107 0 2 if $selfref and $self->modify("from_oct")
1112 2 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
1116 2 0 unless ($selfref)
1123 2 0 if ($parts[2] eq "+")
1132 0 0 if ($upg)
1133 0 0 if $selfref and $selfref ne $upg
1151 0 53 if $IMPORT == 0
1155 0 53 if $selfref and $self->modify("from_bin")
1160 53 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
1164 53 0 unless ($selfref)
1171 53 0 if ($parts[2] eq "+")
1180 0 0 if ($upg)
1181 0 0 if $selfref and $selfref ne $upg
1199 0 0 if $IMPORT == 0
1203 0 0 if $selfref and $self->modify("from_bytes")
1205 0 0 unless $LIB->can("_from_bytes")
1213 0 0 unless $selfref
1226 0 0 if $IMPORT == 0
1230 0 0 if $selfref and $self->modify("from_ieee754")
1238 0 0 unless $tmp->is_inf or $tmp->is_int
1243 0 0 unless $selfref
1257 0 0 if $IMPORT == 0
1261 0 0 if $selfref and $self->modify("from_fp80")
1268 0 0 unless $tmp->is_inf or $tmp->is_int
1273 0 0 unless $selfref
1287 0 0 if $IMPORT == 0
1291 0 0 if $selfref and $self->modify("from_base")
1295 0 0 unless ref $base
1297 0 0 if $base < 2 or not $base->is_int
1302 0 0 unless $selfref
1307 0 0 unless (defined $cs)
1308 0 0 if $base == 2
1309 0 0 if $base == 8
1310 0 0 if $base == 16
1311 0 0 if $base == 10
1314 0 0 unless $LIB->can("_from_base")
1319 0 0 defined $cs ? :
1330 0 0 if $IMPORT == 0
1334 0 0 if $selfref and $self->modify("from_base_num")
1343 0 0 unless defined builtin::blessed($nums->[$i]) and $nums->[$i]->isa(__PACKAGE__)
1347 0 0 if $nums->[$i]->is_neg or not $nums->[$i]->is_int
1352 0 0 unless defined builtin::blessed($base) and $base->isa(__PACKAGE__)
1359 0 0 unless $selfref
1361 0 0 unless $LIB->can("_from_base_num")
1375 0 1917 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1389 0 1917 if $IMPORT == 0
1393 0 1917 if $selfref and $self->modify("bzero")
1401 1474 443 unless ($selfref)
1413 18 1899 if (@r) { }
1468 431 elsif (not $selfref) { }
1414 0 15 if (@r >= 2 and defined $r[0] and defined $r[1])
1432 0 499 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1446 0 499 if $IMPORT == 0
1450 0 499 if $selfref and $self->modify("bone")
1456 104 395 if (defined $_[0] and $_[0] =~ /^\s*([+-])\s*$/) { }
1465 287 212 unless ($selfref)
1477 18 481 if (@r) { }
281 200 elsif (not $selfref) { }
1478 0 15 if (@r >= 2 and defined $r[0] and defined $r[1])
1496 0 2353 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1510 5 2348 if (${"${class}::_trap_inf";})
1517 0 2348 if $IMPORT == 0
1521 0 2348 if $selfref and $self->modify("binf")
1526 2289 59 if (defined $_[0] and $_[0] =~ /^\s*([+-])(inf|$)/i)
1537 1913 435 unless ($selfref)
1549 143 2205 if (@r) { }
1897 308 elsif (not $selfref) { }
1550 0 143 if (@r >= 2 and defined $r[0] and defined $r[1])
1568 0 2454 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1582 5 2449 if (${"${class}::_trap_nan";})
1589 0 2449 if $IMPORT == 0
1593 0 2449 if $selfref and $self->modify("bnan")
1601 1350 1099 unless ($selfref)
1613 227 2222 if (@r) { }
1348 874 elsif (not $selfref) { }
1614 0 225 if (@r >= 2 and defined $r[0] and defined $r[1])
1631 0 9 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1664 0 9 if $IMPORT == 0
1666 0 9 if ($selfref) { }
1667 0 0 if $self->modify("bpi")
1674 0 9 if ($upg)
1675 0 0 if $selfref and $selfref ne $upg
1689 4209 0 if (ref $_[0]) { }
1697 0 4209 if @_
1703 300 3909 if exists $x->{'accuracy'}
1704 279 3930 if exists $x->{'precision'}
1710 5 0 ref $_[0] ? :
1720 5 0 if ($x->isa('Math::BigInt')) { }
1723 0 0 if ($x->is_inf) { }
0 0 elsif ($x->is_nan) { }
1747 889 0 ref $_[0] ? :
1758 0 889 if ($x->isa('Math::BigRat')) { }
1762 0 889 if ($x->is_inf) { }
0 889 elsif ($x->is_nan) { }
1786 470 0 ref $_[0] ? :
1797 0 470 if ($x->isa('Math::BigFloat')) { }
1800 4 466 if ($x->is_inf) { }
0 466 elsif ($x->is_nan) { }
1805 0 466 if ($x->isa('Math::BigRat')) { }
1806 0 0 if ($x->is_int) { }
1839 36052 4 ref $_[0] ? :
1841 3522 32534 if $x->{'sign'} ne "+"
1842 503 32031 if $LIB->_is_zero($x->{'value'})
1848 2422 4 ref $_[0] ? :
1850 1832 594 if (defined $sign) { }
1851 0 1832 unless $sign eq "+" or $sign eq "-"
1857 957 1469 if $x->{'sign'} ne $sign
1858 186 1283 $LIB->_is_one($x->{'value'}) ? :
1862 262811 0 ref $_[0] ? :
1863 256735 6076 $x->{'sign'} eq '+' || $x->{'sign'} eq '-' ? :
1868 121286 8 ref $_[0] ? :
1870 44340 76954 if (defined $sign)
1871 64 44276 if $sign eq ""
1872 44276 64 if $sign =~ /^([+-])(inf)?$/
1873 3110 41230 $x->{'sign'} =~ /^$sign$/ ? :
1875 3946 73008 $x->{'sign'} =~ /^[+-]inf$/ ? :
1880 152626 8 ref $_[0] ? :
1882 3708 148926 $x->{'sign'} eq $nan ? :
1887 820 8 ref $_[0] ? :
1889 60 768 if $x->is_inf("+")
1892 620 148 $x->{'sign'} eq '+' && !$x->is_zero ? :
1897 4441 8 ref $_[0] ? :
1899 1163 3286 $x->{'sign'} =~ /^-/ ? :
1904 56 8 ref $_[0] ? :
1906 24 40 if $x->{'sign'} =~ /^\-/
1907 8 32 if $x->is_zero
1913 56 8 ref $_[0] ? :
1915 32 32 if $x->{'sign'} =~ /^\+/
1916 0 32 if $x->is_zero
1922 185 0 ref $_[0] ? :
1924 7 178 unless $x->is_finite
1925 93 85 $LIB->_is_odd($x->{'value'}) ? :
1930 44 0 ref $_[0] ? :
1932 4 40 unless $x->is_finite
1933 16 24 $LIB->_is_even($x->{'value'}) ? :
1938 862 0 ref $_[0] ? :
1940 767 95 $x->is_finite ? :
1952 2051 450 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1956 0 2501 if @r
1964 333 2168 unless ($x->is_finite and $y->is_finite)
1966 64 269 if $x->is_nan or $y->is_nan
1967 43 226 if $x->{'sign'} eq $y->{'sign'} and $x->{'sign'} =~ /^[+-]inf$/
1968 96 130 if $x->is_inf("+")
1969 111 19 if $x->is_inf("-")
1970 8 11 if $y->is_inf("+")
1975 262 1906 if $x->{'sign'} eq "+" and $y->{'sign'} eq "-"
1976 206 1700 if $x->{'sign'} eq "-" and $y->{'sign'} eq "+"
1984 1 1699 unless ($y->isa(__PACKAGE__))
1985 0 1 if ($y->is_int) { }
1988 1 0 if $class->upgrade
1998 1606 93 if ($x->{'sign'} eq "+")
2013 116 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2017 0 116 if @r
2023 72 44 unless ($x->is_finite and $y->is_finite)
2025 28 44 if $x->is_nan or $y->is_nan
2026 16 28 if $x->{'sign'} =~ /^[+-]inf$/ and $y->{'sign'} =~ /^[+-]inf$/
2027 16 12 if $x->{'sign'} =~ /^[+-]inf$/ and not $y->{'sign'} =~ /^[+-]inf$/
2037 0 44 unless ($y->isa(__PACKAGE__))
2038 0 0 if ($y->is_int) { }
2041 0 0 if $class->upgrade
2054 200 329 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2058 0 529 if @r
2065 18 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2069 0 18 if @r
2072 0 18 defined $cmp && !$cmp ? :
2076 9 1044 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2080 0 1053 if @r
2087 1195 268 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2091 0 1463 if @r
2098 1072 393 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2102 0 1465 if @r
2109 169 187 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2113 0 356 if @r
2125 490 0 ref $_[0] ? :
2133 0 490 if $x->modify("bneg")
2135 482 8 unless $x->is_zero
2137 33 0 if $x->is_int or $x->is_inf or $x->is_nan
2144 879 12 ref $_[0] ? :
2148 0 891 if $x->modify("babs")
2153 36 564 if $x->is_int or $x->is_inf or $x->is_nan
2159 18 4 ref $_[0] ? :
2163 0 22 if $x->modify("bsgn")
2167 10 12 if $x->is_pos
2168 6 6 if $x->is_neg
2171 3 3 if $x->is_int
2178 8 792 ref $_[0] ? :
2184 0 800 if @r
2191 190 0 ref $_[0] ? :
2199 0 190 if $x->modify("binc")
2201 16 174 if $x->is_inf or $x->is_nan
2207 100 74 if ($x->{'sign'} eq '+') { }
74 0 elsif ($x->{'sign'} eq '-') { }
2211 8 66 if $LIB->_is_zero($x->{'value'})
2219 31 0 ref $_[0] ? :
2227 0 31 if $x->modify("bdec")
2229 12 19 if $x->is_inf or $x->is_nan
2235 4 15 if ($x->{'sign'} eq '-') { }
15 0 elsif ($x->{'sign'} eq '+') { }
2238 4 11 if ($LIB->_is_zero($x->{'value'})) { }
2344 644 89 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2348 0 733 unless $x->isa(__PACKAGE__)
2356 0 733 if $x->modify("badd")
2360 125 608 unless ($x->is_finite and $y->is_finite)
2362 55 70 if $x->is_nan or $y->is_nan
2364 6 18 $y->is_inf('-') ? :
6 18 $y->is_inf('+') ? :
11 11 $y->is_inf('+') ? :
24 22 $x->is_inf('-') ? :
24 46 $x->is_inf('+') ? :
2378 2 606 unless ($y->isa(__PACKAGE__))
2379 0 2 if ($y->is_int) { }
2382 2 0 if $class->upgrade
2402 1048 27 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2406 0 1075 unless $x->isa(__PACKAGE__)
2414 0 1075 if $x->modify("bsub")
2418 112 963 unless ($x->is_finite and $y->is_finite)
2420 39 73 if $x->is_nan or $y->is_nan
2422 9 15 $y->is_inf('+') ? :
9 15 $y->is_inf('-') ? :
14 11 $y->is_inf('+') ? :
24 25 $x->is_inf('-') ? :
24 49 $x->is_inf('+') ? :
2430 6 957 if builtin::refaddr($x) eq builtin::refaddr($y)
2438 0 957 unless ($y->isa(__PACKAGE__))
2439 0 0 if ($y->is_int) { }
2442 0 0 if $class->upgrade
2462 1429 29 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2472 0 1458 if $x->modify("bmul")
2474 0 1458 unless $x->isa(__PACKAGE__)
2476 52 1406 if $x->is_nan or $y->is_nan
2479 52 1354 if ($x->{'sign'} =~ /^[+-]inf$/ or $y->{'sign'} =~ /^[+-]inf$/)
2480 12 40 if $x->is_zero or $y->is_zero
2484 10 30 if $x->{'sign'} =~ /^\+/ and $y->{'sign'} =~ /^\+/
2485 10 20 if $x->{'sign'} =~ /^-/ and $y->{'sign'} =~ /^-/
2495 1 1353 unless ($y->isa(__PACKAGE__))
2496 0 1 if ($y->is_int) { }
2499 1 0 if $class->upgrade
2510 1303 50 $x->{'sign'} eq $y->{'sign'} ? :
2513 310 1043 if $LIB->_is_zero($x->{'value'})
2530 1442 22 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2540 0 1464 if $x->modify("bfdiv")
2547 51 1413 if ($x->is_nan or $y->is_nan)
2548 24 27 $wantarray ? :
2569 68 1345 if ($y->is_zero)
2571 32 36 if ($wantarray)
2574 18 50 if ($x->is_zero) { }
2579 32 32 $wantarray ? :
2596 96 1249 if ($x->is_inf)
2598 48 48 if $wantarray
2599 48 48 if ($y->is_inf) { }
2602 24 24 $x->bcmp(0) == $y->bcmp(0) ? :
2605 48 48 $wantarray ? :
2621 80 1169 if ($y->is_inf)
2623 56 24 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
2624 28 28 if $wantarray
2627 12 12 if $wantarray
2630 40 40 $wantarray ? :
2640 665 504 unless ($wantarray)
2642 55 610 if ($upg)
2644 21 34 if ($tmp->is_int) { }
2657 0 1114 unless ($y->isa(__PACKAGE__))
2658 0 0 if ($y->is_int) { }
2661 0 0 if $class->upgrade
2686 6 1108 if ($same) { }
2704 53 1055 if ($xsign ne $ysign and not $LIB->_is_zero($rem->{'value'}))
2713 1000 108 $xsign eq $ysign || $LIB->_is_zero($x->{'value'}) ? :
2715 1059 49 $ysign eq '+' || $LIB->_is_zero($rem->{'value'}) ? :
2720 504 610 if ($wantarray)
2730 414 196 if $LIB->_is_zero($rem->{'value'})
2751 743 21 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2761 0 764 if $x->modify("bfmod")
2767 27 737 if ($x->is_nan or $y->is_nan)
2773 34 703 if ($y->is_zero)
2779 48 655 if ($x->is_inf)
2785 40 615 if ($y->is_inf)
2786 28 12 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
2799 0 615 unless ($y->isa(__PACKAGE__))
2800 0 0 if ($y->is_int) { }
2803 0 0 if $class->upgrade
2815 154 461 if ($LIB->_is_zero($x->{'value'})) { }
2819 172 289 if $x->{'sign'} ne $y->{'sign'}
2834 366 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2844 0 366 if $x->modify("btdiv")
2851 0 366 if ($x->is_nan or $y->is_nan)
2852 0 0 $wantarray ? :
2873 30 336 if ($y->is_zero)
2875 15 15 if ($wantarray)
2878 6 24 if ($x->is_zero) { }
2883 15 15 $wantarray ? :
2900 48 288 if ($x->is_inf)
2902 24 24 if $wantarray
2903 24 24 if ($y->is_inf) { }
2906 12 12 $x->bcmp(0) == $y->bcmp(0) ? :
2909 24 24 $wantarray ? :
2925 36 252 if ($y->is_inf)
2927 18 18 if $wantarray
2929 18 18 $wantarray ? :
2939 126 126 unless ($wantarray)
2941 0 126 if ($upg)
2943 0 0 if ($tmp->is_int) { }
2956 0 252 unless ($y->isa(__PACKAGE__))
2957 0 0 if ($y->is_int) { }
2960 0 0 if $class->upgrade
2985 0 252 if ($same) { }
2991 126 126 $xsign eq $ysign ? :
2992 108 144 if $LIB->_is_zero($x->{'value'})
2996 126 126 if ($wantarray)
2998 78 48 if $LIB->_is_zero($rem->{'value'})
3012 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3022 0 0 if $x->modify("btmod")
3028 0 0 if ($x->is_nan or $y->is_nan)
3034 0 0 if ($y->is_zero)
3040 0 0 if ($x->is_inf)
3046 0 0 if ($y->is_inf)
3056 0 0 unless ($y->isa(__PACKAGE__))
3057 0 0 if ($y->is_int) { }
3060 0 0 if $class->upgrade
3074 0 0 if $LIB->_is_zero($x->{'value'})
3079 0 0 ref $_[0] ? :
3087 0 0 if $x->modify("binv")
3089 0 0 if $x->is_zero
3090 0 0 if $x->is_inf
3091 0 0 if $x->is_nan
3092 0 0 if $x->is_one("+") or $x->is_one("-")
3098 0 0 if $class->upgrade
3104 0 0 unless ($x->isa(__PACKAGE__))
3117 119 3 ref $_[0] ? :
3125 0 122 if $x->modify("bsqrt")
3127 8 106 if $x->is_zero or $x->is_one("+") or $x->is_nan or $x->is_inf("+")
3129 12 94 if $x->is_negative
3135 19 75 if $class->upgrade
3141 0 75 unless ($x->isa(__PACKAGE__))
3159 469 51 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3169 0 520 if $x->modify("bpow")
3172 65 455 if $x->is_nan or $y->is_nan
3175 39 416 if ($x->is_inf('-')) { }
35 381 elsif ($x->is_inf('+')) { }
21 360 elsif ($y->is_inf('-')) { }
21 339 elsif ($y->is_inf('+')) { }
3176 16 23 if $y->is_negative
3177 3 20 if $y->is_zero
3178 10 10 if $y->is_odd
3181 16 19 if $y->is_negative
3182 3 16 if $y->is_zero
3185 3 18 if $x->is_one("-")
3186 3 15 if $x->is_zero
3187 3 12 if $x->is_one("+")
3190 3 18 if $x->is_one("-")
3191 3 15 if $x->is_zero
3192 3 12 if $x->is_one("+")
3196 26 313 if ($x->is_zero)
3197 4 22 if $y->is_zero
3198 11 11 if $y->is_negative
3202 28 285 if ($x->is_one("+"))
3206 31 254 if ($x->is_one("-"))
3207 17 14 if $y->is_odd
3215 31 223 if $class->upgrade
3221 36 187 if ($y->{'sign'} eq "-" or not $y->isa(__PACKAGE__))
3228 21 166 $x->is_negative && $y->is_odd ? :
3237 169 8 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3240 0 177 unless defined $y
3244 0 177 if $x->modify("broot")
3248 0 177 unless ($y->isa(__PACKAGE__))
3249 0 0 if ($y->is_int) { }
3252 0 0 if $class->upgrade
3259 27 102 if not $x->{'sign'} =~ /^\+/ or $y->is_zero or not $y->{'sign'} =~ /^\+$/
3262 6 90 if $x->is_zero or $x->is_one or $x->is_inf or $y->is_one
3265 2 88 if $class->upgrade
3276 177 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
3283 0 177 if $x->modify("bmuladd")
3287 12 153 if $x->is_nan or $y->is_nan or $z->is_nan
3293 6 147 if ($x->is_inf('-')) { }
6 141 elsif ($x->{'sign'} eq '+inf') { }
27 114 elsif ($x->is_neg) { }
12 102 elsif ($x->is_zero) { }
102 0 elsif ($x->is_pos) { }
3295 3 3 if ($y->is_neg) { }
0 3 elsif ($y->is_zero) { }
3296 0 3 if ($z->is_inf('-')) { }
3304 0 3 if ($z->{'sign'} eq '+inf') { }
3313 3 3 if ($y->is_neg) { }
0 3 elsif ($y->is_zero) { }
3314 0 3 if ($z->{'sign'} eq '+inf') { }
3322 0 3 if ($z->is_inf('-')) { }
3331 0 27 if ($y->is_inf('-')) { }
0 27 elsif ($y->{'sign'} eq '+inf') { }
3332 0 0 if ($z->is_inf('-')) { }
3338 0 0 if ($z->{'sign'} eq '+inf') { }
3344 0 27 if ($z->is_inf('-')) { }
0 27 elsif ($z->{'sign'} eq '+inf') { }
3353 0 12 if ($y->is_inf('-')) { }
0 12 elsif ($y->{'sign'} eq '+inf') { }
3358 0 12 if ($z->is_inf('-')) { }
0 12 elsif ($z->{'sign'} eq '+inf') { }
3367 0 102 if ($y->is_inf('-')) { }
0 102 elsif ($y->{'sign'} eq '+inf') { }
3368 0 0 if ($z->{'sign'} eq '+inf') { }
3374 0 0 if ($z->is_inf('-')) { }
3380 0 102 if ($z->is_inf('-')) { }
0 102 elsif ($z->{'sign'} eq '+inf') { }
3390 0 141 unless ($y->isa(__PACKAGE__) and $z->isa(__PACKAGE__))
3391 0 0 if ($y->is_int and $z->is_int) { }
3395 0 0 if $class->upgrade
3396 0 0 unless $y->isa(__PACKAGE__)
3398 0 0 unless $z->isa(__PACKAGE__)
3410 0 141 if builtin::refaddr($x) eq builtin::refaddr($z)
3412 111 30 $x->{'sign'} eq $y->{'sign'} ? :
3414 21 120 if $LIB->_is_zero($x->{'value'})
3425 571 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
3436 0 571 if $num->modify("bmodpow")
3441 28 508 unless $num->is_finite and $exp->is_finite and $mod->is_finite
3451 0 508 unless ($exp->isa(__PACKAGE__) and $mod->isa(__PACKAGE__))
3452 0 0 if ($exp->is_int and $mod->is_int) { }
3456 0 0 if $class->upgrade
3457 0 0 unless $exp->isa(__PACKAGE__)
3459 0 0 unless $mod->isa(__PACKAGE__)
3471 143 365 if ($exp->{'sign'} eq "-")
3473 43 100 if $num->is_nan
3478 3 462 if ($mod->is_zero)
3479 0 3 if ($num->is_zero) { }
3500 239 223 unless ($LIB->_is_zero($value))
3505 21 218 if ($num->{'sign'} eq '-' and $exp->is_odd) { }
3512 0 21 if ($mod->{'sign'} eq '-') { }
3534 7 211 if ($mod->{'sign'} eq "-")
3569 313 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3579 0 313 if $x->modify("bmodinv")
3583 49 264 unless $y->is_finite and $x->is_finite
3587 0 264 if $y->is_zero
3595 0 264 unless ($y->isa(__PACKAGE__))
3596 0 0 if ($y->is_int) { }
3599 0 0 if $class->upgrade
3611 63 201 if $y->is_one("+") or $y->is_one("-")
3623 36 165 if $x->is_zero
3629 25 140 unless defined $x->{'value'}
3634 0 140 unless defined $x->{'sign'}
3648 7 133 if $y->{'sign'} eq "-"
3652 76 64 if $x->{'sign'} ne $y->{'sign'}
3668 0 199 if (not ref $_[0] and $_[0] =~ /^[a-z]\w*(?:::\w+)*$/i) { }
3670 0 0 defined $_[2] ? :
3674 166 33 defined $_[1] ? :
3680 0 199 if $x->modify("blog")
3685 9 190 if $x->is_nan
3687 160 30 if (defined $base)
3688 0 160 unless defined builtin::blessed($base) and $base->isa(__PACKAGE__)
3690 12 148 if ($base->is_nan or $base->is_one) { }
36 112 elsif ($base->is_inf or $base->is_zero) { }
12 100 elsif ($base->is_negative) { }
3693 21 15 if $x->is_inf or $x->is_zero
3696 3 9 if $x->is_one
3697 0 9 if $x == $base
3699 0 9 if $class->upgrade
3702 3 97 if $x == $base
3707 15 112 if ($x->is_inf) { }
6 106 elsif ($x->is_neg) { }
9 97 elsif ($x->is_one) { }
6 91 elsif ($x->is_zero) { }
3710 0 6 if $class->upgrade
3720 2 89 if $class->upgrade
3724 15 74 unless (defined $base)
3750 0 74 unless defined $rc
3758 15 0 ref $_[0] ? :
3766 0 15 if $x->modify("bexp")
3769 3 12 if $x->is_nan
3770 0 12 if $x->is_zero
3771 3 9 if $x->is_inf("+")
3772 0 9 if $x->is_inf("-")
3778 0 9 if $class->upgrade
3784 0 9 unless ($x->isa(__PACKAGE__))
3799 0 0 ref $_[0] ? :
3803 0 0 if $x->modify("bilog2")
3805 0 0 if $x->is_nan
3806 0 0 if $x->is_inf("+")
3807 0 0 if $x->is_zero
3809 0 0 if ($x->is_neg)
3810 0 0 if $class->upgrade
3819 0 0 ref $_[0] ? :
3823 0 0 if $x->modify("bilog10")
3825 0 0 if $x->is_nan
3826 0 0 if $x->is_inf("+")
3827 0 0 if $x->is_zero
3829 0 0 if ($x->is_neg)
3830 0 0 if $class->upgrade
3839 0 0 ref $_[0] ? :
3843 0 0 if $x->modify("bclog2")
3845 0 0 if $x->is_nan
3846 0 0 if $x->is_inf("+")
3847 0 0 if $x->is_zero
3849 0 0 if ($x->is_neg)
3850 0 0 if $class->upgrade
3859 0 0 ref $_[0] ? :
3863 0 0 if $x->modify("bclog10")
3865 0 0 if $x->is_nan
3866 0 0 if $x->is_inf("+")
3867 0 0 if $x->is_zero
3869 0 0 if ($x->is_neg)
3870 0 0 if $class->upgrade
3883 93 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3887 0 93 if @r
3891 0 93 if $n->modify("bnok")
3895 0 93 unless ($k->isa(__PACKAGE__))
3896 0 0 if ($k->is_int) { }
3899 0 0 if $class->upgrade
3906 9 84 if $n->is_nan or $k->is_nan
3910 7 77 if ($n->is_inf) { }
0 77 elsif ($k->is_inf) { }
3911 0 7 if ($k->is_inf) { }
0 7 elsif ($k->is_neg) { }
0 7 elsif ($k->is_zero) { }
3918 7 0 if ($n->is_inf('+', @r)) { }
3921 0 0 $k->is_even ? :
3935 77 0 if ($n >= 0) { }
3936 21 56 if ($k < 0 or $k > $n)
3941 0 0 if ($k >= 0) { }
0 0 elsif ($k <= $n) { }
3972 28 28 if ($LIB->_acmp($two_k, $n->{'value'}) > 0)
3977 0 56 if $sign == -1
3985 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3989 0 0 if @r
3993 0 0 if $n->modify("bnok")
3997 0 0 unless ($k->isa(__PACKAGE__))
3998 0 0 if ($k->is_int) { }
4001 0 0 if $class->upgrade
4008 0 0 if $n->is_nan or $k->is_nan
4009 0 0 unless $n >= $k and $k >= 0
4010 0 0 if $k->is_zero
4012 0 0 if ($n->is_inf)
4013 0 0 if ($k->is_inf) { }
4043 0 0 if $a->modify("bhyperop")
4053 0 0 if $a < 0
4054 0 0 if $n < 0
4055 0 0 if $b < 0
4066 0 0 if ($b == 2 and $a == 2)
4067 0 0 $n == 0 ? :
4072 0 0 if ($b == 1)
4073 0 0 if ($n == 0)
4077 0 0 if ($n == 1)
4085 0 0 if ($b == 0)
4086 0 0 if ($n == 1)
4090 0 0 if ($n == 2)
4100 0 0 if ($a == 0)
4101 0 0 if ($n == 0)
4105 0 0 if ($n == 1)
4109 0 0 if ($n == 2)
4113 0 0 if ($n == 3)
4114 0 0 $b == 0 ? :
4118 0 0 $b->is_odd ? :
4123 0 0 if ($a == 1)
4124 0 0 if ($n == 0 or $n == 1)
4128 0 0 if ($n == 2)
4138 0 0 if ($n == 4)
4139 0 0 if ($b == 0)
4149 0 0 if ($n == 3)
4154 0 0 if ($n == 2)
4159 0 0 if ($n == 1)
4164 0 0 if ($n == 0)
4181 0 0 if $a->modify("buparrow")
4196 0 0 if $m->modify("backermann")
4220 0 0 if $m < 0
4221 0 0 if $n < 0
4228 0 0 unless ref $n
4231 0 0 if ($m > $three) { }
0 0 elsif ($m == $three) { }
0 0 elsif ($m == $two) { }
0 0 elsif ($m >= 0) { }
4251 0 0 ref $_[0] ? :
4255 0 0 if $x->modify("bsin")
4259 0 0 if $x->is_zero
4260 0 0 if $x->is_inf or $x->is_nan
4263 0 0 if ($upg)
4265 0 0 if ($xtmp->is_int) { }
4281 0 0 ref $_[0] ? :
4285 0 0 if $x->modify("bcos")
4289 0 0 if $x->is_zero
4290 0 0 if $x->is_inf or $x->is_nan
4293 0 0 if ($upg)
4295 0 0 if ($xtmp->is_int) { }
4314 0 0 ref $_[0] ? :
4318 0 0 if $x->modify("batan")
4320 0 0 if $x->is_nan
4321 0 0 if $x->is_zero
4323 0 0 if $class->upgrade
4325 0 0 if $x->bgt(1)
4326 0 0 if $x->blt(-1)
4334 84 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
4339 0 84 if $y->modify("batan2")
4343 0 84 unless ($y->isa(__PACKAGE__))
4344 0 0 if ($y->is_int) { }
4347 0 0 if $class->upgrade
4352 9 75 if $y->is_nan or $x->is_nan
4356 30 45 if ($x->is_inf or $y->is_inf)
4357 18 12 if ($y->is_inf) { }
4358 6 12 if ($x->is_inf('-')) { }
6 6 elsif ($x->is_inf('+')) { }
4370 3 9 if ($x->is_inf('+')) { }
4403 89 0 ref $_[0] ? :
4407 0 89 if $x->modify("bfac")
4409 6 83 if $x->is_nan or $x->is_inf("-")
4410 3 80 if $x->is_inf("+")
4411 3 77 if $x->is_neg
4412 8 69 if $x->is_zero or $x->is_one
4420 54 0 ref $_[0] ? :
4424 0 54 if $x->modify("bdfac")
4426 6 48 if $x->is_nan or $x->is_inf("-")
4427 3 45 if $x->is_inf("+")
4428 3 42 if $x <= -2
4429 9 33 if $x <= 1
4431 0 33 unless $LIB->can("_dfac")
4440 57 0 ref $_[0] ? :
4444 0 57 if $x->modify("btfac")
4446 3 54 if $x->is_nan
4447 3 51 if $x->is_inf("+")
4450 6 45 if $x <= -$k
4453 12 33 if $x <= $one
4465 270 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
4470 0 270 if $x->modify("bmfac")
4472 15 255 if $x->is_nan
4473 3 252 if $k->is_nan
4474 15 237 if $x->is_inf("+")
4478 0 237 unless ($k->isa(__PACKAGE__))
4479 0 0 if ($k->is_int) { }
4482 0 0 if $class->upgrade
4487 39 198 if $k < 1 or $x <= -$k
4490 60 138 if $x <= $one
4501 0 0 ref $_[0] ? :
4503 0 0 unless $LIB->can("_fib")
4508 0 0 if $x->modify("bfib")
4512 0 0 if (wantarray) { }
4513 0 0 if $x->is_inf
4516 0 0 if $x->is_nan or not $x->is_int
4527 0 0 if $n == 0
4531 0 0 if $n == 1
4541 0 0 if ($x->is_neg)
4561 0 0 if $x->is_inf("+")
4562 0 0 if $x->is_nan or $x->is_inf("-")
4564 0 0 $x->is_neg && $x->is_even ? :
4572 0 0 ref $_[0] ? :
4574 0 0 unless $LIB->can("_lucas")
4579 0 0 if $x->modify("blucas")
4583 0 0 if (wantarray) { }
4584 0 0 if $x->is_nan
4585 0 0 if $x->is_inf
4597 0 0 if $n == 0
4601 0 0 if $n == 1
4611 0 0 if ($x->is_neg)
4631 0 0 if $x->is_inf("+")
4632 0 0 if $x->is_nan or $x->is_inf("-")
4634 0 0 $x->is_neg && $x->is_even ? :
4649 12 50 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
4651 0 12 defined $_[3] ? :
4655 44 6 defined $_[2] ? :
4661 0 62 if $x->modify("blsft")
4665 18 44 unless defined $b
4666 18 44 unless defined builtin::blessed($b)
4670 0 62 unless ($y->isa(__PACKAGE__) and $b->isa(__PACKAGE__))
4671 0 0 if ($y->is_int and $b->is_int) { }
4675 0 0 if $class->upgrade
4676 0 0 unless $y->isa(__PACKAGE__)
4678 0 0 unless $b->isa(__PACKAGE__)
4685 0 62 if $x->is_nan or $y->is_nan or $b->is_nan
4690 4 58 if $y->is_neg
4695 0 58 if ($y->is_inf("+"))
4696 0 0 if ($b->is_one('-')) { }
0 0 elsif ($b->is_one('+')) { }
0 0 elsif ($b->is_zero) { }
4701 0 0 if $x->is_inf
4704 0 0 if $x->is_negative
4705 0 0 if $x->is_positive
4710 0 58 if ($b->is_inf)
4711 0 0 if $x->is_zero or $y->is_zero
4712 0 0 if ($b->is_inf('-')) { }
4713 0 0 if $x->is_negative and $y->is_odd or $x->is_positive and $y->is_even
4718 0 0 if $x->is_negative
4723 0 58 if ($b->is_zero)
4724 0 0 if $y->is_zero
4725 0 0 if $x->is_inf
4729 0 58 if ($x->is_inf)
4730 0 0 if ($b->is_negative) { }
4731 0 0 if ($x->is_inf('-')) { }
4732 0 0 if ($y->is_even) { }
4738 0 0 if ($y->is_even) { }
4752 0 50 if $x->is_zero or $y->is_zero or $b->is_one("+") or $b->is_one("-") and $y->is_even
4756 0 50 if $b->is_one("-") and $y->is_odd
4763 0 50 if ($x->bcmp($uintmax) > 0) { }
4767 0 50 if ($b->is_negative)
4768 0 0 if $y->is_odd
4773 0 50 if $neg
4787 12 122 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
4789 0 12 defined $_[3] ? :
4793 116 6 defined $_[2] ? :
4799 0 134 if $x->modify("brsft")
4803 18 116 unless defined $b
4804 18 116 unless defined builtin::blessed($b)
4808 0 134 unless ($y->isa(__PACKAGE__) and $b->isa(__PACKAGE__))
4809 0 0 if ($y->is_int and $b->is_int) { }
4813 0 0 if $class->upgrade
4814 0 0 unless $y->isa(__PACKAGE__)
4816 0 0 unless $b->isa(__PACKAGE__)
4823 0 134 if $x->is_nan or $y->is_nan or $b->is_nan
4828 4 130 if $y->is_neg
4833 0 130 if ($b->is_inf)
4834 0 0 if $x->is_inf or $y->is_zero
4835 0 0 if ($b->is_inf('+')) { }
4836 0 0 if ($x->is_negative) { }
4842 0 0 if ($x->is_negative) { }
0 0 elsif ($x->is_positive) { }
4843 0 0 $y->is_odd ? :
4846 0 0 $y->is_odd ? :
4854 0 130 if ($b->is_zero)
4855 0 0 if $y->is_zero
4856 0 0 if $x->is_zero
4857 0 0 $x->is_negative ? :
4861 0 130 if ($y->is_inf("+"))
4862 0 0 if ($b->is_one('-')) { }
0 0 elsif ($b->is_one('+')) { }
4867 0 0 if $x->is_inf
4868 0 0 $x->is_negative ? :
4873 0 130 if ($x->is_inf)
4874 0 0 if ($b->is_negative) { }
4875 0 0 if ($x->is_inf('-')) { }
4876 0 0 if ($y->is_even) { }
4882 0 0 if ($y->is_even) { }
4896 0 122 if $x->is_zero or $y->is_zero or $b->is_one("+") or $b->is_one("-") and $y->is_even
4900 0 122 if $b->is_one("-") and $y->is_odd
4905 11 111 if $class->upgrade
4908 57 54 if ($x->is_neg and $b->bcmp(2) == 0)
4909 3 54 if $x->is_one("-")
4919 3 51 if $y >= $nbits
4934 0 54 if ($x->bcmp($uintmax) > 0 or $x->is_neg or $b->is_negative) { }
4958 27 8 if (ref $_[0]) { }
4960 0 27 if ref $y and not $y->isa(__PACKAGE__) and $y->can("as_int")
4962 0 27 unless ref $y
4970 16 0 if ref $_ and not $_->isa(__PACKAGE__) and $_->can("as_int")
4972 0 16 unless ref $_
4978 0 35 if $x->modify("bblsft")
4980 4 31 if $x->is_nan or $y->is_nan
4984 4 27 if $y->is_neg
4988 0 27 if ($y->is_inf("+"))
4989 0 0 if $x->is_pos
4990 0 0 if $x->is_neg
4996 0 27 if $x->is_zero or $x->is_inf or $y->is_zero
5013 27 8 if (ref $_[0]) { }
5015 0 27 if ref $y and not $y->isa(__PACKAGE__) and $y->can("as_int")
5017 0 27 unless ref $y
5025 16 0 if ref $_ and not $_->isa(__PACKAGE__) and $_->can("as_int")
5027 0 16 unless ref $_
5033 0 35 if $x->modify("bbrsft")
5035 4 31 if $x->is_nan or $y->is_nan
5039 4 27 if $y->is_neg
5043 0 27 if ($y->is_inf("+"))
5044 0 0 if $x->is_inf
5045 0 0 if $x->is_neg
5051 0 27 if $x->is_zero or $x->is_inf or $y->is_zero
5056 27 0 if ($x->is_pos) { }
5062 0 0 unless $LIB->_is_zero($q)
5073 463 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
5078 0 464 if $x->modify("band")
5082 1 463 unless ($y->isa(__PACKAGE__))
5083 0 1 if ($y->is_int) { }
5086 1 0 if $class->upgrade
5095 12 451 unless $x->is_finite and $y->is_finite
5097 418 33 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
5111 524 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
5116 0 525 if $x->modify("bior")
5120 1 524 unless ($y->isa(__PACKAGE__))
5121 0 1 if ($y->is_int) { }
5124 1 0 if $class->upgrade
5133 12 512 unless $x->is_finite and $y->is_finite
5135 477 35 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
5148 534 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
5153 0 535 if $x->modify("bxor")
5157 1 534 unless ($y->isa(__PACKAGE__))
5158 0 1 if ($y->is_int) { }
5161 1 0 if $class->upgrade
5170 12 522 unless $x->is_finite and $y->is_finite
5172 482 40 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
5184 39 0 ref $_[0] ? :
5188 0 39 if $x->modify("bnot")
5200 90005 0 ref $_[0] ? :
5211 70 150 if (@args == 1 and not defined $args[0] or @args >= 2 and @args <= 3 and not defined $args[0] and not defined $args[1])
5226 1842 88093 if (defined $a)
5227 0 1842 unless $a =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
5231 94 89841 if (defined $p)
5232 0 94 unless $p =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
5237 88093 1842 unless (defined $a)
5241 24121 14967 if defined $_->{'accuracy'} and !defined($a) || $_->{'accuracy'} < $a
5244 89841 94 unless (defined $p)
5250 136 3 if defined $_->{'precision'} and !defined($p) || $_->{'precision'} > $p
5255 63802 26133 unless (defined $a or defined $p)
5261 18 89917 if defined $a and $a == 0
5264 63766 26169 unless defined $a or defined $p
5267 58 26111 if (defined $a and defined $p)
5280 26027 84 unless defined $r
5281 0 26111 unless ($r =~ /^(even|odd|[+-]inf|zero|trunc|common)$/)
5286 25911 200 if (defined $a) { }
5288 25853 58 if not defined $self->{'accuracy'} or $self->{'accuracy'} >= $a
5291 196 4 if not defined $self->{'precision'} or $self->{'precision'} <= $p
5305 29306 0 ref $_[0] ? :
5309 0 29306 if $x->modify("bround")
5312 2 29304 unless defined $scale
5314 101 29203 if ($x->is_zero or $scale == 0)
5316 89 12 if not defined $x->{'accuracy'} or $x->{'accuracy'} > $scale
5319 12 29191 unless $x->is_finite
5326 0 29191 if ref $scale
5329 216 28975 if ($scale < 0 and $scale < -$len - 1 or $scale >= $len)
5331 182 34 if not defined $x->{'accuracy'} or $x->{'accuracy'} > $scale
5338 137 28838 if $scale < 0
5348 28851 124 if $pad <= $len
5350 128 28847 if $pad >= $len
5352 28975 0 if $pad > 0
5367 14534 391 if $mode eq "trunc" or $digit_after =~ /[01234]/ or $digit_after eq 5 and $x->_scan_for_nonzero($pad, $xs, $len) == 0 and $mode eq 'even' && $digit_round =~ /[24680]/ || $mode eq 'odd' && $digit_round =~ /[13579]/ || $mode eq '+inf' && $x->{'sign'} eq '-' || $mode eq '-inf' && $x->{'sign'} eq '+' || $mode eq 'zero'
5372 28851 124 if ($pad > 0 and $pad <= $len) { }
124 0 elsif ($pad > $len) { }
5380 13945 15030 if ($round_up)
5382 59 13886 if $scale < 0
5390 1740 13884 if $c eq 10
5393 13884 1740 if $c != 0
5395 61 13884 if $c == 0
5397 28910 65 if $put_back == 1
5399 28838 137 if $scale >= 0
5400 137 28838 if ($scale < 0)
5402 5 132 if $scale < -$len
5411 219 0 ref $_[0] ? :
5415 0 219 if $x->modify("bfround")
5419 0 219 unless defined $scale
5422 108 111 if $scale > 0
5433 0 0 unless ref $x
5439 36 0 ref $_[0] ? :
5443 0 36 if $x->modify("bfloor")
5450 36 0 ref $_[0] ? :
5454 0 36 if $x->modify("bceil")
5461 38 0 ref $_[0] ? :
5465 0 38 if $x->modify("bint")
5478 1 79 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i))
5492 33 148 unless $arg->is_int
5498 12 52 if ($upg)
5501 0 26 unless ($arg->isa(__PACKAGE__))
5506 0 12 if ($do_upgrade)
5518 35 39 if $LIB->_is_one($x->{'value'})
5528 1 25 unless (@_ and defined builtin::blessed($_[0]) && $_[0]->isa(__PACKAGE__) || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i && !($_[0] =~ /^(inf|nan)/i))
5542 12 53 unless $arg->is_finite
5546 12 29 if $arg->is_zero
5552 2 9 if ($upg)
5555 0 4 unless ($arg->isa(__PACKAGE__))
5560 0 2 if ($do_upgrade)
5572 0 14 unless $y->is_int
5585 923 0 ref $_[0] ? :
5587 0 923 if @r
5594 84 3 ref $_[0] ? :
5596 0 87 if @r
5598 63 24 if ref $n
5604 0 0 ref $_[0] ? :
5608 0 0 if $x->modify("bdigitsum")
5610 0 0 if @r
5612 0 0 if $x->is_nan
5613 0 0 if $x->is_inf
5622 0 0 ref $_[0] ? :
5624 0 0 if @r
5626 0 0 if $x->is_nan
5627 0 0 if $x->is_inf
5635 29343 0 ref $_[0] ? :
5637 0 29343 if @r
5640 6 29337 wantarray ? :
5645 68 0 ref $_[0] ? :
5647 0 68 if @r
5649 24 44 unless ($x->is_finite)
5659 8 36 if $zeros != 0
5665 72 0 ref $_[0] ? :
5667 0 72 if @r
5669 24 48 unless ($x->is_finite)
5674 8 40 if $x->is_zero
5682 36 0 ref $_[0] ? :
5684 0 36 if @r
5694 0 0 ref $_[0] ? :
5696 0 0 if @r
5700 0 0 if ($x->is_nan)
5702 0 0 unless wantarray
5709 0 0 if ($x->is_inf)
5711 0 0 unless wantarray
5722 0 0 if $nzeros != 0
5724 0 0 unless wantarray
5735 0 0 ref $_[0] ? :
5737 0 0 if @r
5741 0 0 if $x->is_nan or $x->is_inf
5746 0 0 if ($mant->bcmp(0))
5750 0 0 if ($expo10adj > 0)
5751 0 0 if $class->upgrade
5753 0 0 unless wantarray
5759 0 0 unless wantarray
5768 0 0 ref $_[0] ? :
5770 0 0 if @r
5774 0 0 if $x->is_nan or $x->is_inf
5780 0 0 if ($mant->bcmp(0))
5790 0 0 if ($ndigmant > $c)
5791 0 0 if $class->upgrade
5793 0 0 unless wantarray
5800 0 0 unless wantarray
5808 0 0 ref $_[0] ? :
5810 0 0 if @r
5814 0 0 if ($x->is_nan)
5816 0 0 unless wantarray
5823 0 0 if ($x->is_inf)
5825 0 0 unless wantarray
5833 0 0 unless wantarray
5843 0 0 ref $_[0] ? :
5845 0 0 if @r
5849 0 0 if ($x->is_nan)
5850 0 0 unless wantarray
5856 0 0 if ($x->is_inf)
5858 0 0 unless wantarray
5866 0 0 unless wantarray
5876 0 0 ref $_[0] ? :
5878 0 0 if @r
5884 0 0 ref $_[0] ? :
5886 0 0 if @r
5888 0 0 $x->is_nan ? :
5896 12364 12 ref $_[0] ? :
5898 0 12376 if @r
5902 2823 9553 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
5903 2242 581 unless $x->is_inf("+")
5909 0 9553 if $class->upgrade and not $x->isa(__PACKAGE__)
5914 1184 8369 $x->{'sign'} eq '-' ? :
5921 50 16 ref $_[0] ? :
5923 0 66 if @r
5927 18 48 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
5928 11 7 unless $x->is_inf("+")
5934 0 48 if $class->upgrade and not $x->isa(__PACKAGE__)
5940 25 23 if $expo
5942 14 34 $x->{'sign'} eq '-' ? :
5948 0 0 ref $_[0] ? :
5950 0 0 if @r
5954 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
5955 0 0 unless $x->is_inf("+")
5961 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
5967 0 0 if $expo
5970 0 0 if ($mantlen > 1)
5975 0 0 $x->{'sign'} eq '-' ? :
5981 0 0 ref $_[0] ? :
5983 0 0 if @r
5987 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
5988 0 0 unless $x->is_inf("+")
5994 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
6000 0 0 if $expo
6007 0 0 if ($dotpos < $mantlen) { }
0 0 elsif ($dotpos > $mantlen) { }
6013 0 0 $x->{'sign'} eq '-' ? :
6019 469 0 ref $_[0] ? :
6021 0 469 if @r
6025 0 469 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
6026 0 0 unless $x->is_inf("+")
6032 0 469 if $class->upgrade and not $x->isa(__PACKAGE__)
6036 61 408 $x->{'sign'} eq '-' ? :
6043 1021 0 ref $_[0] ? :
6045 0 1021 if @r
6049 68 953 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
6050 68 0 unless $x->is_inf("+")
6056 0 953 if $class->upgrade and not $x->isa(__PACKAGE__)
6060 12 941 $x->{'sign'} eq '-' ? :
6066 36 0 ref $_[0] ? :
6068 0 36 if @r
6072 12 24 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
6073 8 4 unless $x->is_inf("+")
6079 0 24 if $class->upgrade and not $x->isa(__PACKAGE__)
6084 4 20 $x->{'sign'} eq '-' ? :
6090 40 0 ref $_[0] ? :
6092 0 40 if @r
6096 12 28 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
6097 8 4 unless $x->is_inf("+")
6103 0 28 if $class->upgrade and not $x->isa(__PACKAGE__)
6108 4 24 $x->{'sign'} eq '-' ? :
6114 93 0 ref $_[0] ? :
6116 0 93 if @r
6120 12 81 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
6121 8 4 unless $x->is_inf("+")
6127 0 81 if $class->upgrade and not $x->isa(__PACKAGE__)
6132 58 23 $x->{'sign'} eq '-' ? :
6138 0 0 ref $_[0] ? :
6140 0 0 if @r
6142 0 0 if $x->is_neg or not $x->is_int
6145 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
6148 0 0 unless $LIB->can("_to_bytes")
6155 0 0 ref $_[0] ? :
6158 0 0 if @r
6160 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
6163 0 0 unless $x->is_int or $x->is_inf or $x->is_nan
6170 0 0 ref $_[0] ? :
6173 0 0 if $class->upgrade and not $x->isa(__PACKAGE__)
6176 0 0 unless $x->is_int or $x->is_inf or $x->is_nan
6186 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
6189 0 0 if @r
6191 0 0 if $x->is_neg or not $x->is_int
6194 0 0 if $base < 2 or not $base->is_int
6200 0 0 unless (defined $cs)
6201 0 0 if $base == 2
6202 0 0 if $base == 8
6203 0 0 if $base == 16
6204 0 0 if $base == 10
6207 0 0 unless $LIB->can("_to_base")
6210 0 0 if $class->upgrade and not $x->isa(__PACKAGE__) && $base->isa(__PACKAGE__)
6215 0 0 defined $cs ? :
6223 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
6226 0 0 if @r
6228 0 0 if $x->is_neg or not $x->is_int
6231 0 0 if $base < 2 or not $base->is_int
6234 0 0 unless $LIB->can("_to_base")
6237 0 0 if $class->upgrade and not $x->isa(__PACKAGE__) && $base->isa(__PACKAGE__)
6258 36 0 ref $_[0] ? :
6260 0 36 if @r
6262 12 24 unless $x->is_finite
6264 0 24 if $class->upgrade and not $x->isa(__PACKAGE__)
6268 4 20 $x->{'sign'} eq '-' ? :
6274 40 0 ref $_[0] ? :
6276 0 40 if @r
6278 12 28 unless $x->is_finite
6280 0 28 if $class->upgrade and not $x->isa(__PACKAGE__)
6284 4 24 $x->{'sign'} eq '-' ? :
6290 39 0 ref $_[0] ? :
6292 0 39 if @r
6294 12 27 unless $x->is_finite
6296 0 27 if $class->upgrade and not $x->isa(__PACKAGE__)
6300 4 23 $x->{'sign'} eq '-' ? :
6311 545 0 ref $_[0] ? :
6313 0 545 if @r
6315 0 545 if ($x->is_nan)
6321 0 545 if ($x->is_inf)
6324 0 0 $x->is_negative ? :
6327 0 545 if $class->upgrade and not $x->isa(__PACKAGE__)
6331 39 506 $x->{'sign'} eq '-' ? :
6341 0 0 unless ref $x
6343 0 0 unless $x->is_finite
6352 23 3315 if $len == 1
6354 709 2606 if $follow > $len or $follow < 1
6357 2520 86 substr($xs, -$follow) =~ /[^0]/ ? :
6382 316 0 $a->can('numify') ? :
316 10585 if defined $a and ref $a
6383 0 0 $p->can('numify') ? :
0 10901 if defined $p and ref $p
6386 1098 9803 unless (defined $a)
6390 32 0 if defined $_->{'accuracy'} and !defined($a) || $_->{'accuracy'} < $a
6393 10849 52 unless (defined $p)
6399 10 0 if defined $_->{'precision'} and !defined($p) || $_->{'precision'} > $p
6404 1066 9835 unless defined $a
6405 10839 62 unless defined $p
6408 16 10885 if defined $a and $a == 0
6411 1015 9886 unless defined $a or defined $p
6414 9 9877 if defined $a and defined $p
6416 9868 9 unless defined $r
6417 3 9874 unless ($r =~ /^(even|odd|[+-]inf|zero|trunc|common)$/)
6421 9813 61 if defined $a
6422 61 9813 if defined $p
6437 0 0 unless CORE::length((my $dummy = "") & $value)
6438 0 0 unless 0 + $value eq $value
6439 0 0 if $value * 0 == 0
6458 8646 25 unless $sig_str =~ s/\.0*$//
6460 2585 6086 unless CORE::length $sig_str
6462 2585 6086 if $sig_str eq 0
6466 5650 436 unless CORE::length $exp_str
6467 5650 436 if $exp_str eq 0
6491 7291 1431 if ($str =~ / ^ # optional leading whitespace \s* # optional sign ( [+-]? ) # significand ( # integer part and optional fraction part ... \d+ (?: _+ \d+ )* _* (?: \. (?: _* \d+ (?: _+ \d+ )* _* )? )? | # ... or mandatory fraction part \. \d+ (?: _+ \d+ )* _* ) # optional exponent (?: [Ee] ( [+-]? ) ( \d+ (?: _+ \d+ )* _* ) )? # optional trailing whitespace \s* $ /x)
6554 1119 4 if ($str =~ / ^ # optional leading whitespace \s* # optional sign ( [+-]? ) # optional hex prefix (?: 0? [Xx] _* )? # significand using the hex digits 0..9 and a..f ( # integer part and optional fraction part ... [0-9a-fA-F]+ (?: _+ [0-9a-fA-F]+ )* _* (?: \. (?: _* [0-9a-fA-F]+ (?: _+ [0-9a-fA-F]+ )* _* )? )? | # ... or mandatory fraction part \. [0-9a-fA-F]+ (?: _+ [0-9a-fA-F]+ )* _* ) # optional exponent (power of 2) using decimal digits (?: [Pp] ( [+-]? ) ( \d+ (?: _+ \d+ )* _* ) )? # optional trailing whitespace \s* $ /x)
6608 6 0 if ($str =~ / ^ # optional leading whitespace \s* # optional sign ( [+-]? ) # optional octal prefix (?: 0? [Oo] _* )? # significand using the octal digits 0..7 ( # integer part and optional fraction part ... [0-7]+ (?: _+ [0-7]+ )* _* (?: \. (?: _* [0-7]+ (?: _+ [0-7]+ )* _* )? )? | # ... or mandatory fraction part \. [0-7]+ (?: _+ [0-7]+ )* _* ) # optional exponent (power of 2) using decimal digits (?: [Pp] ( [+-]? ) ( \d+ (?: _+ \d+ )* _* ) )? # optional trailing whitespace \s* $ /x)
6662 255 59 if ($str =~ / ^ # optional leading whitespace \s* # optional sign ( [+-]? ) # optional binary prefix (?: 0? [Bb] _* )? # significand using the binary digits 0 and 1 ( # integer part and optional fraction part ... [01]+ (?: _+ [01]+ )* _* (?: \. (?: _* [01]+ (?: _+ [01]+ )* _* )? )? | # ... or mandatory fraction part \. [01]+ (?: _+ [01]+ )* _* ) # optional exponent (power of 2) using decimal digits (?: [Pp] ( [+-]? ) ( \d+ (?: _+ \d+ )* _* ) )? # optional trailing whitespace \s* $ /x)
6719 2573 4718 if ($sig_str eq 0)
6736 3437 1281 if ($idx >= 0)
6756 900 3818 if ($sig_str =~ s/(0+)\z//)
6765 0 4718 unless (CORE::length $sig_str)
6789 12 1368 if ($sig_str eq 0)
6807 3 1365 if ($idx >= 0)
6813 2 1 if $bpc != 1
6828 248 1120 if ($sig_str =~ s/(0+)\z//)
6832 220 28 if $bpc != 1
6841 0 1368 unless (CORE::length $sig_str)
6847 1115 0 $bpc == 4 ? :
6 1115 $bpc == 3 ? :
247 1121 $bpc == 1 ? :
6854 1367 1 if ($exp_sgn eq '+') { }
6856 249 1118 unless ($LIB->_is_zero($exp_lib))
6884 213 1155 if ($n)
6901 1119 4 if (my(@parts) = $class->_hex_str_to_hex_str_parts($str))
6916 6 0 if (my(@parts) = $class->_oct_str_to_oct_str_parts($str))
6931 255 59 if (my(@parts) = $class->_bin_str_to_bin_str_parts($str))
6945 7291 1431 if (my(@parts) = $class->_dec_str_to_dec_str_parts($str))
6956 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
6967 0 0 if (my(@parts) = $class->_hex_str_to_flt_lib_parts($str))
6978 0 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
6989 0 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
7000 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
7011 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
7022 0 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
7033 0 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
7052 0 0 if ($parts[2] eq '+') { }
7065 0 0 if ($len_cmp <= 0) { }
7098 1030 0 if ($esgn eq '-') { }
0 0 elsif (not $LIB->_is_zero($eabs)) { }
7149 205 1 if @_ == 2 and ($_[0] || 0) == 1 and ref $_[1]
7153 0 5819 unless (wantarray)
7170 4395 1424 if (ref $a[0]) { }
1412 12 elsif ($a[0] =~ /^[A-Z].*::/) { }
7201 5103 5669 unless ($ref)
7208 5433 236 if $ref->isa($class)
7213 181 55 unless ($have_upgrade_chain)
7217 0 9 if $upg eq $cls
7226 9 0 if $ref->isa($upg)
7235 2 225 if ($class->isa('Math::BigInt')) { }
16 209 elsif ($class->isa('Math::BigRat')) { }
209 0 elsif ($class->isa('Math::BigFloat')) { }
7236 2 0 if ($a[$i]->can('as_int')) { }
0 0 elsif ($a[$i]->can('as_number')) { }
7246 16 0 if ($a[$i]->can("as_rat"))
7253 209 0 if ($a[$i]->can("as_float"))
7261 227 0 if ($recheck)
7266 0 227 unless ($ref)
7273 213 14 if $ref->isa($class)
7298 1 32 if ($param eq ":constant")
7313 0 0 if $_[0] =~ /^0_*[0-7]/
7321 4 28 if ($param eq "upgrade")
7328 0 28 if ($param eq "downgrade")
7335 0 28 if ($param eq "accuracy")
7342 0 28 if ($param eq "precision")
7349 0 28 if ($param eq "round_mode")
7356 0 28 if ($param eq "div_scale")
7363 24 4 if ($param =~ /^(lib|try|only)\z/)
7370 0 24 unless @_
7373 0 24 unless defined $libs
7383 0 24 if ($lib =~ /[^a-zA-Z0-9_:]/)
7388 0 24 unless (CORE::length $lib)
7393 19 5 unless $lib =~ /^Math::BigInt::/i
7398 8 16 if (defined $LIB)
7399 0 8 if ($lib ne $LIB)
7409 8 16 if defined $LIB
7411 0 16 unless @libs
7418 16 0 unless ($@)
7424 16 0 if defined $LIB
7430 0 0 if ($param eq "only")
7441 0 0 if ($@)
7450 0 0 if ($param eq "lib")
7467 3 182 if @a
7473 34 151 unless (defined $LIB)
7475 0 34 if ($@)