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