1 package Math::BigInt::FastCalc;
7 use Math::BigInt::Calc 1.997;
13 ##############################################################################
14 # global constants, flags and accessory
16 # announce that we are compatible with MBI v1.83 and up
17 sub api_version () { 2; }
19 # use Calc to override the methods that we do not provide in XS
27 pow root sqrt log_int fac nok
29 from_hex from_bin from_oct as_hex as_bin as_oct
36 *{'Math::BigInt::FastCalc::_' . $method} = \&{'Math::BigInt::Calc::_' . $method};
40 XSLoader::load(__PACKAGE__, $VERSION, Math::BigInt::Calc::_base_len());
42 ##############################################################################
43 ##############################################################################
53 Math::BigInt::FastCalc - Math::BigInt::Calc with some XS for more speed
57 Provides support for big integer calculations. Not intended to be used by
58 other modules. Other modules which sport the same functions can also be used
59 to support Math::BigInt, like L<Math::BigInt::GMP> or L<Math::BigInt::Pari>.
63 In order to allow for multiple big integer libraries, Math::BigInt was
64 rewritten to use library modules for core math routines. Any module which
65 follows the same API as this can be used instead by using the following:
67 use Math::BigInt lib => 'libname';
69 'libname' is either the long name ('Math::BigInt::Pari'), or only the short
70 version like 'Pari'. To use this library:
72 use Math::BigInt lib => 'FastCalc';
74 Note that from L<Math::BigInt> v1.76 onwards, FastCalc will be loaded
75 automatically, if possible.
79 FastCalc works exactly like Calc, in stores the numbers in decimal form,
84 The following functions are now implemented in FastCalc.xs:
86 _is_odd _is_even _is_one _is_zero
95 Please report any bugs or feature requests to
96 C<bug-math-bigint-fastcalc at rt.cpan.org>, or through the web interface at
97 L<https://rt.cpan.org/Ticket/Create.html?Queue=Math-BigInt-FastCalc>
99 We will be notified, and then you'll automatically be notified of progress on
100 your bug as I make changes.
104 You can find documentation for this module with the perldoc command.
106 perldoc Math::BigInt::FastCalc
108 You can also look for information at:
112 =item * RT: CPAN's request tracker
114 L<https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt-FastCalc>
116 =item * AnnoCPAN: Annotated CPAN documentation
118 L<http://annocpan.org/dist/Math-BigInt-FastCalc>
122 L<http://cpanratings.perl.org/dist/Math-BigInt-FastCalc>
126 L<http://search.cpan.org/dist/Math-BigInt-FastCalc/>
128 =item * CPAN Testers Matrix
130 L<http://matrix.cpantesters.org/?dist=Math-BigInt-FastCalc>
132 =item * The Bignum mailing list
136 =item * Post to mailing list
138 C<bignum at lists.scsys.co.uk>
140 =item * View mailing list
142 L<http://lists.scsys.co.uk/pipermail/bignum/>
144 =item * Subscribe/Unsubscribe
146 L<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/bignum>
154 This program is free software; you may redistribute it and/or modify it under
155 the same terms as Perl itself.
159 Original math code by Mark Biggar, rewritten by Tels L<http://bloodgate.com/>
161 Separated from BigInt and shaped API with the help of John Peacock.
163 Fixed, sped-up and enhanced by Tels http://bloodgate.com 2001-2003.
164 Further streamlining (api_version 1 etc.) by Tels 2004-2007.
166 Bug-fixing by Peter John Acklam E<lt>pjacklam@online.noE<gt> 2010-2015.
170 L<Math::BigInt>, L<Math::BigFloat>, and the other backends
171 L<Math::BigInt::Calc>, L<Math::BigInt::GMP>, and L<Math::BigInt::Pari>.