This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade Math::BigInt::FastCalc from version 0.5008 to 0.5009
[perl5.git] / cpan / Math-BigInt-FastCalc / lib / Math / BigInt / FastCalc.pm
CommitLineData
062a4e99
T
1package Math::BigInt::FastCalc;
2
08a3f4a9 3use 5.006;
062a4e99 4use strict;
f08c1152 5use warnings;
062a4e99 6
23935f82 7use Math::BigInt::Calc 1.999801;
062a4e99 8
d239a8c7
CBW
9our @ISA = qw< Math::BigInt::Calc >;
10
5ddb873f 11our $VERSION = '0.5009';
062a4e99 12
062a4e99
T
13##############################################################################
14# global constants, flags and accessory
15
1db682fd
PJA
16# announce that we are compatible with MBI v1.83 and up
17sub api_version () { 2; }
71f01b37 18
4dd6c65f 19# use Calc to override the methods that we do not provide in XS
062a4e99 20
c0fdee65 21require XSLoader;
d239a8c7 22XSLoader::load(__PACKAGE__, $VERSION, Math::BigInt::Calc->_base_len());
062a4e99
T
23
24##############################################################################
25##############################################################################
26
271;
212f8d8f 28
062a4e99 29__END__
212f8d8f 30
206957a7 31=pod
062a4e99
T
32
33=head1 NAME
34
35Math::BigInt::FastCalc - Math::BigInt::Calc with some XS for more speed
36
37=head1 SYNOPSIS
38
d239a8c7
CBW
39 # to use it with Math::BigInt
40 use Math::BigInt lib => 'FastCalc';
41
42 # to use it with Math::BigFloat
43 use Math::BigFloat lib => 'FastCalc';
44
45 # to use it with Math::BigRat
46 use Math::BigRat lib => 'FastCalc';
47
48=head1 DESCRIPTION
49
50Math::BigInt::FastCalc inherits from Math::BigInt::Calc.
51
062a4e99
T
52Provides support for big integer calculations. Not intended to be used by
53other modules. Other modules which sport the same functions can also be used
54to support Math::BigInt, like L<Math::BigInt::GMP> or L<Math::BigInt::Pari>.
55
062a4e99
T
56In order to allow for multiple big integer libraries, Math::BigInt was
57rewritten to use library modules for core math routines. Any module which
58follows the same API as this can be used instead by using the following:
59
60 use Math::BigInt lib => 'libname';
61
62'libname' is either the long name ('Math::BigInt::Pari'), or only the short
63version like 'Pari'. To use this library:
64
65 use Math::BigInt lib => 'FastCalc';
66
062a4e99
T
67=head1 STORAGE
68
d239a8c7
CBW
69Math::BigInt::FastCalc works exactly like Math::BigInt::Calc. Numbers are
70stored in decimal form chopped into parts.
062a4e99
T
71
72=head1 METHODS
73
74The following functions are now implemented in FastCalc.xs:
75
76 _is_odd _is_even _is_one _is_zero
77 _is_two _is_ten
78 _zero _one _two _ten
1db682fd 79 _acmp _len
062a4e99
T
80 _inc _dec
81 __strip_zeros _copy
82
212f8d8f
SH
83=head1 BUGS
84
85Please report any bugs or feature requests to
86C<bug-math-bigint-fastcalc at rt.cpan.org>, or through the web interface at
87L<https://rt.cpan.org/Ticket/Create.html?Queue=Math-BigInt-FastCalc>
88(requires login).
89We will be notified, and then you'll automatically be notified of progress on
90your bug as I make changes.
91
92=head1 SUPPORT
93
94You can find documentation for this module with the perldoc command.
95
96 perldoc Math::BigInt::FastCalc
97
98You can also look for information at:
99
100=over 4
101
102=item * RT: CPAN's request tracker
103
104L<https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt-FastCalc>
105
106=item * AnnoCPAN: Annotated CPAN documentation
107
108L<http://annocpan.org/dist/Math-BigInt-FastCalc>
109
110=item * CPAN Ratings
111
112L<http://cpanratings.perl.org/dist/Math-BigInt-FastCalc>
113
114=item * Search CPAN
115
116L<http://search.cpan.org/dist/Math-BigInt-FastCalc/>
117
118=item * CPAN Testers Matrix
119
120L<http://matrix.cpantesters.org/?dist=Math-BigInt-FastCalc>
121
122=item * The Bignum mailing list
123
124=over 4
125
126=item * Post to mailing list
127
128C<bignum at lists.scsys.co.uk>
129
130=item * View mailing list
131
132L<http://lists.scsys.co.uk/pipermail/bignum/>
133
134=item * Subscribe/Unsubscribe
135
136L<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/bignum>
137
138=back
139
140=back
141
062a4e99 142=head1 LICENSE
71f01b37 143
062a4e99 144This program is free software; you may redistribute it and/or modify it under
71f01b37 145the same terms as Perl itself.
062a4e99
T
146
147=head1 AUTHORS
148
149Original math code by Mark Biggar, rewritten by Tels L<http://bloodgate.com/>
150in late 2000.
c4a6f826 151Separated from BigInt and shaped API with the help of John Peacock.
824a8d2e 152
062a4e99 153Fixed, sped-up and enhanced by Tels http://bloodgate.com 2001-2003.
7b29e1e6 154Further streamlining (api_version 1 etc.) by Tels 2004-2007.
824a8d2e 155
d239a8c7 156Bug-fixing by Peter John Acklam E<lt>pjacklam@online.noE<gt> 2010-2016.
062a4e99
T
157
158=head1 SEE ALSO
159
d239a8c7
CBW
160L<Math::BigInt::Lib> for a description of the API.
161
162Alternative libraries L<Math::BigInt::Calc>, L<Math::BigInt::GMP>, and
163L<Math::BigInt::Pari>.
164
165Some of the modules that use these libraries L<Math::BigInt>,
166L<Math::BigFloat>, and L<Math::BigRat>.
062a4e99
T
167
168=cut