1package bigint; 2 3use 5.010; 4use strict; 5use warnings; 6 7our $VERSION = '0.53'; 8 9use Exporter; 10our @ISA = qw( Exporter ); 11our @EXPORT_OK = qw( PI e bpi bexp hex oct ); 12our @EXPORT = qw( inf NaN ); 13 14use overload; 15 16############################################################################## 17 18# These are all alike, and thus faked by AUTOLOAD 19 20my @faked = qw/round_mode accuracy precision div_scale/; 21our ($AUTOLOAD, $_lite); # _lite for testsuite 22 23sub AUTOLOAD { 24 my $name = $AUTOLOAD; 25 26 $name =~ s/.*:://; # split package 27 no strict 'refs'; 28 foreach my $n (@faked) { 29 if ($n eq $name) { 30 *{"bigint::$name"} = 31 sub { 32 my $self = shift; 33 no strict 'refs'; 34 if (defined $_[0]) { 35 return Math::BigInt->$name($_[0]); 36 } 37 return Math::BigInt->$name(); 38 }; 39 return &$name; 40 } 41 } 42 43 # delayed load of Carp and avoid recursion 44 require Carp; 45 Carp::croak ("Can't call bigint\-\>$name, not a valid method"); 46} 47 48sub upgrade { 49 $Math::BigInt::upgrade; 50} 51 52sub _binary_constant { 53 # this takes a binary/hexadecimal/octal constant string and returns it 54 # as string suitable for new. Basically it converts octal to decimal, and 55 # passes every thing else unmodified back. 56 my $string = shift; 57 58 return Math::BigInt->new($string) if $string =~ /^0[bx]/; 59 60 # so it must be an octal constant 61 Math::BigInt->from_oct($string); 62} 63 64sub _float_constant { 65 # this takes a floating point constant string and returns it truncated to 66 # integer. For instance, '4.5' => '4', '1.234e2' => '123' etc 67 my $float = shift; 68 69 # some simple cases first 70 return $float if ($float =~ /^[+-]?[0-9]+$/); # '+123','-1','0' etc 71 return $float 72 if ($float =~ /^[+-]?[0-9]+\.?[eE]\+?[0-9]+$/); # 123e2, 123.e+2 73 return '0' if ($float =~ /^[+-]?[0]*\.[0-9]+$/); # .2, 0.2, -.1 74 if ($float =~ /^[+-]?[0-9]+\.[0-9]*$/) { # 1., 1.23, -1.2 etc 75 $float =~ s/\..*//; 76 return $float; 77 } 78 my ($mis, $miv, $mfv, $es, $ev) = Math::BigInt::_split($float); 79 return $float if !defined $mis; # doesn't look like a number to me 80 my $ec = int($$ev); 81 my $sign = $$mis; 82 $sign = '' if $sign eq '+'; 83 if ($$es eq '-') { 84 # ignore fraction part entirely 85 if ($ec >= length($$miv)) { # 123.23E-4 86 return '0'; 87 } 88 return $sign . substr($$miv, 0, length($$miv) - $ec); # 1234.45E-2 = 12 89 } 90 # xE+y 91 if ($ec >= length($$mfv)) { 92 $ec -= length($$mfv); 93 return $sign.$$miv.$$mfv if $ec == 0; # 123.45E+2 => 12345 94 return $sign.$$miv.$$mfv.'E'.$ec; # 123.45e+3 => 12345e1 95 } 96 $mfv = substr($$mfv, 0, $ec); 97 $sign.$$miv.$mfv; # 123.45e+1 => 1234 98} 99 100sub unimport { 101 $^H{bigint} = undef; # no longer in effect 102 overload::remove_constant('binary', '', 'float', '', 'integer'); 103} 104 105sub in_effect { 106 my $level = shift || 0; 107 my $hinthash = (caller($level))[10]; 108 $hinthash->{bigint}; 109} 110 111############################################################################# 112# the following two routines are for "use bigint qw/hex oct/;": 113 114use constant LEXICAL => $] > 5.009004; 115 116# Internal function with the same semantics as CORE::hex(). This function is 117# not used directly, but rather by other front-end functions. 118 119sub _hex_core { 120 my $str = shift; 121 122 # Strip off, clean, and parse as much as we can from the beginning. 123 124 my $x; 125 if ($str =~ s/ ^ ( 0? [xX] )? ( [0-9a-fA-F]* ( _ [0-9a-fA-F]+ )* ) //x) { 126 my $chrs = $2; 127 $chrs =~ tr/_//d; 128 $chrs = '0' unless CORE::length $chrs; 129 $x = Math::BigInt -> from_hex($chrs); 130 } else { 131 $x = Math::BigInt -> bzero(); 132 } 133 134 # Warn about trailing garbage. 135 136 if (CORE::length($str)) { 137 require Carp; 138 Carp::carp(sprintf("Illegal hexadecimal digit '%s' ignored", 139 substr($str, 0, 1))); 140 } 141 142 return $x; 143} 144 145# Internal function with the same semantics as CORE::oct(). This function is 146# not used directly, but rather by other front-end functions. 147 148sub _oct_core { 149 my $str = shift; 150 151 $str =~ s/^\s*//; 152 153 # Hexadecimal input. 154 155 return _hex_core($str) if $str =~ /^0?[xX]/; 156 157 my $x; 158 159 # Binary input. 160 161 if ($str =~ /^0?[bB]/) { 162 163 # Strip off, clean, and parse as much as we can from the beginning. 164 165 if ($str =~ s/ ^ ( 0? [bB] )? ( [01]* ( _ [01]+ )* ) //x) { 166 my $chrs = $2; 167 $chrs =~ tr/_//d; 168 $chrs = '0' unless CORE::length $chrs; 169 $x = Math::BigInt -> from_bin($chrs); 170 } 171 172 # Warn about trailing garbage. 173 174 if (CORE::length($str)) { 175 require Carp; 176 Carp::carp(sprintf("Illegal binary digit '%s' ignored", 177 substr($str, 0, 1))); 178 } 179 180 return $x; 181 } 182 183 # Octal input. Strip off, clean, and parse as much as we can from the 184 # beginning. 185 186 if ($str =~ s/ ^ ( 0? [oO] )? ( [0-7]* ( _ [0-7]+ )* ) //x) { 187 my $chrs = $2; 188 $chrs =~ tr/_//d; 189 $chrs = '0' unless CORE::length $chrs; 190 $x = Math::BigInt -> from_oct($chrs); 191 } 192 193 # Warn about trailing garbage. CORE::oct() only warns about 8 and 9, but it 194 # is more helpful to warn about all invalid digits. 195 196 if (CORE::length($str)) { 197 require Carp; 198 Carp::carp(sprintf("Illegal octal digit '%s' ignored", 199 substr($str, 0, 1))); 200 } 201 202 return $x; 203} 204 205{ 206 my $proto = LEXICAL ? '_' : ';$'; 207 eval ' 208sub hex(' . $proto . ') {' . <<'.'; 209 my $str = @_ ? $_[0] : $_; 210 _hex_core($str); 211} 212. 213 214 eval ' 215sub oct(' . $proto . ') {' . <<'.'; 216 my $str = @_ ? $_[0] : $_; 217 _oct_core($str); 218} 219. 220} 221 222############################################################################# 223# the following two routines are for Perl 5.9.4 or later and are lexical 224 225my ($prev_oct, $prev_hex, $overridden); 226 227if (LEXICAL) { eval <<'.' } 228sub _hex(_) { 229 my $hh = (caller 0)[10]; 230 return $prev_hex ? &$prev_hex($_[0]) : CORE::hex($_[0]) 231 unless $$hh{bigint}||$$hh{bignum}||$$hh{bigrat}; 232 _hex_core($_[0]); 233} 234 235sub _oct(_) { 236 my $hh = (caller 0)[10]; 237 return $prev_oct ? &$prev_oct($_[0]) : CORE::oct($_[0]) 238 unless $$hh{bigint}||$$hh{bignum}||$$hh{bigrat}; 239 _oct_core($_[0]); 240} 241. 242 243sub _override { 244 return if $overridden; 245 $prev_oct = *CORE::GLOBAL::oct{CODE}; 246 $prev_hex = *CORE::GLOBAL::hex{CODE}; 247 no warnings 'redefine'; 248 *CORE::GLOBAL::oct = \&_oct; 249 *CORE::GLOBAL::hex = \&_hex; 250 $overridden++; 251} 252 253sub import { 254 my $self = shift; 255 256 $^H{bigint} = 1; # we are in effect 257 258 # for newer Perls always override hex() and oct() with a lexical version: 259 if (LEXICAL) { 260 _override(); 261 } 262 # some defaults 263 my $lib = ''; 264 my $lib_kind = 'try'; 265 266 my @import = (':constant'); # drive it w/ constant 267 my @a = @_; 268 my $l = scalar @_; 269 my $j = 0; 270 my ($ver, $trace); # version? trace? 271 my ($a, $p); # accuracy, precision 272 for (my $i = 0; $i < $l; $i++, $j++) { 273 if ($_[$i] =~ /^(l|lib|try|only)$/) { 274 # this causes a different low lib to take care... 275 $lib_kind = $1; 276 $lib_kind = 'lib' if $lib_kind eq 'l'; 277 $lib = $_[$i + 1] || ''; 278 my $s = 2; 279 $s = 1 if @a - $j < 2; # avoid "can not modify non-existent..." 280 splice @a, $j, $s; 281 $j -= $s; 282 $i++; 283 } elsif ($_[$i] =~ /^(a|accuracy)$/) { 284 $a = $_[$i + 1]; 285 my $s = 2; 286 $s = 1 if @a - $j < 2; # avoid "can not modify non-existent..." 287 splice @a, $j, $s; 288 $j -= $s; 289 $i++; 290 } elsif ($_[$i] =~ /^(p|precision)$/) { 291 $p = $_[$i + 1]; 292 my $s = 2; 293 $s = 1 if @a - $j < 2; # avoid "can not modify non-existent..." 294 splice @a, $j, $s; 295 $j -= $s; 296 $i++; 297 } elsif ($_[$i] =~ /^(v|version)$/) { 298 $ver = 1; 299 splice @a, $j, 1; 300 $j--; 301 } elsif ($_[$i] =~ /^(t|trace)$/) { 302 $trace = 1; 303 splice @a, $j, 1; 304 $j--; 305 } elsif ($_[$i] !~ /^(PI|e|bpi|bexp|hex|oct)\z/) { 306 die ("unknown option $_[$i]"); 307 } 308 } 309 my $class; 310 $_lite = 0; # using M::BI::L ? 311 if ($trace) { 312 require Math::BigInt::Trace; 313 $class = 'Math::BigInt::Trace'; 314 } else { 315 # see if we can find Math::BigInt::Lite 316 if (!defined $a && !defined $p) { # rounding won't work to well 317 local @INC = @INC; 318 pop @INC if $INC[-1] eq '.'; 319 if (eval { require Math::BigInt::Lite; 1 }) { 320 @import = (); # :constant in Lite, not MBI 321 Math::BigInt::Lite->import(':constant'); 322 $_lite = 1; # signal okay 323 } 324 } 325 require Math::BigInt if $_lite == 0; # not already loaded? 326 $class = 'Math::BigInt'; # regardless of MBIL or not 327 } 328 push @import, $lib_kind => $lib if $lib ne ''; 329 # Math::BigInt::Trace or plain Math::BigInt 330 $class->import(@import); 331 332 bigint->accuracy($a) if defined $a; 333 bigint->precision($p) if defined $p; 334 if ($ver) { 335 print "bigint\t\t\t v$VERSION\n"; 336 print "Math::BigInt::Lite\t v$Math::BigInt::Lite::VERSION\n" if $_lite; 337 print "Math::BigInt\t\t v$Math::BigInt::VERSION"; 338 my $config = Math::BigInt->config(); 339 print " lib => $config->{lib} v$config->{lib_version}\n"; 340 exit; 341 } 342 # we take care of floating point constants, since BigFloat isn't available 343 # and BigInt doesn't like them: 344 overload::constant float => 345 sub { 346 Math::BigInt->new(_float_constant(shift)); 347 }; 348 # Take care of octal/hexadecimal constants 349 overload::constant binary => 350 sub { 351 _binary_constant(shift); 352 }; 353 354 # if another big* was already loaded: 355 my ($package) = caller(); 356 357 no strict 'refs'; 358 if (!defined *{"${package}::inf"}) { 359 $self->export_to_level(1, $self, @a); # export inf and NaN, e and PI 360 } 361} 362 363sub inf () { Math::BigInt->binf(); } 364sub NaN () { Math::BigInt->bnan(); } 365 366sub PI () { Math::BigInt->new(3); } 367sub e () { Math::BigInt->new(2); } 368sub bpi ($) { Math::BigInt->new(3); } 369sub bexp ($$) { 370 my $x = Math::BigInt->new($_[0]); 371 $x->bexp($_[1]); 372} 373 3741; 375 376__END__ 377 378=pod 379 380=head1 NAME 381 382bigint - Transparent BigInteger support for Perl 383 384=head1 SYNOPSIS 385 386 use bigint; 387 388 $x = 2 + 4.5,"\n"; # BigInt 6 389 print 2 ** 512,"\n"; # really is what you think it is 390 print inf + 42,"\n"; # inf 391 print NaN * 7,"\n"; # NaN 392 print hex("0x1234567890123490"),"\n"; # Perl v5.10.0 or later 393 394 { 395 no bigint; 396 print 2 ** 256,"\n"; # a normal Perl scalar now 397 } 398 399 # Import into current package: 400 use bigint qw/hex oct/; 401 print hex("0x1234567890123490"),"\n"; 402 print oct("01234567890123490"),"\n"; 403 404=head1 DESCRIPTION 405 406All operators (including basic math operations) except the range operator C<..> 407are overloaded. Integer constants are created as proper BigInts. 408 409Floating point constants are truncated to integer. All parts and results of 410expressions are also truncated. 411 412Unlike L<integer>, this pragma creates integer constants that are only 413limited in their size by the available memory and CPU time. 414 415=head2 use integer vs. use bigint 416 417There is one small difference between C<use integer> and C<use bigint>: the 418former will not affect assignments to variables and the return value of 419some functions. C<bigint> truncates these results to integer too: 420 421 # perl -Minteger -wle 'print 3.2' 422 3.2 423 # perl -Minteger -wle 'print 3.2 + 0' 424 3 425 # perl -Mbigint -wle 'print 3.2' 426 3 427 # perl -Mbigint -wle 'print 3.2 + 0' 428 3 429 430 # perl -Mbigint -wle 'print exp(1) + 0' 431 2 432 # perl -Mbigint -wle 'print exp(1)' 433 2 434 # perl -Minteger -wle 'print exp(1)' 435 2.71828182845905 436 # perl -Minteger -wle 'print exp(1) + 0' 437 2 438 439In practice this makes seldom a difference as B<parts and results> of 440expressions will be truncated anyway, but this can, for instance, affect the 441return value of subroutines: 442 443 sub three_integer { use integer; return 3.2; } 444 sub three_bigint { use bigint; return 3.2; } 445 446 print three_integer(), " ", three_bigint(),"\n"; # prints "3.2 3" 447 448=head2 Options 449 450bigint recognizes some options that can be passed while loading it via use. 451The options can (currently) be either a single letter form, or the long form. 452The following options exist: 453 454=over 2 455 456=item a or accuracy 457 458This sets the accuracy for all math operations. The argument must be greater 459than or equal to zero. See Math::BigInt's bround() function for details. 460 461 perl -Mbigint=a,2 -le 'print 12345+1' 462 463Note that setting precision and accuracy at the same time is not possible. 464 465=item p or precision 466 467This sets the precision for all math operations. The argument can be any 468integer. Negative values mean a fixed number of digits after the dot, and 469are <B>ignored</B> since all operations happen in integer space. 470A positive value rounds to this digit left from the dot. 0 or 1 mean round to 471integer and are ignore like negative values. 472 473See Math::BigInt's bfround() function for details. 474 475 perl -Mbignum=p,5 -le 'print 123456789+123' 476 477Note that setting precision and accuracy at the same time is not possible. 478 479=item t or trace 480 481This enables a trace mode and is primarily for debugging bigint or 482Math::BigInt. 483 484=item hex 485 486Override the built-in hex() method with a version that can handle big 487integers. This overrides it by exporting it to the current package. Under 488Perl v5.10.0 and higher, this is not so necessary, as hex() is lexically 489overridden in the current scope whenever the bigint pragma is active. 490 491=item oct 492 493Override the built-in oct() method with a version that can handle big 494integers. This overrides it by exporting it to the current package. Under 495Perl v5.10.0 and higher, this is not so necessary, as oct() is lexically 496overridden in the current scope whenever the bigint pragma is active. 497 498=item l, lib, try or only 499 500Load a different math lib, see L<Math Library>. 501 502 perl -Mbigint=lib,GMP -e 'print 2 ** 512' 503 perl -Mbigint=try,GMP -e 'print 2 ** 512' 504 perl -Mbigint=only,GMP -e 'print 2 ** 512' 505 506Currently there is no way to specify more than one library on the command 507line. This means the following does not work: 508 509 perl -Mbignum=l,GMP,Pari -e 'print 2 ** 512' 510 511This will be hopefully fixed soon ;) 512 513=item v or version 514 515This prints out the name and version of all modules used and then exits. 516 517 perl -Mbigint=v 518 519=back 520 521=head2 Math Library 522 523Math with the numbers is done (by default) by a module called 524Math::BigInt::Calc. This is equivalent to saying: 525 526 use bigint lib => 'Calc'; 527 528You can change this by using: 529 530 use bignum lib => 'GMP'; 531 532The following would first try to find Math::BigInt::Foo, then 533Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc: 534 535 use bigint lib => 'Foo,Math::BigInt::Bar'; 536 537Using C<lib> warns if none of the specified libraries can be found and 538L<Math::BigInt> did fall back to one of the default libraries. 539To suppress this warning, use C<try> instead: 540 541 use bignum try => 'GMP'; 542 543If you want the code to die instead of falling back, use C<only> instead: 544 545 use bignum only => 'GMP'; 546 547Please see respective module documentation for further details. 548 549=head2 Internal Format 550 551The numbers are stored as objects, and their internals might change at anytime, 552especially between math operations. The objects also might belong to different 553classes, like Math::BigInt, or Math::BigInt::Lite. Mixing them together, even 554with normal scalars is not extraordinary, but normal and expected. 555 556You should not depend on the internal format, all accesses must go through 557accessor methods. E.g. looking at $x->{sign} is not a good idea since there 558is no guaranty that the object in question has such a hash key, nor is a hash 559underneath at all. 560 561=head2 Sign 562 563The sign is either '+', '-', 'NaN', '+inf' or '-inf'. 564You can access it with the sign() method. 565 566A sign of 'NaN' is used to represent the result when input arguments are not 567numbers or as a result of 0/0. '+inf' and '-inf' represent plus respectively 568minus infinity. You will get '+inf' when dividing a positive number by 0, and 569'-inf' when dividing any negative number by 0. 570 571=head2 Method calls 572 573Since all numbers are now objects, you can use all functions that are part of 574the BigInt API. You can only use the bxxx() notation, and not the fxxx() 575notation, though. 576 577But a warning is in order. When using the following to make a copy of a number, 578only a shallow copy will be made. 579 580 $x = 9; $y = $x; 581 $x = $y = 7; 582 583Using the copy or the original with overloaded math is okay, e.g. the 584following work: 585 586 $x = 9; $y = $x; 587 print $x + 1, " ", $y,"\n"; # prints 10 9 588 589but calling any method that modifies the number directly will result in 590B<both> the original and the copy being destroyed: 591 592 $x = 9; $y = $x; 593 print $x->badd(1), " ", $y,"\n"; # prints 10 10 594 595 $x = 9; $y = $x; 596 print $x->binc(1), " ", $y,"\n"; # prints 10 10 597 598 $x = 9; $y = $x; 599 print $x->bmul(2), " ", $y,"\n"; # prints 18 18 600 601Using methods that do not modify, but test that the contents works: 602 603 $x = 9; $y = $x; 604 $z = 9 if $x->is_zero(); # works fine 605 606See the documentation about the copy constructor and C<=> in overload, as 607well as the documentation in BigInt for further details. 608 609=head2 Methods 610 611=over 2 612 613=item inf() 614 615A shortcut to return Math::BigInt->binf(). Useful because Perl does not always 616handle bareword C<inf> properly. 617 618=item NaN() 619 620A shortcut to return Math::BigInt->bnan(). Useful because Perl does not always 621handle bareword C<NaN> properly. 622 623=item e 624 625 # perl -Mbigint=e -wle 'print e' 626 627Returns Euler's number C<e>, aka exp(1). Note that under bigint, this is 628truncated to an integer, and hence simple '2'. 629 630=item PI 631 632 # perl -Mbigint=PI -wle 'print PI' 633 634Returns PI. Note that under bigint, this is truncated to an integer, and hence 635simple '3'. 636 637=item bexp() 638 639 bexp($power,$accuracy); 640 641Returns Euler's number C<e> raised to the appropriate power, to 642the wanted accuracy. 643 644Note that under bigint, the result is truncated to an integer. 645 646Example: 647 648 # perl -Mbigint=bexp -wle 'print bexp(1,80)' 649 650=item bpi() 651 652 bpi($accuracy); 653 654Returns PI to the wanted accuracy. Note that under bigint, this is truncated 655to an integer, and hence simple '3'. 656 657Example: 658 659 # perl -Mbigint=bpi -wle 'print bpi(80)' 660 661=item upgrade() 662 663Return the class that numbers are upgraded to, is in fact returning 664C<$Math::BigInt::upgrade>. 665 666=item in_effect() 667 668 use bigint; 669 670 print "in effect\n" if bigint::in_effect; # true 671 { 672 no bigint; 673 print "in effect\n" if bigint::in_effect; # false 674 } 675 676Returns true or false if C<bigint> is in effect in the current scope. 677 678This method only works on Perl v5.9.4 or later. 679 680=back 681 682=head1 CAVEATS 683 684=over 2 685 686=item Operator vs literal overloading 687 688C<bigint> works by overloading handling of integer and floating point 689literals, converting them to L<Math::BigInt> objects. 690 691This means that arithmetic involving only string values or string 692literals will be performed using Perl's built-in operators. 693 694For example: 695 696 use bignum; 697 my $x = "900000000000000009"; 698 my $y = "900000000000000007"; 699 print $x - $y; 700 701will output C<0> on default 32-bit builds, since C<bigint> never sees 702the string literals. To ensure the expression is all treated as 703C<Math::BigInt> objects, use a literal number in the expression: 704 705 print +(0+$x) - $y; 706 707=item ranges 708 709Perl does not allow overloading of ranges, so you can neither safely use 710ranges with bigint endpoints, nor is the iterator variable a bigint. 711 712 use 5.010; 713 for my $i (12..13) { 714 for my $j (20..21) { 715 say $i ** $j; # produces a floating-point number, 716 # not a big integer 717 } 718 } 719 720=item in_effect() 721 722This method only works on Perl v5.9.4 or later. 723 724=item hex()/oct() 725 726C<bigint> overrides these routines with versions that can also handle 727big integer values. Under Perl prior to version v5.9.4, however, this 728will not happen unless you specifically ask for it with the two 729import tags "hex" and "oct" - and then it will be global and cannot be 730disabled inside a scope with "no bigint": 731 732 use bigint qw/hex oct/; 733 734 print hex("0x1234567890123456"); 735 { 736 no bigint; 737 print hex("0x1234567890123456"); 738 } 739 740The second call to hex() will warn about a non-portable constant. 741 742Compare this to: 743 744 use bigint; 745 746 # will warn only under Perl older than v5.9.4 747 print hex("0x1234567890123456"); 748 749=back 750 751=head1 MODULES USED 752 753C<bigint> is just a thin wrapper around various modules of the Math::BigInt 754family. Think of it as the head of the family, who runs the shop, and orders 755the others to do the work. 756 757The following modules are currently used by bigint: 758 759 Math::BigInt::Lite (for speed, and only if it is loadable) 760 Math::BigInt 761 762=head1 EXAMPLES 763 764Some cool command line examples to impress the Python crowd ;) You might want 765to compare them to the results under -Mbignum or -Mbigrat: 766 767 perl -Mbigint -le 'print sqrt(33)' 768 perl -Mbigint -le 'print 2*255' 769 perl -Mbigint -le 'print 4.5+2*255' 770 perl -Mbigint -le 'print 3/7 + 5/7 + 8/3' 771 perl -Mbigint -le 'print 123->is_odd()' 772 perl -Mbigint -le 'print log(2)' 773 perl -Mbigint -le 'print 2 ** 0.5' 774 perl -Mbigint=a,65 -le 'print 2 ** 0.2' 775 perl -Mbignum=a,65,l,GMP -le 'print 7 ** 7777' 776 777=head1 BUGS 778 779For information about bugs and how to report them, see the BUGS section in the 780documentation available with the perldoc command. 781 782 perldoc bignum 783 784=head1 SUPPORT 785 786You can find documentation for this module with the perldoc command. 787 788 perldoc bigint 789 790For more information, see the SUPPORT section in the documentation available 791with the perldoc command. 792 793 perldoc bignum 794 795=head1 LICENSE 796 797This program is free software; you may redistribute it and/or modify it under 798the same terms as Perl itself. 799 800=head1 SEE ALSO 801 802L<bignum> and L<bigrat>. 803 804L<Math::BigInt>, L<Math::BigFloat>, L<Math::BigRat> and L<Math::Big> as well as 805L<Math::BigInt::FastCalc>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>. 806 807=head1 AUTHORS 808 809=over 4 810 811=item * 812 813(C) by Tels L<http://bloodgate.com/> in early 2002 - 2007. 814 815=item * 816 817Maintained by Peter John Acklam E<lt>pjacklam@gmail.comE<gt>, 2014-. 818 819=back 820 821=cut 822