1package bigint; 2 3use strict; 4use warnings; 5 6use Carp qw< carp croak >; 7 8our $VERSION = '0.65'; 9 10use Exporter; 11our @ISA = qw( Exporter ); 12our @EXPORT_OK = qw( PI e bpi bexp hex oct ); 13our @EXPORT = qw( inf NaN ); 14 15use overload; 16 17my $obj_class = "Math::BigInt"; 18 19############################################################################## 20 21sub accuracy { 22 my $self = shift; 23 $obj_class -> accuracy(@_); 24} 25 26sub precision { 27 my $self = shift; 28 $obj_class -> precision(@_); 29} 30 31sub round_mode { 32 my $self = shift; 33 $obj_class -> round_mode(@_); 34} 35 36sub div_scale { 37 my $self = shift; 38 $obj_class -> div_scale(@_); 39} 40 41sub in_effect { 42 my $level = shift || 0; 43 my $hinthash = (caller($level))[10]; 44 $hinthash->{bigint}; 45} 46 47sub _float_constant { 48 my $str = shift; 49 50 # We can't pass input directly to new() because of the way it handles the 51 # combination of non-integers with no upgrading. Such cases are by 52 # Math::BigInt returned as NaN, but we truncate to an integer. 53 54 # See if we can convert the input string to a string using a normalized form 55 # consisting of the significand as a signed integer, the character "e", and 56 # the exponent as a signed integer, e.g., "+0e+0", "+314e-2", and "-1e+3". 57 58 my $nstr; 59 60 if ( 61 # See if it is an octal number. An octal number like '0377' is also 62 # accepted by the functions parsing decimal and hexadecimal numbers, so 63 # handle octal numbers before decimal and hexadecimal numbers. 64 65 $str =~ /^0(?:[Oo]|_*[0-7])/ and 66 $nstr = Math::BigInt -> oct_str_to_dec_flt_str($str) 67 68 or 69 70 # See if it is decimal number. 71 72 $nstr = Math::BigInt -> dec_str_to_dec_flt_str($str) 73 74 or 75 76 # See if it is a hexadecimal number. Every hexadecimal number has a 77 # prefix, but the functions parsing numbers don't require it, so check 78 # to see if it actually is a hexadecimal number. 79 80 $str =~ /^0[Xx]/ and 81 $nstr = Math::BigInt -> hex_str_to_dec_flt_str($str) 82 83 or 84 85 # See if it is a binary numbers. Every binary number has a prefix, but 86 # the functions parsing numbers don't require it, so check to see if it 87 # actually is a binary number. 88 89 $str =~ /^0[Bb]/ and 90 $nstr = Math::BigInt -> bin_str_to_dec_flt_str($str)) 91 { 92 my $pos = index($nstr, 'e'); 93 my $expo_sgn = substr($nstr, $pos + 1, 1); 94 my $sign = substr($nstr, 0, 1); 95 my $mant = substr($nstr, 1, $pos - 1); 96 my $mant_len = CORE::length($mant); 97 my $expo = substr($nstr, $pos + 2); 98 99 if ($expo_sgn eq '-') { 100 if ($mant_len <= $expo) { 101 return $obj_class -> bzero(); # underflow 102 } else { 103 $mant = substr $mant, 0, $mant_len - $expo; # truncate 104 return $obj_class -> new($sign . $mant); 105 } 106 } else { 107 $mant .= "0" x $expo; # pad with zeros 108 return $obj_class -> new($sign . $mant); 109 } 110 } 111 112 # If we get here, there is a bug in the code above this point. 113 114 warn "Internal error: unable to handle literal constant '$str'.", 115 " This is a bug, so please report this to the module author."; 116 return $obj_class -> bnan(); 117} 118 119############################################################################# 120# the following two routines are for "use bigint qw/hex oct/;": 121 122use constant LEXICAL => $] > 5.009004; 123 124# Internal function with the same semantics as CORE::hex(). This function is 125# not used directly, but rather by other front-end functions. 126 127sub _hex_core { 128 my $str = shift; 129 130 # Strip off, clean, and parse as much as we can from the beginning. 131 132 my $x; 133 if ($str =~ s/ ^ ( 0? [xX] )? ( [0-9a-fA-F]* ( _ [0-9a-fA-F]+ )* ) //x) { 134 my $chrs = $2; 135 $chrs =~ tr/_//d; 136 $chrs = '0' unless CORE::length $chrs; 137 $x = $obj_class -> from_hex($chrs); 138 } else { 139 $x = $obj_class -> bzero(); 140 } 141 142 # Warn about trailing garbage. 143 144 if (CORE::length($str)) { 145 require Carp; 146 Carp::carp(sprintf("Illegal hexadecimal digit '%s' ignored", 147 substr($str, 0, 1))); 148 } 149 150 return $x; 151} 152 153# Internal function with the same semantics as CORE::oct(). This function is 154# not used directly, but rather by other front-end functions. 155 156sub _oct_core { 157 my $str = shift; 158 159 $str =~ s/^\s*//; 160 161 # Hexadecimal input. 162 163 return _hex_core($str) if $str =~ /^0?[xX]/; 164 165 my $x; 166 167 # Binary input. 168 169 if ($str =~ /^0?[bB]/) { 170 171 # Strip off, clean, and parse as much as we can from the beginning. 172 173 if ($str =~ s/ ^ ( 0? [bB] )? ( [01]* ( _ [01]+ )* ) //x) { 174 my $chrs = $2; 175 $chrs =~ tr/_//d; 176 $chrs = '0' unless CORE::length $chrs; 177 $x = $obj_class -> from_bin($chrs); 178 } 179 180 # Warn about trailing garbage. 181 182 if (CORE::length($str)) { 183 require Carp; 184 Carp::carp(sprintf("Illegal binary digit '%s' ignored", 185 substr($str, 0, 1))); 186 } 187 188 return $x; 189 } 190 191 # Octal input. Strip off, clean, and parse as much as we can from the 192 # beginning. 193 194 if ($str =~ s/ ^ ( 0? [oO] )? ( [0-7]* ( _ [0-7]+ )* ) //x) { 195 my $chrs = $2; 196 $chrs =~ tr/_//d; 197 $chrs = '0' unless CORE::length $chrs; 198 $x = $obj_class -> from_oct($chrs); 199 } 200 201 # Warn about trailing garbage. CORE::oct() only warns about 8 and 9, but it 202 # is more helpful to warn about all invalid digits. 203 204 if (CORE::length($str)) { 205 require Carp; 206 Carp::carp(sprintf("Illegal octal digit '%s' ignored", 207 substr($str, 0, 1))); 208 } 209 210 return $x; 211} 212 213{ 214 my $proto = LEXICAL ? '_' : ';$'; 215 eval ' 216sub hex(' . $proto . ') {' . <<'.'; 217 my $str = @_ ? $_[0] : $_; 218 _hex_core($str); 219} 220. 221 222 eval ' 223sub oct(' . $proto . ') {' . <<'.'; 224 my $str = @_ ? $_[0] : $_; 225 _oct_core($str); 226} 227. 228} 229 230############################################################################# 231# the following two routines are for Perl 5.9.4 or later and are lexical 232 233my ($prev_oct, $prev_hex, $overridden); 234 235if (LEXICAL) { eval <<'.' } 236sub _hex(_) { 237 my $hh = (caller 0)[10]; 238 return $$hh{bigint} ? bigint::_hex_core($_[0]) 239 : $$hh{bigfloat} ? bigfloat::_hex_core($_[0]) 240 : $$hh{bigrat} ? bigrat::_hex_core($_[0]) 241 : $prev_hex ? &$prev_hex($_[0]) 242 : CORE::hex($_[0]); 243} 244 245sub _oct(_) { 246 my $hh = (caller 0)[10]; 247 return $$hh{bigint} ? bigint::_oct_core($_[0]) 248 : $$hh{bigfloat} ? bigfloat::_oct_core($_[0]) 249 : $$hh{bigrat} ? bigrat::_oct_core($_[0]) 250 : $prev_oct ? &$prev_oct($_[0]) 251 : CORE::oct($_[0]); 252} 253. 254 255sub _override { 256 return if $overridden; 257 $prev_oct = *CORE::GLOBAL::oct{CODE}; 258 $prev_hex = *CORE::GLOBAL::hex{CODE}; 259 no warnings 'redefine'; 260 *CORE::GLOBAL::oct = \&_oct; 261 *CORE::GLOBAL::hex = \&_hex; 262 $overridden = 1; 263} 264 265sub unimport { 266 $^H{bigint} = undef; # no longer in effect 267 overload::remove_constant('binary', '', 'float', '', 'integer'); 268} 269 270sub import { 271 my $class = shift; 272 273 $^H{bigint} = 1; # we are in effect 274 $^H{bigfloat} = undef; 275 $^H{bigrat} = undef; 276 277 # for newer Perls always override hex() and oct() with a lexical version: 278 if (LEXICAL) { 279 _override(); 280 } 281 282 my @import = (); 283 my @a = (); # unrecognized arguments 284 my $ver; # version? trace? 285 286 while (@_) { 287 my $param = shift; 288 289 # Accuracy. 290 291 if ($param =~ /^a(ccuracy)?$/) { 292 push @import, 'accuracy', shift(); 293 next; 294 } 295 296 # Precision. 297 298 if ($param =~ /^p(recision)?$/) { 299 push @import, 'precision', shift(); 300 next; 301 } 302 303 # Rounding mode. 304 305 if ($param eq 'round_mode') { 306 push @import, 'round_mode', shift(); 307 next; 308 } 309 310 # Backend library. 311 312 if ($param =~ /^(l|lib|try|only)$/) { 313 push @import, $param eq 'l' ? 'lib' : $param; 314 push @import, shift() if @_; 315 next; 316 } 317 318 if ($param =~ /^(v|version)$/) { 319 $ver = 1; 320 next; 321 } 322 323 if ($param =~ /^(t|trace)$/) { 324 $obj_class .= "::Trace"; 325 eval "require $obj_class"; 326 die $@ if $@; 327 next; 328 } 329 330 if ($param =~ /^(PI|e|bexp|bpi|hex|oct)\z/) { 331 push @a, $param; 332 next; 333 } 334 335 croak("Unknown option '$param'"); 336 } 337 338 eval "require $obj_class"; 339 die $@ if $@; 340 $obj_class -> import(@import); 341 342 if ($ver) { 343 printf "%-31s v%s\n", $class, $class -> VERSION(); 344 printf " lib => %-23s v%s\n", 345 $obj_class -> config("lib"), $obj_class -> config("lib_version"); 346 printf "%-31s v%s\n", $obj_class, $obj_class -> VERSION(); 347 exit; 348 } 349 350 $class -> export_to_level(1, $class, @a); # export inf, NaN, etc. 351 352 overload::constant 353 354 # This takes care each number written as decimal integer and within the 355 # range of what perl can represent as an integer, e.g., "314", but not 356 # "3141592653589793238462643383279502884197169399375105820974944592307". 357 358 integer => sub { 359 #printf "Value '%s' handled by the 'integer' sub.\n", $_[0]; 360 my $str = shift; 361 return $obj_class -> new($str); 362 }, 363 364 # This takes care of each number written with a decimal point and/or 365 # using floating point notation, e.g., "3.", "3.0", "3.14e+2" (decimal), 366 # "0b1.101p+2" (binary), "03.14p+2" and "0o3.14p+2" (octal), and 367 # "0x3.14p+2" (hexadecimal). 368 369 float => sub { 370 #printf "# Value '%s' handled by the 'float' sub.\n", $_[0]; 371 _float_constant(shift); 372 }, 373 374 # Take care of each number written as an integer (no decimal point or 375 # exponent) using binary, octal, or hexadecimal notation, e.g., "0b101" 376 # (binary), "0314" and "0o314" (octal), and "0x314" (hexadecimal). 377 378 binary => sub { 379 #printf "# Value '%s' handled by the 'binary' sub.\n", $_[0]; 380 my $str = shift; 381 return $obj_class -> new($str) if $str =~ /^0[XxBb]/; 382 $obj_class -> from_oct($str); 383 }; 384} 385 386sub inf () { $obj_class -> binf(); } 387sub NaN () { $obj_class -> bnan(); } 388 389sub PI () { $obj_class -> new(3); } 390sub e () { $obj_class -> new(2); } 391 392sub bpi ($) { $obj_class -> new(3); } 393 394sub bexp ($$) { 395 my $x = $obj_class -> new(shift); 396 $x -> bexp(@_); 397} 398 3991; 400 401__END__ 402 403=pod 404 405=head1 NAME 406 407bigint - transparent big integer support for Perl 408 409=head1 SYNOPSIS 410 411 use bigint; 412 413 $x = 2 + 4.5; # Math::BigInt 6 414 print 2 ** 512; # Math::BigInt 134...096 415 print inf + 42; # Math::BigInt inf 416 print NaN * 7; # Math::BigInt NaN 417 print hex("0x1234567890123490"); # Perl v5.10.0 or later 418 419 { 420 no bigint; 421 print 2 ** 256; # a normal Perl scalar now 422 } 423 424 # for older Perls, import into current package: 425 use bigint qw/hex oct/; 426 print hex("0x1234567890123490"); 427 print oct("01234567890123490"); 428 429=head1 DESCRIPTION 430 431All numeric literal in the given scope are converted to Math::BigInt objects. 432Numeric literal that represent non-integers are truncated to an integer. All 433results of expressions are also truncated to integer. 434 435All operators (including basic math operations) except the range operator C<..> 436are overloaded. 437 438Unlike the L<integer> pragma, the C<bigint> pragma creates integers that are 439only limited in their size by the available memory. 440 441So, the following: 442 443 use bigint; 444 $x = 1234; 445 446creates a Math::BigInt and stores a reference to in $x. This happens 447transparently and behind your back, so to speak. 448 449You can see this with the following: 450 451 perl -Mbigint -le 'print ref(1234)' 452 453Since numbers are actually objects, you can call all the usual methods from 454Math::BigFloat on them. This even works to some extent on expressions: 455 456 perl -Mbigint -le '$x = 1234; print $x->bdec()' 457 perl -Mbigint -le 'print 1234->copy()->binc();' 458 perl -Mbigint -le 'print 1234->copy()->binc->badd(6);' 459 perl -Mbigint -le 'print +(1234)->copy()->binc()' 460 461(Note that print doesn't do what you expect if the expression starts with 462'(' hence the C<+>) 463 464You can even chain the operations together as usual: 465 466 perl -Mbigint -le 'print 1234->copy()->binc->badd(6);' 467 1241 468 469Please note the following does not work as expected (prints nothing), since 470overloading of '..' is not yet possible in Perl (as of v5.8.0): 471 472 perl -Mbigint -le 'for (1..2) { print ref($_); }' 473 474=head2 use integer vs. use bigint 475 476There are some difference between C<use integer> and C<use bigint>. 477 478Whereas C<use integer> is limited to what can be handled as a Perl scalar, C<use 479bigint> can handle arbitrarily large integers. 480 481Also, C<use integer> does affect assignments to variables and the return value 482of some functions. C<use bigint> truncates these results to integer: 483 484 # perl -Minteger -wle 'print 3.2' 485 3.2 486 # perl -Minteger -wle 'print 3.2 + 0' 487 3 488 # perl -Mbigint -wle 'print 3.2' 489 3 490 # perl -Mbigint -wle 'print 3.2 + 0' 491 3 492 493 # perl -Mbigint -wle 'print exp(1) + 0' 494 2 495 # perl -Mbigint -wle 'print exp(1)' 496 2 497 # perl -Minteger -wle 'print exp(1)' 498 2.71828182845905 499 # perl -Minteger -wle 'print exp(1) + 0' 500 2 501 502In practice this seldom makes a difference for small integers as B<parts and 503results> of expressions are truncated anyway, but this can, for instance, affect 504the return value of subroutines: 505 506 sub three_integer { use integer; return 3.2; } 507 sub three_bigint { use bigint; return 3.2; } 508 509 print three_integer(), " ", three_bigint(),"\n"; # prints "3.2 3" 510 511=head2 Options 512 513C<bigint> recognizes some options that can be passed while loading it via 514C<use>. The following options exist: 515 516=over 4 517 518=item a or accuracy 519 520This sets the accuracy for all math operations. The argument must be greater 521than or equal to zero. See Math::BigInt's bround() method for details. 522 523 perl -Mbigint=a,2 -le 'print 12345+1' 524 525Note that setting precision and accuracy at the same time is not possible. 526 527=item p or precision 528 529This sets the precision for all math operations. The argument can be any 530integer. Negative values mean a fixed number of digits after the dot, and are 531ignored since all operations happen in integer space. A positive value rounds to 532this digit left from the dot. 0 means round to integer. See Math::BigInt's 533bfround() method for details. 534 535 perl -mbigint=p,5 -le 'print 123456789+123' 536 537Note that setting precision and accuracy at the same time is not possible. 538 539=item t or trace 540 541This enables a trace mode and is primarily for debugging. 542 543=item l, lib, try, or only 544 545Load a different math lib, see L<Math Library>. 546 547 perl -Mbigint=l,GMP -e 'print 2 ** 512' 548 perl -Mbigint=lib,GMP -e 'print 2 ** 512' 549 perl -Mbigint=try,GMP -e 'print 2 ** 512' 550 perl -Mbigint=only,GMP -e 'print 2 ** 512' 551 552=item hex 553 554Override the built-in hex() method with a version that can handle big numbers. 555This overrides it by exporting it to the current package. Under Perl v5.10.0 and 556higher, this is not so necessary, as hex() is lexically overridden in the 557current scope whenever the C<bigint> pragma is active. 558 559=item oct 560 561Override the built-in oct() method with a version that can handle big numbers. 562This overrides it by exporting it to the current package. Under Perl v5.10.0 and 563higher, this is not so necessary, as oct() is lexically overridden in the 564current scope whenever the C<bigint> pragma is active. 565 566=item v or version 567 568this prints out the name and version of the modules and then exits. 569 570 perl -Mbigint=v 571 572=back 573 574=head2 Math Library 575 576Math with the numbers is done (by default) by a backend library module called 577Math::BigInt::Calc. The default is equivalent to saying: 578 579 use bigint lib => 'Calc'; 580 581you can change this by using: 582 583 use bigint lib => 'GMP'; 584 585The following would first try to find Math::BigInt::Foo, then Math::BigInt::Bar, 586and if this also fails, revert to Math::BigInt::Calc: 587 588 use bigint lib => 'Foo,Math::BigInt::Bar'; 589 590Using c<lib> warns if none of the specified libraries can be found and 591L<Math::BigInt> fell back to one of the default libraries. To suppress this 592warning, use c<try> instead: 593 594 use bigint try => 'GMP'; 595 596If you want the code to die instead of falling back, use C<only> instead: 597 598 use bigint only => 'GMP'; 599 600Please see the respective module documentation for further details. 601 602=head2 Method calls 603 604Since all numbers are now objects, you can use all methods that are part of the 605Math::BigInt API. 606 607But a warning is in order. When using the following to make a copy of a number, 608only a shallow copy will be made. 609 610 $x = 9; $y = $x; 611 $x = $y = 7; 612 613Using the copy or the original with overloaded math is okay, e.g., the following 614work: 615 616 $x = 9; $y = $x; 617 print $x + 1, " ", $y,"\n"; # prints 10 9 618 619but calling any method that modifies the number directly will result in B<both> 620the original and the copy being destroyed: 621 622 $x = 9; $y = $x; 623 print $x->badd(1), " ", $y,"\n"; # prints 10 10 624 625 $x = 9; $y = $x; 626 print $x->binc(1), " ", $y,"\n"; # prints 10 10 627 628 $x = 9; $y = $x; 629 print $x->bmul(2), " ", $y,"\n"; # prints 18 18 630 631Using methods that do not modify, but test that the contents works: 632 633 $x = 9; $y = $x; 634 $z = 9 if $x->is_zero(); # works fine 635 636See the documentation about the copy constructor and C<=> in overload, as well 637as the documentation in Math::BigInt for further details. 638 639=head2 Methods 640 641=over 4 642 643=item inf() 644 645A shortcut to return Math::BigInt->binf(). Useful because Perl does not always 646handle bareword C<inf> properly. 647 648=item NaN() 649 650A shortcut to return Math::BigInt->bnan(). Useful because Perl does not always 651handle bareword C<NaN> properly. 652 653=item e 654 655 # perl -Mbigint=e -wle 'print e' 656 657Returns Euler's number C<e>, aka exp(1). Note that under C<bigint>, this is 658truncated to an integer, i.e., 2. 659 660=item PI 661 662 # perl -Mbigint=PI -wle 'print PI' 663 664Returns PI. Note that under C<bigint>, this is truncated to an integer, i.e., 3. 665 666=item bexp() 667 668 bexp($power, $accuracy); 669 670Returns Euler's number C<e> raised to the appropriate power, to the wanted 671accuracy. 672 673Note that under C<bigint>, the result is truncated to an integer. 674 675Example: 676 677 # perl -Mbigint=bexp -wle 'print bexp(1,80)' 678 679=item bpi() 680 681 bpi($accuracy); 682 683Returns PI to the wanted accuracy. Note that under C<bigint>, this is truncated 684to an integer, i.e., 3. 685 686Example: 687 688 # perl -Mbigint=bpi -wle 'print bpi(80)' 689 690=item accuracy() 691 692Set or get the accuracy. 693 694=item precision() 695 696Set or get the precision. 697 698=item round_mode() 699 700Set or get the rounding mode. 701 702=item div_scale() 703 704Set or get the division scale. 705 706=item in_effect() 707 708 use bigint; 709 710 print "in effect\n" if bigint::in_effect; # true 711 { 712 no bigint; 713 print "in effect\n" if bigint::in_effect; # false 714 } 715 716Returns true or false if C<bigint> is in effect in the current scope. 717 718This method only works on Perl v5.9.4 or later. 719 720=back 721 722=head1 CAVEATS 723 724=over 4 725 726=item Hexadecimal, octal, and binary floating point literals 727 728Perl (and this module) accepts hexadecimal, octal, and binary floating point 729literals, but use them with care with Perl versions before v5.32.0, because some 730versions of Perl silently give the wrong result. 731 732=item Operator vs literal overloading 733 734C<bigint> works by overloading handling of integer and floating point literals, 735converting them to L<Math::BigInt> objects. 736 737This means that arithmetic involving only string values or string literals are 738performed using Perl's built-in operators. 739 740For example: 741 742 use bigint; 743 my $x = "900000000000000009"; 744 my $y = "900000000000000007"; 745 print $x - $y; 746 747outputs C<0> on default 32-bit builds, since C<bigint> never sees the string 748literals. To ensure the expression is all treated as C<Math::BigInt> objects, 749use a literal number in the expression: 750 751 print +(0+$x) - $y; 752 753=item Ranges 754 755Perl does not allow overloading of ranges, so you can neither safely use ranges 756with C<bigint> endpoints, nor is the iterator variable a C<Math::BigInt>. 757 758 use 5.010; 759 for my $i (12..13) { 760 for my $j (20..21) { 761 say $i ** $j; # produces a floating-point number, 762 # not an object 763 } 764 } 765 766=item in_effect() 767 768This method only works on Perl v5.9.4 or later. 769 770=item hex()/oct() 771 772C<bigint> overrides these routines with versions that can also handle big 773integer values. Under Perl prior to version v5.9.4, however, this will not 774happen unless you specifically ask for it with the two import tags "hex" and 775"oct" - and then it will be global and cannot be disabled inside a scope with 776C<no bigint>: 777 778 use bigint qw/hex oct/; 779 780 print hex("0x1234567890123456"); 781 { 782 no bigint; 783 print hex("0x1234567890123456"); 784 } 785 786The second call to hex() will warn about a non-portable constant. 787 788Compare this to: 789 790 use bigint; 791 792 # will warn only under Perl older than v5.9.4 793 print hex("0x1234567890123456"); 794 795=back 796 797=head1 EXAMPLES 798 799Some cool command line examples to impress the Python crowd ;) You might want 800to compare them to the results under -Mbigfloat or -Mbigrat: 801 802 perl -Mbigint -le 'print sqrt(33)' 803 perl -Mbigint -le 'print 2*255' 804 perl -Mbigint -le 'print 4.5+2*255' 805 perl -Mbigint -le 'print 123->is_odd()' 806 perl -Mbigint=l,GMP -le 'print 7 ** 7777' 807 808=head1 BUGS 809 810Please report any bugs or feature requests to 811C<bug-bignum at rt.cpan.org>, or through the web interface at 812L<https://rt.cpan.org/Ticket/Create.html?Queue=bignum> (requires login). 813We will be notified, and then you'll automatically be notified of 814progress on your bug as I make changes. 815 816=head1 SUPPORT 817 818You can find documentation for this module with the perldoc command. 819 820 perldoc bigint 821 822You can also look for information at: 823 824=over 4 825 826=item * GitHub 827 828L<https://github.com/pjacklam/p5-bignum> 829 830=item * RT: CPAN's request tracker 831 832L<https://rt.cpan.org/Dist/Display.html?Name=bignum> 833 834=item * MetaCPAN 835 836L<https://metacpan.org/release/bignum> 837 838=item * CPAN Testers Matrix 839 840L<http://matrix.cpantesters.org/?dist=bignum> 841 842=item * CPAN Ratings 843 844L<https://cpanratings.perl.org/dist/bignum> 845 846=back 847 848=head1 LICENSE 849 850This program is free software; you may redistribute it and/or modify it under 851the same terms as Perl itself. 852 853=head1 SEE ALSO 854 855L<bignum> and L<bigrat>. 856 857L<Math::BigInt>, L<Math::BigFloat>, L<Math::BigRat> and L<Math::Big> as well as 858L<Math::BigInt::FastCalc>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>. 859 860=head1 AUTHORS 861 862=over 4 863 864=item * 865 866(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007. 867 868=item * 869 870Maintained by Peter John Acklam E<lt>pjacklam@gmail.comE<gt>, 2014-. 871 872=back 873 874=cut 875