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 ##############################################################################
51 Math::BigInt::FastCalc - Math::BigInt::Calc with some XS for more speed
55 Provides support for big integer calculations. Not intended to be used by
56 other modules. Other modules which sport the same functions can also be used
57 to support Math::BigInt, like L<Math::BigInt::GMP> or L<Math::BigInt::Pari>.
61 In order to allow for multiple big integer libraries, Math::BigInt was
62 rewritten to use library modules for core math routines. Any module which
63 follows the same API as this can be used instead by using the following:
65 use Math::BigInt lib => 'libname';
67 'libname' is either the long name ('Math::BigInt::Pari'), or only the short
68 version like 'Pari'. To use this library:
70 use Math::BigInt lib => 'FastCalc';
72 Note that from L<Math::BigInt> v1.76 onwards, FastCalc will be loaded
73 automatically, if possible.
77 FastCalc works exactly like Calc, in stores the numbers in decimal form,
82 The following functions are now implemented in FastCalc.xs:
84 _is_odd _is_even _is_one _is_zero
93 This program is free software; you may redistribute it and/or modify it under
94 the same terms as Perl itself.
98 Original math code by Mark Biggar, rewritten by Tels L<http://bloodgate.com/>
100 Separated from BigInt and shaped API with the help of John Peacock.
102 Fixed, sped-up and enhanced by Tels http://bloodgate.com 2001-2003.
103 Further streamlining (api_version 1 etc.) by Tels 2004-2007.
105 Bug-fixing by Peter John Acklam E<lt>pjacklam@online.noE<gt> 2010-2011.
109 L<Math::BigInt>, L<Math::BigFloat>,
110 L<Math::BigInt::GMP>, L<Math::BigInt::FastCalc> and L<Math::BigInt::Pari>.