Branch Coverage

blib/lib/Math/BigInt.pm
Criterion Covered Total %
branch 1215 2038 59.6


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
328 0 15 unless $ds > 0
329 0 15 if defined &blessed($ds)
337 922 9 defined $ds ? :
351 526 7495 if (@_ > 0)
353 433 93 if (defined $a)
354 0 0 $a->can('numify') ? :
0 433 if ref $a
356 0 433 unless $a =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
358 0 433 if $a != int $a
360 0 433 if $a <= 0
364 442 84 if (ref $x) { }
366 389 53 if defined $a
370 53 389 unless defined $a
381 86 7409 if ref $x
397 293 7502 if (@_ > 0)
399 208 85 if (defined $p)
400 0 0 $p->can('numify') ? :
0 208 if ref $p
401 0 208 unless $p =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
403 0 208 if $p != int $p
407 207 86 if (ref $x) { }
409 158 49 if defined $p
413 49 158 unless defined $p
424 87 7415 if ref $x
435 30 256 if (@_ > 1 or @_ == 1 and ref $_[0] eq "HASH")
439 28 2 if (ref $args ne "HASH")
451 28 212 if exists $args->{$key}
454 2 28 if (keys %$args > 0)
459 16 12 if ($key =~ /^trap_(inf|nan)\z/)
460 12 4 $$set_args{"trap_$1"} ? :
486 230 54 if (@_ == 1 and ref $_[0] ne "HASH")
498 3894 63611 unless defined $scale
503 3891 63614 unless defined $scale
504 12203 55302 unless defined $mode
506 63614 3891 if (defined $scale)
507 434 0 $scale->can('numify') ? :
434 63180 if ref $scale
520 4 932 unless defined $scale
525 4 932 unless defined $scale
526 716 220 unless defined $mode
528 932 4 if (defined $scale)
529 0 0 $scale->can('numify') ? :
0 932 if ref $scale
555 2 19922 if $IMPORT == 0
560 8 19916 unless @_
564 0 19916 unless (defined $wanted)
570 4 19912 if (not ref $wanted and $wanted eq "")
583 5 19907 if (defined &blessed($wanted) and $wanted->isa("Math::BigInt"))
590 0 1 unless @r >= 2 and not defined $r[0] and not defined $r[1]
597 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)
616 1755 5323 if ($wanted =~ / ^ \s* ( [+-]? ) inf (?: inity )? \s* \z /xi)
630 391 4932 if ($wanted =~ / ^ \s* ( [+-]? ) nan \s* \z /xi)
643 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))
687 4252 41 if ($parts[2] eq "+")
690 2 1124 unless @r >= 2 and not defined $r[0] and not defined $r[1]
697 10 31 if defined $upgrade
717 0 0 if $selfref and $self->modify("from_dec")
724 0 0 unless $selfref
726 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
730 0 0 if ($parts[2] eq "+")
738 0 0 if defined $upgrade
753 0 2 if $selfref and $self->modify("from_hex")
760 2 0 unless $selfref
762 2 0 if (my(@parts) = $class->_hex_str_to_flt_lib_parts($str))
766 2 0 if ($parts[2] eq "+")
774 0 0 if defined $upgrade
789 0 2 if $selfref and $self->modify("from_oct")
796 2 0 unless $selfref
798 2 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
802 2 0 if ($parts[2] eq "+")
810 0 0 if defined $upgrade
825 0 53 if $selfref and $self->modify("from_bin")
832 53 0 unless $selfref
834 53 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
838 53 0 if ($parts[2] eq "+")
846 0 0 if defined $upgrade
861 0 0 if $selfref and $self->modify("from_bytes")
863 0 0 unless $LIB->can("_from_bytes")
871 0 0 unless $selfref
884 0 0 if $selfref and $self->modify("from_base")
888 0 0 unless ref $base
890 0 0 if $base < 2 or not $base->is_int
895 0 0 unless $selfref
900 0 0 unless (defined $cs)
901 0 0 if $base == 2
902 0 0 if $base == 8
903 0 0 if $base == 16
904 0 0 if ($base == 10)
912 0 0 unless $LIB->can("_from_base")
917 0 0 defined $cs ? :
928 0 0 if $selfref and $self->modify("from_base_num")
937 0 0 unless defined &blessed($nums->[$i]) and $nums->[$i]->isa("Math::BigInt")
941 0 0 if $nums->[$i]->is_neg or not $nums->[$i]->is_int
946 0 0 unless defined &blessed($base) and $base->isa("Math::BigInt")
953 0 0 unless $selfref
955 0 0 unless $LIB->can("_from_base_num")
969 0 2343 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
981 0 2343 if $IMPORT == 0
985 0 2343 if $selfref and $self->modify("bzero")
993 1903 440 unless $selfref
1002 12 2331 if (@r) { }
1897 434 elsif (not $selfref) { }
1003 0 9 if @r >= 2 and defined $r[0] and defined $r[1]
1019 0 476 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1031 0 476 if $IMPORT == 0
1035 0 476 if $selfref and $self->modify("bone")
1041 104 372 if (defined $_[0] and $_[0] =~ /^\s*([+-])\s*$/) { }
1050 272 204 unless $selfref
1059 18 458 if (@r) { }
266 192 elsif (not $selfref) { }
1060 0 15 if @r >= 2 and defined $r[0] and defined $r[1]
1076 0 2088 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1090 5 2083 if (${"${class}::_trap_inf";})
1095 0 2083 if $IMPORT == 0
1099 0 2083 if $selfref and $self->modify("binf")
1104 2032 51 if (defined $_[0] and $_[0] =~ /^\s*([+-])(inf|$)/i)
1115 1798 285 unless $selfref
1124 575 1508 if (@r) { }
1235 273 elsif (not $selfref) { }
1125 0 575 if @r >= 2 and defined $r[0] and defined $r[1]
1141 0 2246 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1155 4 2242 if (${"${class}::_trap_nan";})
1160 0 2242 if $IMPORT == 0
1164 0 2242 if $selfref and $self->modify("bnan")
1170 1230 1012 unless $selfref
1179 541 1701 if (@r) { }
900 801 elsif (not $selfref) { }
1180 0 539 if @r >= 2 and defined $r[0] and defined $r[1]
1195 0 9 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
1226 0 9 if ($selfref) { }
1227 0 0 if $self->modify("bpi")
1232 0 9 if defined $upgrade
1243 4824 0 if (ref $_[0]) { }
1251 0 4824 if @_
1257 1302 3522 if exists $x->{'_a'}
1258 1288 3536 if exists $x->{'_p'}
1264 3 0 ref $_[0] ? :
1265 0 3 if @r
1270 3 0 if $x->isa("Math::BigInt")
1290 343 0 ref $_[0] ? :
1291 0 343 if @r
1312 0 0 ref $_[0] ? :
1313 0 0 if @r
1339 32528 4 ref $_[0] ? :
1341 2807 29725 unless $x->{'sign'} =~ /^\+$/
1347 1727 4 ref $_[0] ? :
1349 1127 604 if not defined $sign or $sign ne "-"
1351 606 1125 if $x->{'sign'} ne $sign
1356 364 0 ref $_[0] ? :
1362 38685 8 ref $_[0] ? :
1364 7080 31613 if (defined $sign)
1365 64 7016 if $sign eq ""
1366 7016 64 if $sign =~ /^([+-])(inf)?$/
1367 528 6552 $x->{'sign'} =~ /^$sign$/ ? :
1369 926 30687 $x->{'sign'} =~ /^[+-]inf$/ ? :
1374 48842 8 ref $_[0] ? :
1376 639 48211 $x->{'sign'} eq $nan ? :
1381 446 8 ref $_[0] ? :
1383 15 439 if $x->{'sign'} eq "+inf"
1386 364 75 $x->{'sign'} eq '+' && !$x->is_zero ? :
1391 2818 8 ref $_[0] ? :
1393 616 2210 $x->{'sign'} =~ /^-/ ? :
1398 56 8 ref $_[0] ? :
1400 32 32 if $x->{'sign'} =~ /^\+/
1401 0 32 if $x->is_zero
1407 56 8 ref $_[0] ? :
1409 24 40 if $x->{'sign'} =~ /^\-/
1410 8 32 if $x->is_zero
1416 185 0 ref $_[0] ? :
1418 7 178 unless $x->{'sign'} =~ /^[+-]$/
1424 44 0 ref $_[0] ? :
1426 4 40 unless $x->{'sign'} =~ /^[+-]$/
1432 46 0 ref $_[0] ? :
1434 30 16 $x->{'sign'} =~ /^[+-]$/ ? :
1446 2001 400 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1450 0 2401 if @r
1452 1 2400 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1455 320 2080 unless ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/)
1457 64 256 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1458 27 229 if $x->{'sign'} eq $y->{'sign'} and $x->{'sign'} =~ /^[+-]inf$/
1459 96 133 if $x->{'sign'} eq "+inf"
1460 114 19 if $x->{'sign'} eq "-inf"
1461 8 11 if $y->{'sign'} eq "+inf"
1466 262 1818 if $x->{'sign'} eq "+" and $y->{'sign'} eq "-"
1467 194 1624 if $x->{'sign'} eq "-" and $y->{'sign'} eq "+"
1474 1534 90 if ($x->{'sign'} eq "+")
1489 238 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1493 0 238 if @r
1495 0 238 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1498 72 166 unless ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/)
1500 28 44 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1501 16 28 if $x->{'sign'} =~ /^[+-]inf$/ and $y->{'sign'} =~ /^[+-]inf$/
1502 16 12 if $x->{'sign'} =~ /^[+-]inf$/ and not $y->{'sign'} =~ /^[+-]inf$/
1509 157 270 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1513 0 427 if @r
1520 18 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1524 0 18 if @r
1527 0 18 defined $cmp && !$cmp ? :
1531 5 614 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1535 0 619 if @r
1542 1207 271 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1546 0 1478 if @r
1553 1072 313 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1557 0 1385 if @r
1564 150 167 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1568 0 317 if @r
1581 486 0 ref $_[0] ? :
1583 0 486 if $x->modify("bneg")
1585 0 486 if defined $upgrade and not $x->isa("Math::BigInt")
1591 478 8 unless $x->{'sign'} eq "+" and $LIB->_is_zero($x->{'value'})
1599 313 8 ref $_[0] ? :
1601 0 321 if $x->modify("babs")
1603 0 321 if defined $upgrade and not $x->isa("Math::BigInt")
1613 18 0 ref $_[0] ? :
1615 0 18 if $x->modify("bsgn")
1617 0 18 if defined $upgrade and not $x->isa("Math::BigInt")
1620 6 12 if $x->is_pos
1621 6 6 if $x->is_neg
1629 0 792 ref $_[0] ? :
1635 0 792 if @r
1642 191 0 ref $_[0] ? :
1644 0 191 if $x->modify("binc")
1646 16 175 if $x->is_inf or $x->is_nan
1648 0 175 if defined $upgrade and not $x->isa("Math::BigInt")
1651 101 74 if ($x->{'sign'} eq '+') { }
74 0 elsif ($x->{'sign'} eq '-') { }
1655 8 66 if $LIB->_is_zero($x->{'value'})
1663 31 0 ref $_[0] ? :
1665 0 31 if $x->modify("bdec")
1667 12 19 if $x->is_inf or $x->is_nan
1669 0 19 if defined $upgrade and not $x->isa("Math::BigInt")
1672 4 15 if ($x->{'sign'} eq '-') { }
15 0 elsif ($x->{'sign'} eq '+') { }
1675 4 11 if ($LIB->_is_zero($x->{'value'})) { }
1781 1705 113 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1785 0 1818 if $x->modify("badd")
1789 2 1816 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1793 197 1619 unless ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/)
1795 88 109 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1797 54 55 if ($x->{'sign'} =~ /^[+-]inf$/ and $y->{'sign'} =~ /^[+-]inf$/)
1799 30 24 if $x->{'sign'} eq $y->{'sign'}
1804 35 20 if ($y->{'sign'} =~ /^[+-]inf$/)
1820 1062 54 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1824 0 1116 if $x->modify("bsub")
1826 0 1116 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1829 33 1083 if $y->is_zero
1837 12 1071 if ($xsign ne $x->{'sign'})
1839 6 6 if $xsign =~ /^[+-]$/
1853 1608 36 ref $_[0] && ref $_[0] eq ref $_[1] ? :
1857 0 1644 if $x->modify("bmul")
1859 52 1592 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan
1862 52 1540 if ($x->{'sign'} =~ /^[+-]inf$/ or $y->{'sign'} =~ /^[+-]inf$/)
1863 12 40 if $x->is_zero or $y->is_zero
1867 10 30 if $x->{'sign'} =~ /^\+/ and $y->{'sign'} =~ /^\+/
1868 10 20 if $x->{'sign'} =~ /^-/ and $y->{'sign'} =~ /^-/
1872 8 1532 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
1877 1467 65 $x->{'sign'} eq $y->{'sign'} ? :
1880 312 1220 if $LIB->_is_zero($x->{'value'})
1890 177 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
1895 0 177 if $x->modify("bmuladd")
1899 141 6 if ($x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/ and $z->{'sign'} =~ /^[+-]$/)
1903 0 141 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt') && $z->isa('Math::BigInt')
1913 0 141 if &refaddr($x) eq &refaddr($z)
1915 111 30 $x->{'sign'} eq $y->{'sign'} ? :
1917 21 120 if $LIB->_is_zero($x->{'value'})
1928 12 12 if $x->{'sign'} eq $nan or $y->{'sign'} eq $nan or $z->{'sign'} eq $nan
1932 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) { }
1934 3 3 if ($y->is_neg) { }
0 3 elsif ($y->is_zero) { }
1935 0 3 if ($z->{'sign'} eq '-inf') { }
1943 0 3 if ($z->{'sign'} eq '+inf') { }
1952 3 3 if ($y->is_neg) { }
0 3 elsif ($y->is_zero) { }
1953 0 3 if ($z->{'sign'} eq '+inf') { }
1961 0 3 if ($z->{'sign'} eq '-inf') { }
1970 0 0 if ($y->{'sign'} eq '-inf') { }
0 0 elsif ($y->{'sign'} eq '+inf') { }
1971 0 0 if ($z->{'sign'} eq '-inf') { }
1977 0 0 if ($z->{'sign'} eq '+inf') { }
1983 0 0 if ($z->{'sign'} eq '-inf') { }
0 0 elsif ($z->{'sign'} eq '+inf') { }
1992 0 0 if ($y->{'sign'} eq '-inf') { }
0 0 elsif ($y->{'sign'} eq '+inf') { }
1997 0 0 if ($z->{'sign'} eq '-inf') { }
0 0 elsif ($z->{'sign'} eq '+inf') { }
2006 0 0 if ($y->{'sign'} eq '-inf') { }
0 0 elsif ($y->{'sign'} eq '+inf') { }
2007 0 0 if ($z->{'sign'} eq '+inf') { }
2013 0 0 if ($z->{'sign'} eq '-inf') { }
2019 0 0 if ($z->{'sign'} eq '-inf') { }
0 0 elsif ($z->{'sign'} eq '+inf') { }
2036 1446 21 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2040 0 1467 if $x->modify("bdiv")
2047 51 1416 if ($x->is_nan or $y->is_nan)
2048 24 27 $wantarray ? :
2069 67 1349 if ($y->is_zero)
2071 32 35 if ($wantarray)
2074 17 50 if ($x->is_zero) { }
2079 32 32 $wantarray ? :
2096 96 1253 if ($x->is_inf)
2098 48 48 if $wantarray
2099 48 48 if ($y->is_inf) { }
2102 24 24 $x->bcmp(0) == $y->bcmp(0) ? :
2105 48 48 $wantarray ? :
2121 80 1173 if ($y->is_inf)
2123 56 24 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
2124 28 28 if $wantarray
2127 12 12 if $wantarray
2130 40 40 $wantarray ? :
2139 70 1103 if defined $upgrade
2157 6 1097 if ($same) { }
2163 522 575 if ($LIB->_is_zero($rem->{'value'})) { }
2164 469 53 if ($xsign eq $ysign or $LIB->_is_zero($x->{'value'})) { }
2170 524 51 if ($xsign eq $ysign) { }
2173 24 27 if ($xsign eq '+') { }
2185 491 612 if ($wantarray)
2186 379 112 unless ($LIB->_is_zero($rem->{'value'}))
2187 24 355 if ($xsign ne $ysign)
2209 366 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2213 0 366 if $x->modify("btdiv")
2220 0 366 if ($x->is_nan or $y->is_nan)
2221 0 0 $wantarray ? :
2242 30 336 if ($y->is_zero)
2244 15 15 if ($wantarray)
2247 6 24 if ($x->is_zero) { }
2252 15 15 $wantarray ? :
2269 48 288 if ($x->is_inf)
2271 24 24 if $wantarray
2272 24 24 if ($y->is_inf) { }
2275 12 12 $x->bcmp(0) == $y->bcmp(0) ? :
2278 24 24 $wantarray ? :
2294 36 252 if ($y->is_inf)
2296 18 18 if $wantarray
2298 18 18 $wantarray ? :
2304 0 252 if defined $upgrade
2322 0 252 if ($same) { }
2328 126 126 $xsign eq $ysign ? :
2329 108 144 if $LIB->_is_zero($x->{'value'})
2333 126 126 if (wantarray)
2335 78 48 if $LIB->_is_zero($rem->{'value'})
2349 679 21 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2353 0 700 if $x->modify("bmod")
2359 27 673 if ($x->is_nan or $y->is_nan)
2365 34 639 if ($y->is_zero)
2371 48 591 if ($x->is_inf)
2377 40 551 if ($y->is_inf)
2378 28 12 if ($x->is_zero or $x->bcmp(0) == $y->bcmp(0)) { }
2385 0 551 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
2392 154 397 if ($LIB->_is_zero($x->{'value'})) { }
2396 138 259 if $x->{'sign'} ne $y->{'sign'}
2407 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2411 0 0 if $x->modify("btmod")
2415 0 0 if ($x->is_nan or $y->is_nan)
2421 0 0 if ($y->is_zero)
2427 0 0 if ($x->is_inf)
2433 0 0 if ($y->is_inf)
2437 0 0 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
2448 0 0 if $LIB->_is_zero($x->{'value'})
2465 243 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2469 0 243 if $x->modify("bmodinv")
2474 21 222 unless $y->{'sign'} =~ /^[+-]$/ and $x->{'sign'} =~ /^[+-]$/
2478 0 222 if $y->is_zero
2483 63 159 if $y->is_one("+") or $y->is_one("-")
2486 0 159 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
2500 36 123 if $x->is_zero
2506 21 102 unless defined $x->{'value'}
2511 0 102 unless defined $x->{'sign'}
2525 3 99 if $y->{'sign'} eq "-"
2529 54 48 if $x->{'sign'} ne $y->{'sign'}
2538 501 0 ref $_[0] && ref $_[0] eq ref $_[1] && ref $_[1] eq ref $_[2] ? :
2543 0 501 if $num->modify("bmodpow")
2550 135 366 if $exp->{'sign'} eq "-"
2557 12 435 if $num->{'sign'} =~ /NaN|inf/ or $exp->{'sign'} =~ /NaN|inf/ or $mod->{'sign'} =~ /NaN|inf/
2561 3 432 if ($mod->is_zero)
2562 0 3 if ($num->is_zero) { }
2569 0 432 if defined $upgrade and not $num->isa('Math::BigInt') && $exp->isa('Math::BigInt') && &$mod($class)
2584 213 219 unless ($LIB->_is_zero($value))
2589 21 192 if ($num->{'sign'} eq '-' and $exp->is_odd) { }
2596 0 21 if ($mod->{'sign'} eq '-') { }
2618 3 189 if ($mod->{'sign'} eq "-")
2646 504 71 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2650 0 575 if $x->modify("bpow")
2653 65 510 if $x->is_nan or $y->is_nan
2656 39 471 if ($x->is_inf('-')) { }
35 436 elsif ($x->is_inf('+')) { }
21 415 elsif ($y->is_inf('-')) { }
21 394 elsif ($y->is_inf('+')) { }
2657 16 23 if $y->is_negative
2658 3 20 if $y->is_zero
2659 10 10 if $y->is_odd
2662 16 19 if $y->is_negative
2663 3 16 if $y->is_zero
2666 3 18 if $x->is_one("-")
2667 3 15 if $x->is_zero
2668 3 12 if $x->is_one("+")
2671 3 18 if $x->is_one("-")
2672 3 15 if $x->is_zero
2673 3 12 if $x->is_one("+")
2677 26 368 if ($x->is_zero)
2678 4 22 if $y->is_zero
2679 11 11 if $y->is_negative
2683 28 340 if ($x->is_one("+"))
2687 31 309 if ($x->is_one("-"))
2688 17 14 if $y->is_odd
2692 38 271 if defined $upgrade
2698 36 235 if ($y->{'sign'} eq "-" or not $y->isa("Math::BigInt"))
2705 21 214 $x->is_negative && $y->is_odd ? :
2720 0 199 if (not ref $_[0] and $_[0] =~ /^[a-z]\w*(?:::\w+)*$/i) { }
2722 0 0 defined $_[2] ? :
2726 166 33 defined $_[1] ? :
2730 0 199 if $x->modify("blog")
2735 9 190 if $x->is_nan
2737 160 30 if (defined $base)
2738 0 160 unless defined &blessed($base) and $base->isa("Math::BigInt")
2740 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) { }
2743 21 15 if $x->is_inf or $x->is_zero
2746 3 9 if $x->is_one
2747 0 9 if $x == $base
2749 0 9 if defined $upgrade
2752 3 97 if $x == $base
2757 15 112 if ($x->is_inf) { }
6 106 elsif ($x->is_neg) { }
9 97 elsif ($x->is_one) { }
6 91 elsif ($x->is_zero) { }
2760 0 6 if defined $upgrade
2770 2 89 if defined $upgrade
2774 15 74 unless (defined $base)
2800 0 74 unless defined $rc
2808 15 0 ref $_[0] ? :
2810 0 15 if $x->modify("bexp")
2813 3 12 if $x->{'sign'} eq "NaN"
2814 0 12 if $x->is_zero
2815 3 9 if $x->{'sign'} eq "+inf"
2816 0 9 if $x->{'sign'} eq "-inf"
2818 0 9 if defined $upgrade
2831 93 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
2835 0 93 if @r
2837 0 93 if $n->modify("bnok")
2841 9 84 if $n->{'sign'} eq "NaN" or $k->{'sign'} eq "NaN"
2845 7 77 if ($n->is_inf) { }
0 77 elsif ($k->is_inf) { }
2846 0 7 if ($k->is_inf) { }
0 7 elsif ($k->is_neg) { }
0 7 elsif ($k->is_zero) { }
2853 7 0 if ($n->is_inf('+', @r)) { }
2856 0 0 $k->is_even ? :
2868 0 77 if defined $upgrade and not $n->isa('Math::BigInt') && $k->isa('Math::BigInt')
2874 77 0 if ($n >= 0) { }
2875 21 56 if ($k < 0 or $k > $n)
2880 0 0 if ($k >= 0) { }
0 0 elsif ($k <= $n) { }
2906 0 56 if $sign == -1
2936 0 0 if $a < 0
2937 0 0 if $n < 0
2938 0 0 if $b < 0
2944 0 0 if ($_[-2] == 1)
2952 0 0 if ($_[-2] == 0)
2960 0 0 if ($_[-1] == 0)
3001 0 0 if $m < 0
3002 0 0 if $n < 0
3009 0 0 unless ref $n
3012 0 0 if ($m > $three) { }
0 0 elsif ($m == $three) { }
0 0 elsif ($m == $two) { }
0 0 elsif ($m >= 0) { }
3034 0 0 ref $_[0] ? :
3036 0 0 if $x->modify("bsin")
3038 0 0 unless $x->{'sign'} =~ /^[+-]\z/
3039 0 0 if $x->is_zero
3041 0 0 if defined $upgrade
3047 0 0 if $t->is_one
3048 0 0 if $t->is_zero
3055 0 0 ref $_[0] ? :
3057 0 0 if $x->modify("bcos")
3059 0 0 unless $x->{'sign'} =~ /^[+-]\z/
3060 0 0 if $x->is_zero
3062 0 0 if defined $upgrade
3073 0 0 ref $_[0] ? :
3075 0 0 if $x->modify("batan")
3077 0 0 if $x->is_nan
3078 0 0 if $x->is_zero
3080 0 0 if defined $upgrade
3082 0 0 if $x->bgt(1)
3083 0 0 if $x->blt(-1)
3091 84 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3094 0 84 if $y->modify("batan2")
3096 9 75 if $y->{'sign'} eq $nan or $x->{'sign'} eq $nan
3098 0 75 if defined $upgrade
3102 30 45 if ($x->is_inf or $y->is_inf)
3103 18 12 if ($y->is_inf) { }
3104 6 12 if ($x->{'sign'} eq '-inf') { }
6 6 elsif ($x->{'sign'} eq '+inf') { }
3116 3 9 if ($x->{'sign'} eq '+inf') { }
3141 520 3 ref $_[0] ? :
3143 0 523 if $x->modify("bsqrt")
3145 16 507 unless $x->{'sign'} =~ /^\+/
3146 4 503 if $x->{'sign'} eq "+inf"
3148 22 481 if defined $upgrade
3159 166 8 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3162 0 174 unless defined $y
3164 0 174 if $x->modify("broot")
3168 27 99 if not $x->{'sign'} =~ /^\+/ or $y->is_zero or not $y->{'sign'} =~ /^\+$/
3170 6 87 if $x->is_zero or $x->is_one or $x->is_inf or $y->is_one
3173 2 85 if defined $upgrade
3182 81 0 ref $_[0] ? :
3184 3 78 if $x->modify("bfac") or $x->{'sign'} eq "+inf"
3186 9 69 if $x->{'sign'} ne "+"
3188 0 69 if defined $upgrade and not $x->isa("Math::BigInt")
3197 54 0 ref $_[0] ? :
3199 3 51 if $x->modify("bdfac") or $x->{'sign'} eq "+inf"
3201 9 42 if $x->is_nan or $x <= -2
3202 9 33 if $x <= 1
3204 0 33 if defined $upgrade and not $x->isa("Math::BigInt")
3207 0 33 unless $LIB->can("_dfac")
3216 57 0 ref $_[0] ? :
3218 3 54 if $x->modify("btfac") or $x->{'sign'} eq "+inf"
3220 3 51 if $x->is_nan
3222 0 51 if defined $upgrade and not $x->isa("Math::BigInt")
3226 6 45 if $x <= -$k
3229 12 33 if $x <= $one
3241 270 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3244 15 255 if $x->modify("bmfac") or $x->{'sign'} eq "+inf"
3245 39 198 if $x->is_nan or $k->is_nan or $k < 1 or $x <= -$k
3247 0 198 if defined $upgrade and not $x->isa("Math::BigInt")
3251 60 138 if $x <= $one
3262 0 0 ref $_[0] ? :
3264 0 0 unless $LIB->can("_fib")
3267 0 0 if $x->modify("bfib")
3269 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
3274 0 0 if (wantarray) { }
3275 0 0 if $x->is_nan
3276 0 0 if $x->is_inf
3297 0 0 if ($x->is_neg)
3310 0 0 if $x->modify("bdfac") or $x->is_inf("+")
3311 0 0 if $x->is_nan or $x->is_inf("-")
3313 0 0 $x->is_neg && $x->is_even ? :
3321 0 0 ref $_[0] ? :
3323 0 0 unless $LIB->can("_lucas")
3326 0 0 if $x->modify("blucas")
3328 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
3333 0 0 if (wantarray) { }
3334 0 0 if $x->is_nan
3335 0 0 if $x->is_inf
3356 0 0 if ($x->is_neg)
3369 0 0 if $x->is_inf("+")
3370 0 0 if $x->is_nan or $x->is_inf("-")
3372 0 0 $x->is_neg && $x->is_even ? :
3387 12 50 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
3389 0 12 defined $_[3] ? :
3393 44 6 defined $_[2] ? :
3397 0 62 if $x->modify("blsft")
3399 18 44 unless defined $b
3400 18 44 unless defined &blessed($b)
3402 0 62 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt') && $b->isa('Math::BigInt')
3407 0 62 if $x->is_nan or $y->is_nan or $b->is_nan
3411 4 58 if $y->is_neg
3417 0 0 if $b->is_one("+") or $y->is_zero
3420 0 0 if ($y->is_inf("+"))
3421 0 0 if $x->is_pos
3422 0 0 if $x->is_neg
3428 0 0 if $x->is_zero and $y->is_inf("+")
3431 0 0 if $x->is_zero
3433 0 0 if $y->is_inf("+")
3434 0 0 if $x->is_zero
3441 0 0 if ($x->bcmp($uintmax) > 0) { }
3459 12 122 if (not ref $_[0] and $_[0] =~ /^[A-Za-z]|::/) { }
3461 0 12 defined $_[3] ? :
3465 116 6 defined $_[2] ? :
3469 0 134 if $x->modify("brsft")
3471 18 116 unless defined $b
3472 18 116 unless defined &blessed($b)
3474 0 134 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt') && $b->isa('Math::BigInt')
3479 0 134 if $x->is_nan or $y->is_nan or $b->is_nan
3483 4 130 if $y->is_neg
3485 8 122 if $y->is_zero
3486 0 122 if $x->is_zero
3490 11 111 if defined $upgrade and $y->is_pos
3494 57 54 if ($x->is_neg and $b->bcmp(2) == 0)
3495 3 54 if $x->is_one("-")
3505 3 51 if $y >= $nbits
3520 0 54 if ($x->bcmp($uintmax) > 0 or $x->is_neg) { }
3544 27 8 if (ref $_[0]) { }
3546 0 27 if ref $y and not $y->isa("Math::BigInt") and $y->can("as_int")
3548 0 27 unless ref $y
3556 16 0 if ref $_ and not $_->isa("Math::BigInt") and $_->can("as_int")
3558 0 16 unless ref $_
3562 0 35 if $x->modify("bblsft")
3564 4 31 if $x->is_nan or $y->is_nan
3568 4 27 if $y->is_neg
3572 0 27 if ($y->is_inf("+"))
3573 0 0 if $x->is_pos
3574 0 0 if $x->is_neg
3580 0 27 if $x->is_zero or $x->is_inf or $y->is_zero
3597 27 8 if (ref $_[0]) { }
3599 0 27 if ref $y and not $y->isa("Math::BigInt") and $y->can("as_int")
3601 0 27 unless ref $y
3609 16 0 if ref $_ and not $_->isa("Math::BigInt") and $_->can("as_int")
3611 0 16 unless ref $_
3615 0 35 if $x->modify("bbrsft")
3617 4 31 if $x->is_nan or $y->is_nan
3621 4 27 if $y->is_neg
3625 0 27 if ($y->is_inf("+"))
3626 0 0 if $x->is_inf
3627 0 0 if $x->is_neg
3633 0 27 if $x->is_zero or $x->is_inf or $y->is_zero
3638 27 0 if ($x->is_pos) { }
3644 0 0 unless $LIB->_is_zero($q)
3655 174 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3658 0 175 if $x->modify("band")
3660 1 174 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
3666 12 162 unless $x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/
3668 129 33 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
3681 235 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3684 0 236 if $x->modify("bior")
3686 1 235 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
3692 12 223 unless $x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/
3694 188 35 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
3707 245 1 ref $_[0] && ref $_[0] eq ref $_[1] ? :
3710 0 246 if $x->modify("bxor")
3712 1 245 if defined $upgrade and not $x->isa('Math::BigInt') && $y->isa('Math::BigInt')
3718 12 233 unless $x->{'sign'} =~ /^[+-]$/ and $y->{'sign'} =~ /^[+-]$/
3720 193 40 if ($x->{'sign'} eq '+' and $y->{'sign'} eq '+') { }
3732 39 0 ref $_[0] ? :
3734 0 39 if $x->modify("bnot")
3736 0 39 if defined $upgrade and not $x->isa("Math::BigInt")
3750 71804 0 ref $_[0] ? :
3754 3599 103 if (@args >= 2 and @args <= 3 and not defined $args[0] and not defined $args[1])
3767 304 67901 if (defined $a)
3768 0 304 unless $a =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
3772 92 68113 if (defined $p)
3773 0 92 unless $p =~ /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/
3778 67901 304 unless (defined $a)
3782 20886 13470 if defined $_->{'_a'} and !defined($a) || $_->{'_a'} < $a
3785 68113 92 unless (defined $p)
3791 111 3 if defined $_->{'_p'} and !defined($p) || $_->{'_p'} > $p
3798 46880 21325 unless (defined $a or defined $p)
3804 6 68199 if defined $a and $a == 0
3807 46842 21363 unless defined $a or defined $p
3810 58 21305 if defined $a and defined $p
3812 21244 61 unless defined $r
3813 0 21305 unless ($r =~ /^(even|odd|[+-]inf|zero|trunc|common)$/)
3818 21140 165 if (defined $a) { }
3820 21134 6 if not defined $self->{'_a'} or $self->{'_a'} >= $a
3823 165 0 if not defined $self->{'_p'} or $self->{'_p'} <= $p
3837 26041 0 ref $_[0] ? :
3840 2 26039 if not defined $scale or $x->modify("bround")
3842 101 25938 if ($x->is_zero or $scale == 0)
3843 89 12 if not defined $x->{'_a'} or $x->{'_a'} > $scale
3846 12 25926 unless $x->{'sign'} =~ /^[+-]$/
3853 0 25926 if ref $scale
3856 194 25732 if ($scale < 0 and $scale < -$len - 1 or $scale >= $len)
3857 164 30 if not defined $x->{'_a'} or $x->{'_a'} > $scale
3864 134 25598 if $scale < 0
3874 25610 122 if $pad <= $len
3876 125 25607 if $pad >= $len
3878 25732 0 if $pad > 0
3893 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'
3898 25610 122 if ($pad > 0 and $pad <= $len) { }
122 0 elsif ($pad > $len) { }
3906 12381 13351 if ($round_up)
3908 57 12324 if $scale < 0
3916 1372 12324 if $c eq 10
3919 12324 1372 if $c != 0
3921 57 12324 if $c == 0
3923 25667 65 if $put_back == 1
3925 25598 134 if $scale >= 0
3926 134 25598 if ($scale < 0)
3928 3 131 if $scale < -$len
3937 212 0 ref $_[0] ? :
3941 0 212 if not defined $scale or $x->modify("bfround")
3944 104 108 if $scale > 0
3955 0 0 unless ref $x
3961 36 0 ref $_[0] ? :
3963 0 36 if defined $upgrade and not $x->isa("Math::BigInt")
3971 36 0 ref $_[0] ? :
3973 0 36 if defined $upgrade and not $x->isa("Math::BigInt")
3981 38 0 ref $_[0] ? :
3983 0 38 if defined $upgrade and not $x->isa("Math::BigInt")
3999 1 96 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
4011 15 82 if (defined $upgrade)
4014 0 32 unless ($arg->isa("Math::BigInt"))
4019 0 15 if $do_upgrade
4023 97 0 defined &blessed($x) && $x->isa('Math::BigInt') ? :
4026 23 74 unless $x->{'sign'} =~ /^[+-]$/
4030 0 84 unless defined &blessed($y) and $y->isa("Math::BigInt")
4032 10 74 unless $y->{'sign'} =~ /^[+-]$/
4034 35 39 if $LIB->_is_one($x->{'value'})
4046 1 34 unless (@_ and defined &blessed($_[0]) && $_[0]->isa('Math::BigInt') || $_[0] =~ /^[a-z]\w*(?:::[a-z]\w*)*$/i)
4058 8 27 if (defined $upgrade)
4061 0 16 unless ($arg->isa("Math::BigInt"))
4066 0 8 if $do_upgrade
4070 35 0 defined &blessed($x) && $x->isa('Math::BigInt') ? :
4072 8 27 unless $x->{'sign'} =~ /^[+-]$/
4076 0 30 unless defined &blessed($y) and $y->isa("Math::BigInt")
4078 4 26 unless $y->{'sign'} =~ /^[+-]$/
4091 8837 0 ref $_[0] ? :
4093 0 8837 if @r
4100 84 3 ref $_[0] ? :
4102 0 87 if @r
4104 63 24 if ref $n
4110 0 0 ref $_[0] ? :
4112 0 0 if @r
4114 0 0 if $x->is_nan
4115 0 0 if $x->is_inf
4124 0 0 ref $_[0] ? :
4126 0 0 if @r
4128 0 0 if $x->is_nan
4129 0 0 if $x->is_inf
4137 26074 0 ref $_[0] ? :
4139 0 26074 if @r
4142 6 26068 wantarray ? :
4147 72 0 ref $_[0] ? :
4149 0 72 if @r
4153 0 72 if defined $upgrade and not $x->isa("Math::BigInt")
4156 24 48 unless ($x->{'sign'} =~ /^[+-]$/)
4161 8 40 if $x->is_zero
4169 68 0 ref $_[0] ? :
4171 0 68 if @r
4175 0 68 if defined $upgrade and not $x->isa("Math::BigInt")
4178 24 44 unless ($x->{'sign'} =~ /^[+-]$/)
4188 8 36 if $zeros != 0
4194 36 0 ref $_[0] ? :
4196 0 36 if @r
4200 0 36 if defined $upgrade and not $x->isa("Math::BigInt")
4211 0 0 ref $_[0] ? :
4213 0 0 if @r
4217 0 0 if ($x->is_nan)
4219 0 0 unless wantarray
4226 0 0 if ($x->is_inf)
4228 0 0 unless wantarray
4235 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4244 0 0 if $nzeros != 0
4246 0 0 unless wantarray
4257 0 0 ref $_[0] ? :
4259 0 0 if @r
4263 0 0 if $x->is_nan or $x->is_inf
4267 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4273 0 0 if ($mant->bcmp(0))
4277 0 0 if ($expo10adj > 0)
4278 0 0 if defined $upgrade
4280 0 0 unless wantarray
4286 0 0 unless wantarray
4295 0 0 ref $_[0] ? :
4297 0 0 if @r
4301 0 0 if $x->is_nan or $x->is_inf
4305 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4312 0 0 if ($mant->bcmp(0))
4322 0 0 if ($ndigmant > $c)
4323 0 0 if defined $upgrade
4325 0 0 unless wantarray
4332 0 0 unless wantarray
4340 0 0 ref $_[0] ? :
4342 0 0 if @r
4346 0 0 if ($x->is_nan)
4348 0 0 unless wantarray
4355 0 0 if ($x->is_inf)
4357 0 0 unless wantarray
4364 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4370 0 0 unless wantarray
4380 0 0 ref $_[0] ? :
4382 0 0 if @r
4386 0 0 if ($x->is_nan)
4387 0 0 unless wantarray
4393 0 0 if ($x->is_inf)
4395 0 0 unless wantarray
4402 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4408 0 0 unless wantarray
4414 0 0 ref $_[0] ? :
4416 0 0 if @r
4418 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4425 0 0 ref $_[0] ? :
4427 0 0 if @r
4429 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4432 0 0 $x->is_nan ? :
4440 12024 12 ref $_[0] ? :
4442 0 12036 if @r
4446 2703 9333 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4447 2159 544 unless $x->{'sign'} eq "+inf"
4453 0 9333 if defined $upgrade and not $x->isa("Math::BigInt")
4459 1137 8196 $x->{'sign'} eq '-' ? :
4466 50 16 ref $_[0] ? :
4468 0 66 if @r
4472 18 48 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4473 11 7 unless $x->{'sign'} eq "+inf"
4479 0 48 if defined $upgrade and not $x->isa("Math::BigInt")
4486 25 23 if $expo
4488 14 34 $x->{'sign'} eq '-' ? :
4494 0 0 ref $_[0] ? :
4496 0 0 if @r
4500 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4501 0 0 unless $x->{'sign'} eq "+inf"
4507 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4514 0 0 if $expo
4517 0 0 if ($mantlen > 1)
4522 0 0 $x->{'sign'} eq '-' ? :
4528 0 0 ref $_[0] ? :
4530 0 0 if @r
4534 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4535 0 0 unless $x->{'sign'} eq "+inf"
4541 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4548 0 0 if $expo
4555 0 0 if ($dotpos < $mantlen) { }
0 0 elsif ($dotpos > $mantlen) { }
4561 0 0 $x->{'sign'} eq '-' ? :
4567 24 0 ref $_[0] ? :
4569 0 24 if @r
4573 8 16 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4574 7 1 unless $x->{'sign'} eq "+inf"
4580 0 16 if defined $upgrade and not $x->isa("Math::BigInt")
4585 1 15 $x->{'sign'} eq '-' ? :
4592 0 0 ref $_[0] ? :
4594 0 0 if @r
4598 0 0 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4599 0 0 unless $x->{'sign'} eq "+inf"
4605 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4610 0 0 $x->{'sign'} eq '-' ? :
4616 36 0 ref $_[0] ? :
4618 0 36 if @r
4622 12 24 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4623 8 4 unless $x->{'sign'} eq "+inf"
4629 0 24 if defined $upgrade and not $x->isa("Math::BigInt")
4635 4 20 $x->{'sign'} eq '-' ? :
4641 40 0 ref $_[0] ? :
4643 0 40 if @r
4647 12 28 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4648 8 4 unless $x->{'sign'} eq "+inf"
4654 0 28 if defined $upgrade and not $x->isa("Math::BigInt")
4660 4 24 $x->{'sign'} eq '-' ? :
4666 93 0 ref $_[0] ? :
4668 0 93 if @r
4672 12 81 if ($x->{'sign'} ne "+" and $x->{'sign'} ne "-")
4673 8 4 unless $x->{'sign'} eq "+inf"
4679 0 81 if defined $upgrade and not $x->isa("Math::BigInt")
4685 58 23 $x->{'sign'} eq '-' ? :
4691 0 0 ref $_[0] ? :
4693 0 0 if @r
4695 0 0 if $x->is_neg or not $x->is_int
4698 0 0 if defined $upgrade and not $x->isa("Math::BigInt")
4701 0 0 unless $LIB->can("_to_bytes")
4711 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
4714 0 0 if @r
4716 0 0 if $x->is_neg or not $x->is_int
4719 0 0 if $base < 2 or not $base->is_int
4725 0 0 unless (defined $cs)
4726 0 0 if $base == 2
4727 0 0 if $base == 8
4728 0 0 if $base == 16
4729 0 0 if $base == 10
4732 0 0 unless $LIB->can("_to_base")
4735 0 0 if defined $upgrade and not $x->isa('Math::BigInt') && $base->isa('Math::BigInt')
4740 0 0 defined $cs ? :
4748 0 0 ref $_[0] && ref $_[0] eq ref $_[1] ? :
4751 0 0 if @r
4753 0 0 if $x->is_neg or not $x->is_int
4756 0 0 if $base < 2 or not $base->is_int
4759 0 0 unless $LIB->can("_to_base")
4762 0 0 if defined $upgrade and not $x->isa('Math::BigInt') && $base->isa('Math::BigInt')
4783 36 0 ref $_[0] ? :
4785 0 36 if @r
4787 12 24 unless $x->{'sign'} =~ /^[+-]$/
4789 0 24 if defined $upgrade and not $x->isa("Math::BigInt")
4793 4 20 $x->{'sign'} eq '-' ? :
4799 40 0 ref $_[0] ? :
4801 0 40 if @r
4803 12 28 unless $x->{'sign'} =~ /^[+-]$/
4805 0 28 if defined $upgrade and not $x->isa("Math::BigInt")
4809 4 24 $x->{'sign'} eq '-' ? :
4815 39 0 ref $_[0] ? :
4817 0 39 if @r
4819 12 27 unless $x->{'sign'} =~ /^[+-]$/
4821 0 27 if defined $upgrade and not $x->isa("Math::BigInt")
4825 4 23 $x->{'sign'} eq '-' ? :
4836 495 0 ref $_[0] ? :
4838 0 495 if @r
4840 0 495 if ($x->is_nan)
4846 0 495 if ($x->is_inf)
4849 0 0 $x->is_negative ? :
4852 0 495 if defined $upgrade and not $x->isa("Math::BigInt")
4856 39 456 $x->{'sign'} eq '-' ? :
4885 150 1 if @_ == 2 and ($_[0] || 0) == 1 and ref $_[1]
4889 0 5001 unless (wantarray)
4906 3728 1273 if (ref $a[0]) { }
1261 12 elsif ($a[0] =~ /^[A-Z].*::/) { }
4931 14 4987 if (defined ${"$a[0]::downgrade";})
4942 4214 4922 unless ($ref)
4949 4518 404 if $ref->isa($a[0])
4954 281 123 unless ($have_upgrade_chain)
4958 0 17 if $upg eq $cls
4967 16 1 if $ref->isa($upg)
4976 42 346 if ($a[0]->isa('Math::BigInt')) { }
346 0 elsif ($a[0]->isa('Math::BigFloat')) { }
4977 42 0 if ($a[$i]->can('as_int')) { }
0 0 elsif ($a[$i]->can('as_number')) { }
4987 346 0 if ($a[$i]->can("as_float"))
4995 44 344 if ($recheck)
5000 0 44 unless ($ref)
5007 43 1 if $ref->isa($a[0])
5032 1 90 if ($param eq ":constant")
5046 0 0 if $_[0] =~ /^0_*[0-7]/
5054 2 88 if ($param eq "upgrade")
5061 0 88 if ($param eq "downgrade")
5068 0 88 if ($param eq "accuracy")
5075 0 88 if ($param eq "precision")
5082 0 88 if ($param eq "round_mode")
5089 29 59 if ($param =~ /^(lib|try|only)\z/)
5096 0 29 unless @_
5099 0 29 unless defined $libs
5109 0 29 if ($lib =~ /[^a-zA-Z0-9_:]/)
5114 0 29 unless (CORE::length $lib)
5119 24 5 unless $lib =~ /^Math::BigInt::/i
5124 10 19 if (defined $LIB)
5125 3 7 if ($lib ne $LIB)
5135 10 19 if defined $LIB
5137 0 19 unless @libs
5144 19 0 unless ($@)
5150 19 0 if defined $LIB
5155 0 0 if ($param eq "only")
5166 0 0 if ($@)
5175 0 0 if ($param eq "lib")
5191 58 45 if (@a)
5200 32 71 unless (defined $LIB)
5202 0 32 if ($@)
5215 0 0 unless ref $x
5217 0 0 unless $x->{'sign'} =~ /^[+-]$/
5226 23 2960 if $len == 1
5228 653 2307 if $follow > $len or $follow < 1
5231 2221 86 substr($xs, -$follow) =~ /[^0]/ ? :
5257 309 0 $a->can('numify') ? :
309 9893 if defined $a and ref $a
5258 0 0 $p->can('numify') ? :
0 10202 if defined $p and ref $p
5261 994 9208 unless (defined $a)
5265 32 0 if defined $_->{'_a'} and !defined($a) || $_->{'_a'} < $a
5268 10150 52 unless (defined $p)
5274 10 0 if defined $_->{'_p'} and !defined($p) || $_->{'_p'} > $p
5279 962 9240 unless defined $a
5280 10140 62 unless defined $p
5283 16 10186 if defined $a and $a == 0
5286 911 9291 unless defined $a or defined $p
5289 9 9282 if defined $a and defined $p
5291 9273 9 unless defined $r
5292 3 9279 unless ($r =~ /^(even|odd|[+-]inf|zero|trunc|common)$/)
5296 9218 61 if defined $a
5297 61 9218 if defined $p
5312 0 0 unless CORE::length((my $dummy = "") & $value)
5313 0 0 unless 0 + $value eq $value
5314 0 0 if $value * 0 == 0
5333 10044 20 unless $sig_str =~ s/\.0*$//
5335 4756 5308 unless CORE::length $sig_str
5337 4756 5308 if $sig_str eq 0
5341 4863 445 unless CORE::length $exp_str
5342 4863 445 if $exp_str eq 0
5366 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)
5429 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)
5483 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)
5537 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)
5594 4744 3951 if ($sig_str eq 0)
5611 2324 1627 if ($idx >= 0)
5631 863 3088 if ($sig_str =~ s/(0+)\z//)
5640 0 3951 unless (CORE::length $sig_str)
5664 12 1357 if ($sig_str eq 0)
5682 3 1354 if ($idx >= 0)
5688 2 1 if $bpc != 1
5703 241 1116 if ($sig_str =~ s/(0+)\z//)
5707 216 25 if $bpc != 1
5716 0 1357 unless (CORE::length $sig_str)
5722 1110 0 $bpc == 4 ? :
3 1110 $bpc == 3 ? :
244 1113 $bpc == 1 ? :
5729 1356 1 if ($exp_sgn eq '+') { }
5731 242 1114 unless ($LIB->_is_zero($exp_lib))
5759 213 1144 if ($n)
5776 1114 4 if (my(@parts) = $class->_hex_str_to_hex_str_parts($str))
5790 3 0 if (my(@parts) = $class->_oct_str_to_oct_str_parts($str))
5804 252 23 if (my(@parts) = $class->_bin_str_to_bin_str_parts($str))
5817 8695 1090 if (my(@parts) = $class->_dec_str_to_dec_str_parts($str))
5828 0 0 if (my(@parts) = $class->_hex_str_to_flt_lib_parts($str))
5839 0 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
5850 0 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
5861 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
5872 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
5883 0 0 if (my(@parts) = $class->_oct_str_to_flt_lib_parts($str))
5894 0 0 if (my(@parts) = $class->_bin_str_to_flt_lib_parts($str))
5905 0 0 if (my(@parts) = $class->_dec_str_to_flt_lib_parts($str))
5924 0 0 if ($parts[2] eq '+') { }
5937 0 0 if ($len_cmp <= 0) { }
5970 0 0 if ($esgn eq '-') { }
0 0 elsif (not $LIB->_is_zero($eabs)) { }