Branch Coverage

blib/lib/Math/BigInt.pm
Criterion Covered Total %
branch 1213 2036 59.5


line true false branch
51 56 300 $_[2] ? :
56 3 338 $_[2] ? :
59 3 350 $_[2] ? :
62 3 436 $_[2] ? :
65 0 20 $_[2] ? :
68 0 20 $_[2] ? :
95 0 318 $_[2] ? :
98 4 617 $_[2] ? :
101 0 506 $_[2] ? :
104 0 140 $_[2] ? :
114 0 0 defined $cmp && $_[2] ? :
116 0 7947 $_[2] ? :
139 3 137 $_[2] ? :
144 3 198 $_[2] ? :
149 3 196 $_[2] ? :
184 0 0 $_[2] ? :
203 3 3 $_[0]->is_zero ? :
279 367 43 if (@_) { }
281 0 367 unless defined $m
283 4 363 unless $m =~ /^(even|odd|\+inf|\-inf|zero|trunc|common)$/
292 34 9 defined $m ? :
303 2023 1309 if (@_ > 0)
315 2093 1047 if (@_ > 0)
325 15 931 if (@_) { }
327 0 15 unless defined $ds
331 0 15 if defined &blessed($ds)
339 922 9 defined $ds ? :
353 526 7495 if (@_ > 0)
355 433 93 if (defined $a)
356 0 0 $a->can('numify') ? :
0 433 if ref $a
358 0 433 unless $a =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
360 0 433 if $a != int $a
362 0 433 if $a <= 0
366 442 84 if (ref $x) { }
368 389 53 if defined $a
372 53 389 unless defined $a
383 86 7409 if ref $x
399 293 7502 if (@_ > 0)
401 208 85 if (defined $p)
402 0 0 $p->can('numify') ? :
0 208 if ref $p
403 0 208 unless $p =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
405 0 208 if $p != int $p
409 207 86 if (ref $x) { }
411 158 49 if defined $p
415 49 158 unless defined $p
426 87 7415 if ref $x
437 30 256 if (@_ > 1 or @_ == 1 and ref $_[0] eq "HASH")
441 28 2 if (ref $args ne "HASH")
453 28 212 if exists $args->{$key}
456 2 28 if (keys %$args > 0)
461 16 12 if ($key =~ /^trap_(inf|nan)\z/)
462 12 4 $$set_args{"trap_$1"} ? :
488 230 54 if (@_ == 1 and ref $_[0] ne "HASH")
500 3894 63611 unless defined $scale
505 3891 63614 unless defined $scale
506 12203 55302 unless defined $mode
508 63614 3891 if (defined $scale)
509 434 0 $scale->can('numify') ? :
434 63180 if ref $scale
522 4 932 unless defined $scale
527 4 932 unless defined $scale
528 716 220 unless defined $mode
530 932 4 if (defined $scale)
531 0 0 $scale->can('numify') ? :
0 932 if ref $scale
557 2 19922 if $IMPORT == 0
562 8 19916 unless @_
566 0 19916 unless (defined $wanted)
572 4 19912 if (not ref $wanted and $wanted eq "")
585 5 19907 if (defined &blessed($wanted) and $wanted->isa("Math::BigInt"))
592 0 1 unless @r >= 2 and not defined $r[0] and not defined $r[1]
599 12829 7078 if ($wanted =~ / ^ ( [+-]? ) # optional sign ( [1-9] [0-9]* ) # non-zero significand ( \.0* )? # ... with optional zero fraction ( [Ee] [+-]? 0+ )? # optional zero exponent \z /x)
618 1755 5323 if ($wanted =~ / ^ \s* ( [+-]? ) inf (?: inity )? \s* \z /xi)
632 391 4932 if ($wanted =~ / ^ \s* ( [+-]? ) nan \s* \z /xi)
645 3026 639 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))
689 4252 41 if ($parts[2] eq "+")
692 2 1124 unless @r >= 2 and not defined $r[0] and not defined $r[1]
699 10 31 if defined $upgrade
719 0 0 if $selfref and $self->modify("from_dec")
726 0 0 unless $selfref
728 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
732 0 0 if ($parts[2] eq "+")
740 0 0 if defined $upgrade
755 0 2 if $selfref and $self->modify("from_hex")
762 2 0 unless $selfref
764 2 0 if (my(@parts) = $class->_hex_str_to_flt_lib_parts($str))
768 2 0 if ($parts[2] eq "+")
776 0 0 if defined $upgrade
791 0 2 if $selfref and $self->modify("from_oct")
798 2 0 unless $selfref
800 2 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
804 2 0 if ($parts[2] eq "+")
812 0 0 if defined $upgrade
827 0 53 if $selfref and $self->modify("from_bin")
834 53 0 unless $selfref
836 53 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
840 53 0 if ($parts[2] eq "+")
848 0 0 if defined $upgrade
863 0 0 if $selfref and $self->modify("from_bytes")
865 0 0 unless $LIB->can("_from_bytes")
873 0 0 unless $selfref
886 0 0 if $selfref and $self->modify("from_base")
890 0 0 unless ref $base
892 0 0 if $base < 2 or not $base->is_int
897 0 0 unless $selfref
902 0 0 unless (defined $cs)
903 0 0 if $base == 2
904 0 0 if $base == 8
905 0 0 if $base == 16
906 0 0 if ($base == 10)
914 0 0 unless $LIB->can("_from_base")
919 0 0 defined $cs ? :
930 0 0 if $selfref and $self->modify("from_base_num")
939 0 0 unless defined &blessed($nums->[$i]) and $nums->[$i]->isa("Math::BigInt")
943 0 0 if $nums->[$i]->is_neg or not $nums->[$i]->is_int
948 0 0 unless defined &blessed($base) and $base->isa("Math::BigInt")
955 0 0 unless $selfref
957 0 0 unless $LIB->can("_from_base_num")
971 0 2343 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
983 0 2343 if $IMPORT == 0
987 0 2343 if $selfref and $self->modify("bzero")
995 1903 440 unless $selfref
1004 12 2331 if (@r) { }
1897 434 elsif (not $selfref) { }
1005 0 9 if @r >= 2 and defined $r[0] and defined $r[1]
1021 0 476 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1033 0 476 if $IMPORT == 0
1037 0 476 if $selfref and $self->modify("bone")
1043 104 372 if (defined $_[0] and $_[0] =~ /^\s*([+-])\s*$/) { }
1052 272 204 unless $selfref
1061 18 458 if (@r) { }
266 192 elsif (not $selfref) { }
1062 0 15 if @r >= 2 and defined $r[0] and defined $r[1]
1078 0 2088 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1092 5 2083 if (${"${class}::_trap_inf";})
1097 0 2083 if $IMPORT == 0
1101 0 2083 if $selfref and $self->modify("binf")
1106 2032 51 if (defined $_[0] and $_[0] =~ /^\s*([+-])(inf|$)/i)
1117 1798 285 unless $selfref
1126 575 1508 if (@r) { }
1235 273 elsif (not $selfref) { }
1127 0 575 if @r >= 2 and defined $r[0] and defined $r[1]
1143 0 2246 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1157 4 2242 if (${"${class}::_trap_nan";})
1162 0 2242 if $IMPORT == 0
1166 0 2242 if $selfref and $self->modify("bnan")
1172 1230 1012 unless $selfref
1181 541 1701 if (@r) { }
900 801 elsif (not $selfref) { }
1182 0 539 if @r >= 2 and defined $r[0] and defined $r[1]
1197 0 9 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1228 0 9 if ($selfref) { }
1229 0 0 if $self->modify("bpi")
1234 0 9 if defined $upgrade
1245 4824 0 if (ref $_[0]) { }
1253 0 4824 if @_
1259 1302 3522 if exists $x->{'_a'}
1260 1288 3536 if exists $x->{'_p'}
1266 3 0 ref $_[0] ? :
1267 0 3 if @r
1272 3 0 if $x->isa("Math::BigInt")
1292 343 0 ref $_[0] ? :
1293 0 343 if @r
1314 0 0 ref $_[0] ? :
1315 0 0 if @r
1341 32528 4 ref $_[0] ? :
1343 2807 29725 unless $x->{'sign'} =~ /^\+$/
1349 1727 4 ref $_[0] ? :
1351 1127 604 if not defined $sign or $sign ne "-"
1353 606 1125 if $x->{'sign'} ne $sign
1358 364 0 ref $_[0] ? :
1364 38685 8 ref $_[0] ? :
1366 7080 31613 if (defined $sign)
1367 64 7016 if $sign eq ""
1368 7016 64 if $sign =~ /^([+-])(inf)?$/
1369 528 6552 $x->{'sign'} =~ /^$sign$/ ? :
1371 926 30687 $x->{'sign'} =~ /^[+-]inf$/ ? :
1376 48842 8 ref $_[0] ? :
1378 639 48211 $x->{'sign'} eq $nan ? :
1383 446 8 ref $_[0] ? :
1385 15 439 if $x->{'sign'} eq "+inf"
1388 364 75 $x->{'sign'} eq '+' && !$x->is_zero ? :
1393 2818 8 ref $_[0] ? :
1395 616 2210 $x->{'sign'} =~ /^-/ ? :
1400 56 8 ref $_[0] ? :
1402 32 32 if $x->{'sign'} =~ /^\+/
1403 0 32 if $x->is_zero
1409 56 8 ref $_[0] ? :
1411 24 40 if $x->{'sign'} =~ /^\-/
1412 8 32 if $x->is_zero
1418 185 0 ref $_[0] ? :
1420 7 178 unless $x->{'sign'} =~ /^[+-]$/
1426 44 0 ref $_[0] ? :
1428 4 40 unless $x->{'sign'} =~ /^[+-]$/
1434 46 0 ref $_[0] ? :
1436 30 16 $x->{'sign'} =~ /^[+-]$/ ? :
1448 2001 400 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1452 0 2401 if @r
1454 1 2400 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1457 320 2080 unless ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/)
1459 64 256 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1460 27 229 if $x->{'sign'} eq $y->{'sign'} and $x->{'sign'} =~ /^[+-]inf$/
1461 96 133 if $x->{'sign'} eq "+inf"
1462 114 19 if $x->{'sign'} eq "-inf"
1463 8 11 if $y->{'sign'} eq "+inf"
1468 262 1818 if $x->{'sign'} eq "+" and $y->{'sign'} eq "-"
1469 194 1624 if $x->{'sign'} eq "-" and $y->{'sign'} eq "+"
1476 1534 90 if ($x->{'sign'} eq "+")
1491 238 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1495 0 238 if @r
1497 0 238 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1500 72 166 unless ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/)
1502 28 44 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1503 16 28 if $x->{'sign'} =~ /^[+-]inf$/ and $y->{'sign'} =~ /^[+-]inf$/
1504 16 12 if $x->{'sign'} =~ /^[+-]inf$/ and not $y->{'sign'} =~ /^[+-]inf$/
1511 157 270 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1515 0 427 if @r
1522 18 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1526 0 18 if @r
1529 0 18 defined $cmp && !$cmp ? :
1533 5 614 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1537 0 619 if @r
1544 1207 271 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1548 0 1478 if @r
1555 1072 313 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1559 0 1385 if @r
1566 150 167 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1570 0 317 if @r
1583 486 0 ref $_[0] ? :
1585 0 486 if $x->modify("bneg")
1587 0 486 if defined $upgrade and not $x->isa("Math::BigInt")
1593 478 8 unless $x->{'sign'} eq "+" and $LIB->_is_zero($x->{'value'})
1601 313 8 ref $_[0] ? :
1603 0 321 if $x->modify("babs")
1605 0 25 if defined $upgrade and not $x->isa("Math::BigInt") and not $x->isa($upgrade)
1615 18 0 ref $_[0] ? :
1617 0 18 if $x->modify("bsgn")
1619 0 0 if defined $upgrade and not $x->isa("Math::BigInt") and not $x->isa($upgrade)
1622 6 12 if $x->is_pos
1623 6 6 if $x->is_neg
1631 0 792 ref $_[0] ? :
1637 0 792 if @r
1644 191 0 ref $_[0] ? :
1646 0 191 if $x->modify("binc")
1648 16 175 if $x->is_inf or $x->is_nan
1650 0 175 if defined $upgrade and not $x->isa("Math::BigInt")
1653 101 74 if ($x->{'sign'} eq '+') { }
74 0 elsif ($x->{'sign'} eq '-') { }
1657 8 66 if $LIB->_is_zero($x->{'value'})
1665 31 0 ref $_[0] ? :
1667 0 31 if $x->modify("bdec")
1669 12 19 if $x->is_inf or $x->is_nan
1671 0 19 if defined $upgrade and not $x->isa("Math::BigInt")
1674 4 15 if ($x->{'sign'} eq '-') { }
15 0 elsif ($x->{'sign'} eq '+') { }
1677 4 11 if ($LIB->_is_zero($x->{'value'})) { }
1783 1705 113 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1787 0 1818 if $x->modify("badd")
1791 2 1816 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1795 197 1619 unless ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/)
1797 88 109 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1799 54 55 if ($x->{'sign'} =~ /^[+-]inf$/ and $y->{'sign'} =~ /^[+-]inf$/)
1801 30 24 if $x->{'sign'} eq $y->{'sign'}
1806 35 20 if ($y->{'sign'} =~ /^[+-]inf$/)
1822 1062 54 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1826 0 1116 if $x->modify("bsub")
1828 0 1116 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1831 33 1083 if $y->is_zero
1839 12 1071 if ($xsign ne $x->{'sign'})
1841 6 6 if $xsign =~ /^[+-]$/
1855 1608 36 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1859 0 1644 if $x->modify("bmul")
1861 52 1592 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1864 52 1540 if ($x->{'sign'} =~ /^[+-]inf$/ or $y->{'sign'} =~ /^[+-]inf$/)
1865 12 40 if $x->is_zero or $y->is_zero
1869 10 30 if $x->{'sign'} =~ /^\+/ and $y->{'sign'} =~ /^\+/
1870 10 20 if $x->{'sign'} =~ /^-/ and $y->{'sign'} =~ /^-/
1874 8 1532 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1879 1467 65 $x->{'sign'} eq $y->{'sign'} ? :
1882 312 1220 if $LIB->_is_zero($x->{'value'})
1892 177 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
1897 0 177 if $x->modify("bmuladd")
1901 141 6 if ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/ and $z->{'sign'} =~ /^[+-]$/)
1905 0 141 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt') && $z->isa('Math::BigInt')
1915 0 141 if &refaddr($x) eq &refaddr($z)
1917 111 30 $x->{'sign'} eq $y->{'sign'} ? :
1919 21 120 if $LIB->_is_zero($x->{'value'})
1930 12 12 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan or $z->{'sign'} eq $nan
1934 6 6 if ($x->{'sign'} eq '-inf') { }
6 0 elsif ($x->{'sign'} eq '+inf') { }
0 0 elsif ($x->is_neg) { }
0 0 elsif ($x->is_zero) { }
0 0 elsif ($x->is_pos) { }
1936 3 3 if ($y->is_neg) { }
0 3 elsif ($y->is_zero) { }
1937 0 3 if ($z->{'sign'} eq '-inf') { }
1945 0 3 if ($z->{'sign'} eq '+inf') { }
1954 3 3 if ($y->is_neg) { }
0 3 elsif ($y->is_zero) { }
1955 0 3 if ($z->{'sign'} eq '+inf') { }
1963 0 3 if ($z->{'sign'} eq '-inf') { }
1972 0 0 if ($y->{'sign'} eq '-inf') { }
0 0 elsif ($y->{'sign'} eq '+inf') { }
1973 0 0 if ($z->{'sign'} eq '-inf') { }
1979 0 0 if ($z->{'sign'} eq '+inf') { }
1985 0 0 if ($z->{'sign'} eq '-inf') { }
0 0 elsif ($z->{'sign'} eq '+inf') { }
1994 0 0 if ($y->{'sign'} eq '-inf') { }
0 0 elsif ($y->{'sign'} eq '+inf') { }
1999 0 0 if ($z->{'sign'} eq '-inf') { }
0 0 elsif ($z->{'sign'} eq '+inf') { }
2008 0 0 if ($y->{'sign'} eq '-inf') { }
0 0 elsif ($y->{'sign'} eq '+inf') { }
2009 0 0 if ($z->{'sign'} eq '+inf') { }
2015 0 0 if ($z->{'sign'} eq '-inf') { }
2021 0 0 if ($z->{'sign'} eq '-inf') { }
0 0 elsif ($z->{'sign'} eq '+inf') { }
2038 1446 21 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2042 0 1467 if $x->modify("bdiv")
2049 51 1416 if ($x->is_nan or $y->is_nan)
2050 24 27 $wantarray ? :
2071 67 1349 if ($y->is_zero)
2073 32 35 if ($wantarray)
2076 17 50 if ($x->is_zero) { }
2081 32 32 $wantarray ? :
2098 96 1253 if ($x->is_inf)
2100 48 48 if $wantarray
2101 48 48 if ($y->is_inf) { }
2104 24 24 $x->bcmp(0) == $y->bcmp(0) ? :
2107 48 48 $wantarray ? :
2123 80 1173 if ($y->is_inf)
2125 56 24 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
2126 28 28 if $wantarray
2129 12 12 if $wantarray
2132 40 40 $wantarray ? :
2141 70 1103 if defined $upgrade
2159 6 1097 if ($same) { }
2165 522 575 if ($LIB->_is_zero($rem->{'value'})) { }
2166 469 53 if ($xsign eq $ysign or $LIB->_is_zero($x->{'value'})) { }
2172 524 51 if ($xsign eq $ysign) { }
2175 24 27 if ($xsign eq '+') { }
2187 491 612 if ($wantarray)
2188 379 112 unless ($LIB->_is_zero($rem->{'value'}))
2189 24 355 if ($xsign ne $ysign)
2211 366 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2215 0 366 if $x->modify("btdiv")
2222 0 366 if ($x->is_nan or $y->is_nan)
2223 0 0 $wantarray ? :
2244 30 336 if ($y->is_zero)
2246 15 15 if ($wantarray)
2249 6 24 if ($x->is_zero) { }
2254 15 15 $wantarray ? :
2271 48 288 if ($x->is_inf)
2273 24 24 if $wantarray
2274 24 24 if ($y->is_inf) { }
2277 12 12 $x->bcmp(0) == $y->bcmp(0) ? :
2280 24 24 $wantarray ? :
2296 36 252 if ($y->is_inf)
2298 18 18 if $wantarray
2300 18 18 $wantarray ? :
2306 0 252 if defined $upgrade
2324 0 252 if ($same) { }
2330 126 126 $xsign eq $ysign ? :
2331 108 144 if $LIB->_is_zero($x->{'value'})
2335 126 126 if (wantarray)
2337 78 48 if $LIB->_is_zero($rem->{'value'})
2351 679 21 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2355 0 700 if $x->modify("bmod")
2361 27 673 if ($x->is_nan or $y->is_nan)
2367 34 639 if ($y->is_zero)
2373 48 591 if ($x->is_inf)
2379 40 551 if ($y->is_inf)
2380 28 12 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
2387 0 551 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
2394 154 397 if ($LIB->_is_zero($x->{'value'})) { }
2398 138 259 if $x->{'sign'} ne $y->{'sign'}
2409 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2413 0 0 if $x->modify("btmod")
2417 0 0 if ($x->is_nan or $y->is_nan)
2423 0 0 if ($y->is_zero)
2429 0 0 if ($x->is_inf)
2435 0 0 if ($y->is_inf)
2439 0 0 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
2450 0 0 if $LIB->_is_zero($x->{'value'})
2467 243 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2471 0 243 if $x->modify("bmodinv")
2476 21 222 unless $y->{'sign'} =~ /^[+-]$/ and $x->{'sign'} =~ /^[+-]$/
2480 0 222 if $y->is_zero
2485 63 159 if $y->is_one("+") or $y->is_one("-")
2488 0 159 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
2502 36 123 if $x->is_zero
2508 21 102 unless defined $x->{'value'}
2513 0 102 unless defined $x->{'sign'}
2527 3 99 if $y->{'sign'} eq "-"
2531 54 48 if $x->{'sign'} ne $y->{'sign'}
2540 501 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
2545 0 501 if $num->modify("bmodpow")
2552 135 366 if $exp->{'sign'} eq "-"
2559 12 435 if $num->{'sign'} =~ /NaN|inf/ or $exp->{'sign'} =~ /NaN|inf/ or $mod->{'sign'} =~ /NaN|inf/
2563 3 432 if ($mod->is_zero)
2564 0 3 if ($num->is_zero) { }
2571 0 432 if defined $upgrade and not $num->isa('Math::BigInt') && $exp->isa('Math::BigInt') && &$mod($class)
2586 213 219 unless ($LIB->_is_zero($value))
2591 21 192 if ($num->{'sign'} eq '-' and $exp->is_odd) { }
2598 0 21 if ($mod->{'sign'} eq '-') { }
2620 3 189 if ($mod->{'sign'} eq "-")
2648 504 71 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2652 0 575 if $x->modify("bpow")
2655 65 510 if $x->is_nan or $y->is_nan
2658 39 471 if ($x->is_inf('-')) { }
35 436 elsif ($x->is_inf('+')) { }
21 415 elsif ($y->is_inf('-')) { }
21 394 elsif ($y->is_inf('+')) { }
2659 16 23 if $y->is_negative
2660 3 20 if $y->is_zero
2661 10 10 if $y->is_odd
2664 16 19 if $y->is_negative
2665 3 16 if $y->is_zero
2668 3 18 if $x->is_one("-")
2669 3 15 if $x->is_zero
2670 3 12 if $x->is_one("+")
2673 3 18 if $x->is_one("-")
2674 3 15 if $x->is_zero
2675 3 12 if $x->is_one("+")
2679 26 368 if ($x->is_zero)
2680 4 22 if $y->is_zero
2681 11 11 if $y->is_negative
2685 28 340 if ($x->is_one("+"))
2689 31 309 if ($x->is_one("-"))
2690 17 14 if $y->is_odd
2694 38 271 if defined $upgrade
2700 36 235 if ($y->{'sign'} eq "-" or not $y->isa("Math::BigInt"))
2707 21 214 $x->is_negative && $y->is_odd ? :
2722 0 199 if (not ref $_[0] and $_[0] =~ /^[a-z]\w*(?:::\w+)*$/i) { }
2724 0 0 defined $_[2] ? :
2728 166 33 defined $_[1] ? :
2732 0 199 if $x->modify("blog")
2737 9 190 if $x->is_nan
2739 160 30 if (defined $base)
2740 0 160 unless defined &blessed($base) and $base->isa("Math::BigInt")
2742 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) { }
2745 21 15 if $x->is_inf or $x->is_zero
2748 3 9 if $x->is_one
2749 0 9 if $x == $base
2751 0 9 if defined $upgrade
2754 3 97 if $x == $base
2759 15 112 if ($x->is_inf) { }
6 106 elsif ($x->is_neg) { }
9 97 elsif ($x->is_one) { }
6 91 elsif ($x->is_zero) { }
2762 0 6 if defined $upgrade
2772 2 89 if defined $upgrade
2776 15 74 unless (defined $base)
2802 0 74 unless defined $rc
2810 15 0 ref $_[0] ? :
2812 0 15 if $x->modify("bexp")
2815 3 12 if $x->{'sign'} eq "NaN"
2816 0 12 if $x->is_zero
2817 3 9 if $x->{'sign'} eq "+inf"
2818 0 9 if $x->{'sign'} eq "-inf"
2820 0 9 if defined $upgrade
2833 93 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2837 0 93 if @r
2839 0 93 if $n->modify("bnok")
2843 9 84 if $n->{'sign'} eq "NaN" or $k->{'sign'} eq "NaN"
2847 7 77 if ($n->is_inf) { }
0 77 elsif ($k->is_inf) { }
2848 0 7 if ($k->is_inf) { }
0 7 elsif ($k->is_neg) { }
0 7 elsif ($k->is_zero) { }
2855 7 0 if ($n->is_inf('+', @r)) { }
2858 0 0 $k->is_even ? :
2870 0 77 if defined $upgrade and not $n->isa('Math::BigInt') && $k->isa('Math::BigInt')
2876 77 0 if ($n >= 0) { }
2877 21 56 if ($k < 0 or $k > $n)
2882 0 0 if ($k >= 0) { }
0 0 elsif ($k <= $n) { }
2908 0 56 if $sign == -1
2938 0 0 if $a < 0
2939 0 0 if $n < 0
2940 0 0 if $b < 0
2946 0 0 if ($_[-2] == 1)
2954 0 0 if ($_[-2] == 0)
2962 0 0 if ($_[-1] == 0)
3003 0 0 if $m < 0
3004 0 0 if $n < 0
3011 0 0 unless ref $n
3014 0 0 if ($m > $three) { }
0 0 elsif ($m == $three) { }
0 0 elsif ($m == $two) { }
0 0 elsif ($m >= 0) { }
3036 0 0 ref $_[0] ? :
3038 0 0 if $x->modify("bsin")
3040 0 0 unless $x->{'sign'} =~ /^[+-]\z/
3041 0 0 if $x->is_zero
3043 0 0 if defined $upgrade
3049 0 0 if $t->is_one
3050 0 0 if $t->is_zero
3057 0 0 ref $_[0] ? :
3059 0 0 if $x->modify("bcos")
3061 0 0 unless $x->{'sign'} =~ /^[+-]\z/
3062 0 0 if $x->is_zero
3064 0 0 if defined $upgrade
3075 0 0 ref $_[0] ? :
3077 0 0 if $x->modify("batan")
3079 0 0 if $x->is_nan
3080 0 0 if $x->is_zero
3082 0 0 if defined $upgrade
3084 0 0 if $x->bgt(1)
3085 0 0 if $x->blt(-1)
3093 84 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3096 0 84 if $y->modify("batan2")
3098 9 75 if $y->{'sign'} eq $nan or $x->{'sign'} eq $nan
3100 0 75 if defined $upgrade
3104 30 45 if ($x->is_inf or $y->is_inf)
3105 18 12 if ($y->is_inf) { }
3106 6 12 if ($x->{'sign'} eq '-inf') { }
6 6 elsif ($x->{'sign'} eq '+inf') { }
3118 3 9 if ($x->{'sign'} eq '+inf') { }
3143 520 3 ref $_[0] ? :
3145 0 523 if $x->modify("bsqrt")
3147 16 507 unless $x->{'sign'} =~ /^\+/
3148 4 503 if $x->{'sign'} eq "+inf"
3150 22 481 if defined $upgrade
3161 166 8 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3164 0 174 unless defined $y
3166 0 174 if $x->modify("broot")
3170 27 99 if not $x->{'sign'} =~ /^\+/ or $y->is_zero or not $y->{'sign'} =~ /^\+$/
3172 6 87 if $x->is_zero or $x->is_one or $x->is_inf or $y->is_one
3175 2 85 if defined $upgrade
3184 81 0 ref $_[0] ? :
3186 3 78 if $x->modify("bfac") or $x->{'sign'} eq "+inf"
3188 9 69 if $x->{'sign'} ne "+"
3190 0 69 if defined $upgrade and not $x->isa("Math::BigInt")
3199 54 0 ref $_[0] ? :
3201 3 51 if $x->modify("bdfac") or $x->{'sign'} eq "+inf"
3203 9 42 if $x->is_nan or $x <= -2
3204 9 33 if $x <= 1
3206 0 33 if defined $upgrade and not $x->isa("Math::BigInt")
3209 0 33 unless $LIB->can("_dfac")
3218 57 0 ref $_[0] ? :
3220 3 54 if $x->modify("btfac") or $x->{'sign'} eq "+inf"
3222 3 51 if $x->is_nan
3224 0 51 if defined $upgrade and not $x->isa("Math::BigInt")
3228 6 45 if $x <= -$k
3231 12 33 if $x <= $one
3243 270 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3246 15 255 if $x->modify("bmfac") or $x->{'sign'} eq "+inf"
3247 39 198 if $x->is_nan or $k->is_nan or $k < 1 or $x <= -$k
3249 0 198 if defined $upgrade and not $x->isa("Math::BigInt")
3253 60 138 if $x <= $one
3264 0 0 ref $_[0] ? :
3266 0 0 unless $LIB->can("_fib")
3269 0 0 if $x->modify("bfib")
3271 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
3276 0 0 if (wantarray) { }
3277 0 0 if $x->is_nan
3278 0 0 if $x->is_inf
3299 0 0 if ($x->is_neg)
3312 0 0 if $x->modify("bdfac") or $x->is_inf("+")
3313 0 0 if $x->is_nan or $x->is_inf("-")
3315 0 0 $x->is_neg && $x->is_even ? :
3323 0 0 ref $_[0] ? :
3325 0 0 unless $LIB->can("_lucas")
3328 0 0 if $x->modify("blucas")
3330 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
3335 0 0 if (wantarray) { }
3336 0 0 if $x->is_nan
3337 0 0 if $x->is_inf
3358 0 0 if ($x->is_neg)
3371 0 0 if $x->is_inf("+")
3372 0 0 if $x->is_nan or $x->is_inf("-")
3374 0 0 $x->is_neg && $x->is_even ? :
3389 12 50 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
3391 0 12 defined $_[3] ? :
3395 44 6 defined $_[2] ? :
3399 0 62 if $x->modify("blsft")
3401 18 44 unless defined $b
3402 18 44 unless defined &blessed($b)
3404 0 62 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt') && $b->isa('Math::BigInt')
3409 0 62 if $x->is_nan or $y->is_nan or $b->is_nan
3413 4 58 if $y->is_neg
3419 0 0 if $b->is_one("+") or $y->is_zero
3422 0 0 if ($y->is_inf("+"))
3423 0 0 if $x->is_pos
3424 0 0 if $x->is_neg
3430 0 0 if $x->is_zero and $y->is_inf("+")
3433 0 0 if $x->is_zero
3435 0 0 if $y->is_inf("+")
3436 0 0 if $x->is_zero
3443 0 0 if ($x->bcmp($uintmax) > 0) { }
3461 12 122 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
3463 0 12 defined $_[3] ? :
3467 116 6 defined $_[2] ? :
3471 0 134 if $x->modify("brsft")
3473 18 116 unless defined $b
3474 18 116 unless defined &blessed($b)
3476 0 134 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt') && $b->isa('Math::BigInt')
3481 0 134 if $x->is_nan or $y->is_nan or $b->is_nan
3485 4 130 if $y->is_neg
3487 8 122 if $y->is_zero
3488 0 122 if $x->is_zero
3492 11 111 if defined $upgrade and $y->is_pos
3496 57 54 if ($x->is_neg and $b->bcmp(2) == 0)
3497 3 54 if $x->is_one("-")
3507 3 51 if $y >= $nbits
3522 0 54 if ($x->bcmp($uintmax) > 0 or $x->is_neg) { }
3546 27 8 if (ref $_[0]) { }
3548 0 27 if ref $y and not $y->isa("Math::BigInt") and $y->can("as_int")
3550 0 27 unless ref $y
3558 16 0 if ref $_ and not $_->isa("Math::BigInt") and $_->can("as_int")
3560 0 16 unless ref $_
3564 0 35 if $x->modify("bblsft")
3566 4 31 if $x->is_nan or $y->is_nan
3570 4 27 if $y->is_neg
3574 0 27 if ($y->is_inf("+"))
3575 0 0 if $x->is_pos
3576 0 0 if $x->is_neg
3582 0 27 if $x->is_zero or $x->is_inf or $y->is_zero
3599 27 8 if (ref $_[0]) { }
3601 0 27 if ref $y and not $y->isa("Math::BigInt") and $y->can("as_int")
3603 0 27 unless ref $y
3611 16 0 if ref $_ and not $_->isa("Math::BigInt") and $_->can("as_int")
3613 0 16 unless ref $_
3617 0 35 if $x->modify("bbrsft")
3619 4 31 if $x->is_nan or $y->is_nan
3623 4 27 if $y->is_neg
3627 0 27 if ($y->is_inf("+"))
3628 0 0 if $x->is_inf
3629 0 0 if $x->is_neg
3635 0 27 if $x->is_zero or $x->is_inf or $y->is_zero
3640 27 0 if ($x->is_pos) { }
3646 0 0 unless $LIB->_is_zero($q)
3657 174 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3660 0 175 if $x->modify("band")
3662 1 174 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
3668 12 162 unless $x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/
3670 129 33 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
3683 235 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3686 0 236 if $x->modify("bior")
3688 1 235 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
3694 12 223 unless $x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/
3696 188 35 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
3709 245 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3712 0 246 if $x->modify("bxor")
3714 1 245 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
3720 12 233 unless $x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/
3722 193 40 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
3734 39 0 ref $_[0] ? :
3736 0 39 if $x->modify("bnot")
3738 0 39 if defined $upgrade and not $x->isa("Math::BigInt")
3752 71804 0 ref $_[0] ? :
3756 3599 103 if (@args >= 2 and @args <= 3 and not defined $args[0] and not defined $args[1])
3769 304 67901 if (defined $a)
3770 0 304 unless $a =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
3774 92 68113 if (defined $p)
3775 0 92 unless $p =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
3780 67901 304 unless (defined $a)
3784 20886 13470 if defined $_->{'_a'} and !defined($a) || $_->{'_a'} < $a
3787 68113 92 unless (defined $p)
3793 111 3 if defined $_->{'_p'} and !defined($p) || $_->{'_p'} > $p
3800 46880 21325 unless (defined $a or defined $p)
3806 6 68199 if defined $a and $a == 0
3809 46842 21363 unless defined $a or defined $p
3812 58 21305 if defined $a and defined $p
3814 21244 61 unless defined $r
3815 0 21305 unless ($r =~ /^(even|odd|[+-]inf|zero|trunc|common)$/)
3820 21140 165 if (defined $a) { }
3822 21134 6 if not defined $self->{'_a'} or $self->{'_a'} >= $a
3825 165 0 if not defined $self->{'_p'} or $self->{'_p'} <= $p
3839 26041 0 ref $_[0] ? :
3842 2 26039 if not defined $scale or $x->modify("bround")
3844 101 25938 if ($x->is_zero or $scale == 0)
3845 89 12 if not defined $x->{'_a'} or $x->{'_a'} > $scale
3848 12 25926 unless $x->{'sign'} =~ /^[+-]$/
3855 0 25926 if ref $scale
3858 194 25732 if ($scale < 0 and $scale < -$len - 1 or $scale >= $len)
3859 164 30 if not defined $x->{'_a'} or $x->{'_a'} > $scale
3866 134 25598 if $scale < 0
3876 25610 122 if $pad <= $len
3878 125 25607 if $pad >= $len
3880 25732 0 if $pad > 0
3895 12871 351 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'
3900 25610 122 if ($pad > 0 and $pad <= $len) { }
122 0 elsif ($pad > $len) { }
3908 12381 13351 if ($round_up)
3910 57 12324 if $scale < 0
3918 1372 12324 if $c eq 10
3921 12324 1372 if $c != 0
3923 57 12324 if $c == 0
3925 25667 65 if $put_back == 1
3927 25598 134 if $scale >= 0
3928 134 25598 if ($scale < 0)
3930 3 131 if $scale < -$len
3939 212 0 ref $_[0] ? :
3943 0 212 if not defined $scale or $x->modify("bfround")
3946 104 108 if $scale > 0
3957 0 0 unless ref $x
3963 36 0 ref $_[0] ? :
3965 0 36 if defined $upgrade and not $x->isa("Math::BigInt")
3973 36 0 ref $_[0] ? :
3975 0 36 if defined $upgrade and not $x->isa("Math::BigInt")
3983 38 0 ref $_[0] ? :
3985 0 38 if defined $upgrade and not $x->isa("Math::BigInt")
4001 1 96 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
4013 15 82 if (defined $upgrade)
4016 0 32 unless ($arg->isa("Math::BigInt"))
4021 0 15 if $do_upgrade
4025 97 0 defined &blessed($x) && $x->isa('Math::BigInt') ? :
4028 23 74 unless $x->{'sign'} =~ /^[+-]$/
4032 0 84 unless defined &blessed($y) and $y->isa("Math::BigInt")
4034 10 74 unless $y->{'sign'} =~ /^[+-]$/
4036 35 39 if $LIB->_is_one($x->{'value'})
4048 1 34 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
4060 8 27 if (defined $upgrade)
4063 0 16 unless ($arg->isa("Math::BigInt"))
4068 0 8 if $do_upgrade
4072 35 0 defined &blessed($x) && $x->isa('Math::BigInt') ? :
4074 8 27 unless $x->{'sign'} =~ /^[+-]$/
4078 0 30 unless defined &blessed($y) and $y->isa("Math::BigInt")
4080 4 26 unless $y->{'sign'} =~ /^[+-]$/
4093 8837 0 ref $_[0] ? :
4095 0 8837 if @r
4102 84 3 ref $_[0] ? :
4104 0 87 if @r
4106 63 24 if ref $n
4112 0 0 ref $_[0] ? :
4114 0 0 if @r
4116 0 0 if $x->is_nan
4117 0 0 if $x->is_inf
4126 0 0 ref $_[0] ? :
4128 0 0 if @r
4130 0 0 if $x->is_nan
4131 0 0 if $x->is_inf
4139 26074 0 ref $_[0] ? :
4141 0 26074 if @r
4144 6 26068 wantarray ? :
4149 72 0 ref $_[0] ? :
4151 0 72 if @r
4155 0 72 if defined $upgrade and not $x->isa("Math::BigInt")
4158 24 48 unless ($x->{'sign'} =~ /^[+-]$/)
4163 8 40 if $x->is_zero
4171 68 0 ref $_[0] ? :
4173 0 68 if @r
4177 0 68 if defined $upgrade and not $x->isa("Math::BigInt")
4180 24 44 unless ($x->{'sign'} =~ /^[+-]$/)
4190 8 36 if $zeros != 0
4196 36 0 ref $_[0] ? :
4198 0 36 if @r
4202 0 36 if defined $upgrade and not $x->isa("Math::BigInt")
4213 0 0 ref $_[0] ? :
4215 0 0 if @r
4219 0 0 if ($x->is_nan)
4221 0 0 unless wantarray
4228 0 0 if ($x->is_inf)
4230 0 0 unless wantarray
4237 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4246 0 0 if $nzeros != 0
4248 0 0 unless wantarray
4259 0 0 ref $_[0] ? :
4261 0 0 if @r
4265 0 0 if $x->is_nan or $x->is_inf
4269 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4275 0 0 if ($mant->bcmp(0))
4279 0 0 if ($expo10adj > 0)
4280 0 0 if defined $upgrade
4282 0 0 unless wantarray
4288 0 0 unless wantarray
4297 0 0 ref $_[0] ? :
4299 0 0 if @r
4303 0 0 if $x->is_nan or $x->is_inf
4307 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4314 0 0 if ($mant->bcmp(0))
4324 0 0 if ($ndigmant > $c)
4325 0 0 if defined $upgrade
4327 0 0 unless wantarray
4334 0 0 unless wantarray
4342 0 0 ref $_[0] ? :
4344 0 0 if @r
4348 0 0 if ($x->is_nan)
4350 0 0 unless wantarray
4357 0 0 if ($x->is_inf)
4359 0 0 unless wantarray
4366 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4372 0 0 unless wantarray
4382 0 0 ref $_[0] ? :
4384 0 0 if @r
4388 0 0 if ($x->is_nan)
4389 0 0 unless wantarray
4395 0 0 if ($x->is_inf)
4397 0 0 unless wantarray
4404 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4410 0 0 unless wantarray
4416 0 0 ref $_[0] ? :
4418 0 0 if @r
4420 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4427 0 0 ref $_[0] ? :
4429 0 0 if @r
4431 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4434 0 0 $x->is_nan ? :
4442 12024 12 ref $_[0] ? :
4444 0 12036 if @r
4448 2703 9333 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4449 2159 544 unless $x->{'sign'} eq "+inf"
4455 0 9333 if defined $upgrade and not $x->isa("Math::BigInt")
4461 1137 8196 $x->{'sign'} eq '-' ? :
4468 50 16 ref $_[0] ? :
4470 0 66 if @r
4474 18 48 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4475 11 7 unless $x->{'sign'} eq "+inf"
4481 0 48 if defined $upgrade and not $x->isa("Math::BigInt")
4488 25 23 if $expo
4490 14 34 $x->{'sign'} eq '-' ? :
4496 0 0 ref $_[0] ? :
4498 0 0 if @r
4502 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4503 0 0 unless $x->{'sign'} eq "+inf"
4509 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4516 0 0 if $expo
4519 0 0 if ($mantlen > 1)
4524 0 0 $x->{'sign'} eq '-' ? :
4530 0 0 ref $_[0] ? :
4532 0 0 if @r
4536 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4537 0 0 unless $x->{'sign'} eq "+inf"
4543 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4550 0 0 if $expo
4557 0 0 if ($dotpos < $mantlen) { }
0 0 elsif ($dotpos > $mantlen) { }
4563 0 0 $x->{'sign'} eq '-' ? :
4569 24 0 ref $_[0] ? :
4571 0 24 if @r
4575 8 16 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4576 7 1 unless $x->{'sign'} eq "+inf"
4582 0 16 if defined $upgrade and not $x->isa("Math::BigInt")
4587 1 15 $x->{'sign'} eq '-' ? :
4594 0 0 ref $_[0] ? :
4596 0 0 if @r
4600 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4601 0 0 unless $x->{'sign'} eq "+inf"
4607 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4612 0 0 $x->{'sign'} eq '-' ? :
4618 36 0 ref $_[0] ? :
4620 0 36 if @r
4624 12 24 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4625 8 4 unless $x->{'sign'} eq "+inf"
4631 0 24 if defined $upgrade and not $x->isa("Math::BigInt")
4637 4 20 $x->{'sign'} eq '-' ? :
4643 40 0 ref $_[0] ? :
4645 0 40 if @r
4649 12 28 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4650 8 4 unless $x->{'sign'} eq "+inf"
4656 0 28 if defined $upgrade and not $x->isa("Math::BigInt")
4662 4 24 $x->{'sign'} eq '-' ? :
4668 93 0 ref $_[0] ? :
4670 0 93 if @r
4674 12 81 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4675 8 4 unless $x->{'sign'} eq "+inf"
4681 0 81 if defined $upgrade and not $x->isa("Math::BigInt")
4687 58 23 $x->{'sign'} eq '-' ? :
4693 0 0 ref $_[0] ? :
4695 0 0 if @r
4697 0 0 if $x->is_neg or not $x->is_int
4700 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4703 0 0 unless $LIB->can("_to_bytes")
4713 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
4716 0 0 if @r
4718 0 0 if $x->is_neg or not $x->is_int
4721 0 0 if $base < 2 or not $base->is_int
4727 0 0 unless (defined $cs)
4728 0 0 if $base == 2
4729 0 0 if $base == 8
4730 0 0 if $base == 16
4731 0 0 if $base == 10
4734 0 0 unless $LIB->can("_to_base")
4737 0 0 if defined $upgrade and not $x->isa('Math::BigInt') && $base->isa('Math::BigInt')
4742 0 0 defined $cs ? :
4750 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
4753 0 0 if @r
4755 0 0 if $x->is_neg or not $x->is_int
4758 0 0 if $base < 2 or not $base->is_int
4761 0 0 unless $LIB->can("_to_base")
4764 0 0 if defined $upgrade and not $x->isa('Math::BigInt') && $base->isa('Math::BigInt')
4785 36 0 ref $_[0] ? :
4787 0 36 if @r
4789 12 24 unless $x->{'sign'} =~ /^[+-]$/
4791 0 24 if defined $upgrade and not $x->isa("Math::BigInt")
4795 4 20 $x->{'sign'} eq '-' ? :
4801 40 0 ref $_[0] ? :
4803 0 40 if @r
4805 12 28 unless $x->{'sign'} =~ /^[+-]$/
4807 0 28 if defined $upgrade and not $x->isa("Math::BigInt")
4811 4 24 $x->{'sign'} eq '-' ? :
4817 39 0 ref $_[0] ? :
4819 0 39 if @r
4821 12 27 unless $x->{'sign'} =~ /^[+-]$/
4823 0 27 if defined $upgrade and not $x->isa("Math::BigInt")
4827 4 23 $x->{'sign'} eq '-' ? :
4838 495 0 ref $_[0] ? :
4840 0 495 if @r
4842 0 495 if ($x->is_nan)
4848 0 495 if ($x->is_inf)
4851 0 0 $x->is_negative ? :
4854 0 495 if defined $upgrade and not $x->isa("Math::BigInt")
4858 39 456 $x->{'sign'} eq '-' ? :
4887 150 1 if @_ == 2 and ($_[0] || 0) == 1 and ref $_[1]
4891 0 5001 unless (wantarray)
4908 3728 1273 if (ref $a[0]) { }
1261 12 elsif ($a[0] =~ /^[A-Z].*::/) { }
4933 14 4987 if (defined ${"$a[0]::downgrade";})
4944 4214 4922 unless ($ref)
4951 4518 404 if $ref->isa($a[0])
4956 281 123 unless ($have_upgrade_chain)
4960 0 17 if $upg eq $cls
4969 16 1 if $ref->isa($upg)
4978 42 346 if ($a[0]->isa('Math::BigInt')) { }
346 0 elsif ($a[0]->isa('Math::BigFloat')) { }
4979 42 0 if ($a[$i]->can('as_int')) { }
0 0 elsif ($a[$i]->can('as_number')) { }
4989 346 0 if ($a[$i]->can("as_float"))
4997 44 344 if ($recheck)
5002 0 44 unless ($ref)
5009 43 1 if $ref->isa($a[0])
5034 1 90 if ($param eq ":constant")
5048 0 0 if $_[0] =~ /^0_*[0-7]/
5056 2 88 if ($param eq "upgrade")
5063 0 88 if ($param eq "downgrade")
5070 0 88 if ($param eq "accuracy")
5077 0 88 if ($param eq "precision")
5084 0 88 if ($param eq "round_mode")
5091 29 59 if ($param =~ /^(lib|try|only)\z/)
5098 0 29 unless @_
5101 0 29 unless defined $libs
5111 0 29 if ($lib =~ /[^a-zA-Z0-9_:]/)
5116 0 29 unless (CORE::length $lib)
5121 24 5 unless $lib =~ /^Math::BigInt::/i
5126 10 19 if (defined $LIB)
5127 3 7 if ($lib ne $LIB)
5137 10 19 if defined $LIB
5139 0 19 unless @libs
5146 19 0 unless ($@)
5152 19 0 if defined $LIB
5157 0 0 if ($param eq "only")
5168 0 0 if ($@)
5177 0 0 if ($param eq "lib")
5193 58 45 if (@a)
5202 32 71 unless (defined $LIB)
5204 0 32 if ($@)
5217 0 0 unless ref $x
5219 0 0 unless $x->{'sign'} =~ /^[+-]$/
5228 23 2960 if $len == 1
5230 653 2307 if $follow > $len or $follow < 1
5233 2221 86 substr($xs, -$follow) =~ /[^0]/ ? :
5259 309 0 $a->can('numify') ? :
309 9893 if defined $a and ref $a
5260 0 0 $p->can('numify') ? :
0 10202 if defined $p and ref $p
5263 994 9208 unless (defined $a)
5267 32 0 if defined $_->{'_a'} and !defined($a) || $_->{'_a'} < $a
5270 10150 52 unless (defined $p)
5276 10 0 if defined $_->{'_p'} and !defined($p) || $_->{'_p'} > $p
5281 962 9240 unless defined $a
5282 10140 62 unless defined $p
5285 16 10186 if defined $a and $a == 0
5288 911 9291 unless defined $a or defined $p
5291 9 9282 if defined $a and defined $p
5293 9273 9 unless defined $r
5294 3 9279 unless ($r =~ /^(even|odd|[+-]inf|zero|trunc|common)$/)
5298 9218 61 if defined $a
5299 61 9218 if defined $p
5314 0 0 unless CORE::length((my $dummy = "") & $value)
5315 0 0 unless 0 + $value eq $value
5316 0 0 if $value * 0 == 0
5335 10044 20 unless $sig_str =~ s/\.0*$//
5337 4756 5308 unless CORE::length $sig_str
5339 4756 5308 if $sig_str eq 0
5343 4863 445 unless CORE::length $exp_str
5344 4863 445 if $exp_str eq 0
5368 8695 1090 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)
5431 1114 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)
5485 3 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)
5539 252 23 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)
5596 4744 3951 if ($sig_str eq 0)
5613 2324 1627 if ($idx >= 0)
5633 863 3088 if ($sig_str =~ s/(0+)\z//)
5642 0 3951 unless (CORE::length $sig_str)
5666 12 1357 if ($sig_str eq 0)
5684 3 1354 if ($idx >= 0)
5690 2 1 if $bpc != 1
5705 241 1116 if ($sig_str =~ s/(0+)\z//)
5709 216 25 if $bpc != 1
5718 0 1357 unless (CORE::length $sig_str)
5724 1110 0 $bpc == 4 ? :
3 1110 $bpc == 3 ? :
244 1113 $bpc == 1 ? :
5731 1356 1 if ($exp_sgn eq '+') { }
5733 242 1114 unless ($LIB->_is_zero($exp_lib))
5761 213 1144 if ($n)
5778 1114 4 if (my(@parts) = $class->_hex_str_to_hex_str_parts($str))
5792 3 0 if (my(@parts) = $class->_oct_str_to_oct_str_parts($str))
5806 252 23 if (my(@parts) = $class->_bin_str_to_bin_str_parts($str))
5819 8695 1090 if (my(@parts) = $class->_dec_str_to_dec_str_parts($str))
5830 0 0 if (my(@parts) = $class->_hex_str_to_flt_lib_parts($str))
5841 0 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
5852 0 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
5863 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
5874 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
5885 0 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
5896 0 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
5907 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
5926 0 0 if ($parts[2] eq '+') { }
5939 0 0 if ($len_cmp <= 0) { }
5972 0 0 if ($esgn eq '-') { }
0 0 elsif (not $LIB->_is_zero($eabs)) { }