@@ -1,314 +1,339 @@
Revision history for Perl extension Math::BigInt::GMP.
+2014-04-03 v1.38 pjacklam
+ * Updated test files from the Math::BigInt distribution (Peter John Acklam).
+ * Updated POD (Peter John Acklam)
+ * Updated bundled Devel::CheckLib from v0.93 to v1.01 (Peter John Acklam).
+
2011-09-04 v1.37 pjacklam
- * Updated test files from the Math::BigInt distribution (Peter John Acklam).
- * Updated bundled Devel::CheckLib from v0.92 to v0.93 (Peter John Acklam).
- * Math::BigInt::GMP now requires Math::BigInt v1.997 (Peter John Acklam).
- * Include "^MYMETA\.(yml|json)\z" in MANIFEST.SKIP. Whereas META.* are
- generated by the distribution author at packaging time, MYMETA.* are
- generated by the end user at configure time after any dynamic dependencies
- are known. (Peter John Acklam)
- * Changed Makefile.PL so that a "make dist" makes a META.yml and META.json.
- (Peter John Acklam)
- * Updated common test files from the Math::BigInt distribution. (Peter John
- Acklam)
+ * Updated test files from the Math::BigInt distribution (Peter John Acklam).
+ * Updated bundled Devel::CheckLib from v0.92 to v0.93 (Peter John Acklam).
+ * Math::BigInt::GMP now requires Math::BigInt v1.997 (Peter John Acklam).
+ * Include "^MYMETA\.(yml|json)\z" in MANIFEST.SKIP. Whereas META.* are
+ generated by the distribution author at packaging time, MYMETA.* are
+ generated by the end user at configure time after any dynamic dependencies
+ are known. (Peter John Acklam)
+ * Changed Makefile.PL so that a "make dist" makes a META.yml and META.json.
+ (Peter John Acklam)
+ * Updated common test files from the Math::BigInt distribution. (Peter John
+ Acklam)
2011-02-26 v1.36 pjacklam (6362 tests)
- * Change bigintpm.inc to reflect recent changes in the Math::BigInt
- distribution (Peter John Acklam).
- * Use a _nok() function more similar to the one in Math::BigInt::Calc
- (Peter John Acklam).
+ * Change bigintpm.inc to reflect recent changes in the Math::BigInt
+ distribution (Peter John Acklam).
+ * Use a _nok() function more similar to the one in Math::BigInt::Calc
+ (Peter John Acklam).
2011-02-08 v1.35 pjacklam (6361 tests)
- * Rename files for testing signature, module loading, and POD so the names
- are within the 8+3 character limit (Peter John Acklam).
- * Rename method _nok_ok() to the correct _nok(). There ought to have been a
- test catching an error like that (Peter John Acklam).
- * Fix _nok() giving wrong output when second input argument is zero
- (Peter John Acklam).
- * Fix _nok() so it doesn't modify its second input arg (Peter John Acklam).
- * Update the included Devel::CheckLib to most recent version as suggested in
- RE #63055 (Peter John Acklam).
- * Apply "chmod 0644" to the few test scripts that don't already have that
- mode (Peter John Acklam).
+ * Rename files for testing signature, module loading, and POD so the names
+ are within the 8+3 character limit (Peter John Acklam).
+ * Rename method _nok_ok() to the correct _nok(). There ought to have been a
+ test catching an error like that (Peter John Acklam).
+ * Fix _nok() giving wrong output when second input argument is zero
+ (Peter John Acklam).
+ * Fix _nok() so it doesn't modify its second input arg (Peter John Acklam).
+ * Update the included Devel::CheckLib to most recent version as suggested in
+ RE #63055 (Peter John Acklam).
+ * Apply "chmod 0644" to the few test scripts that don't already have that
+ mode (Peter John Acklam).
2011-02-07 v1.34 pjacklam (6361 tests)
- * Rename _num() to _str(). The old _num() did exactly what _str() is supposed
- to do, according to the API documentation (Peter John Acklam).
- * Add a _num() function which (currently) simply numifies the output from
- _str() (Peter John Acklam).
- * Clean up whitespace (Peter John Acklam).
- * Fix POD errors (Peter John Acklam).
- * Add _nok() method. Now the old claim that Math::BigInt::GMP conforms to API
- version 2 is actually true (Peter John Acklam).
- * Edit the test files that were copied from the Math::BigInt distribution, so
- we now test Math::BigInt against Math::BigInt::GMP, not Math::BigInt::Calc.
- I had forgotten this when I copied the test files from the Math::BigInt
- distribution. This reduces the total test count, since some test are not
- executed with Math::BigInt::GMP (Peter John Acklam).
- * Replace morse code in 'README' with proper text (Peter John Acklam).
- * Include '01-load.t' for explicitly testing module loading (Peter John
- Acklam).
- * Use more generic code in 'pod.t' and 'pod_cov.t' (Peter John Acklam).
+ * Rename _num() to _str(). The old _num() did exactly what _str() is supposed
+ to do, according to the API documentation (Peter John Acklam).
+ * Add a _num() function which (currently) simply numifies the output from
+ _str() (Peter John Acklam).
+ * Clean up whitespace (Peter John Acklam).
+ * Fix POD errors (Peter John Acklam).
+ * Add _nok() method. Now the old claim that Math::BigInt::GMP conforms to API
+ version 2 is actually true (Peter John Acklam).
+ * Edit the test files that were copied from the Math::BigInt distribution, so
+ we now test Math::BigInt against Math::BigInt::GMP, not Math::BigInt::Calc.
+ I had forgotten this when I copied the test files from the Math::BigInt
+ distribution. This reduces the total test count, since some test are not
+ executed with Math::BigInt::GMP (Peter John Acklam).
+ * Replace morse code in 'README' with proper text (Peter John Acklam).
+ * Include '01-load.t' for explicitly testing module loading (Peter John
+ Acklam).
+ * Use more generic code in 'pod.t' and 'pod_cov.t' (Peter John Acklam).
2011-01-30 v1.33 pjacklam (6411 tests)
- * Fix _modinv() so that it works the same way as _modinv() in other
- Math::BigInt libraries: The output arguments are an object and the
- corresponding sign, not undef (Peter John Acklam).
- * Include most recent versions of the test files from the Math-BigInt
- distribution (bigfltpm.inc, bigfltpm.t, bigintpm.inc, bigintpm.t,
- biglog.t, and bigroot.t) (Peter John Acklam).
- * Include generic SIGNATURE test file (Peter John Acklam).
- * Required version of Math::BigInt is now 1.99_05 (Peter John Acklam).
+ * Fix _modinv() so that it works the same way as _modinv() in other
+ Math::BigInt libraries: The output arguments are an object and the
+ corresponding sign, not undef (Peter John Acklam).
+ * Include most recent versions of the test files from the Math-BigInt
+ distribution (bigfltpm.inc, bigfltpm.t, bigintpm.inc, bigintpm.t,
+ biglog.t, and bigroot.t) (Peter John Acklam).
+ * Include generic SIGNATURE test file (Peter John Acklam).
+ * Required version of Math::BigInt is now 1.99_05 (Peter John Acklam).
2010-09-23 v1.32 rafl 5559 tests
- * Re-upload 1.31 as a stable release without further changes.
+ * Re-upload 1.31 as a stable release without further changes.
2010-09-21 v1.31 rafl 5559 tests DEVELOPMENT RELEASE
- * Add hooks for Storable (de-)serialisation.
- * Avoid failure in the destructor if someone blessed nonsense into our class.
+ * Add hooks for Storable (de-)serialisation.
+ * Avoid failure in the destructor if someone blessed nonsense into our class.
2010-09-20 v1.30 rafl 5558 tests
- * Re-upload 1.29 as a stable release without further changes.
+ * Re-upload 1.29 as a stable release without further changes.
2010-09-19 v1.29 rafl 5558 tests DEVELOPMENT RELEASE
- * Attempt to fix a bug in the bundled version Devel::CheckLib.
- It used to ignore @Config{qw(ccflags ldflags)} and only tried to look for
- headers and libraries with the compiler's default include- and lib-paths as
- well as those explicitly asked for by the user.
+ * Attempt to fix a bug in the bundled version Devel::CheckLib.
+ It used to ignore @Config{qw(ccflags ldflags)} and only tried to look for
+ headers and libraries with the compiler's default include- and lib-paths as
+ well as those explicitly asked for by the user.
2010-09-17 v1.28 rafl 5558 tests
- * Re-upload 1.27 without further changes as a stable release.
+ * Re-upload 1.27 without further changes as a stable release.
2010-09-15 v1.27 rafl 5558 tests DEVELOPMENT RELEASE
- * Try to support perls older than 5.8.8 again.
- Tested with 5.8.7 and 5.6.2.
+ * Try to support perls older than 5.8.8 again.
+ Tested with 5.8.7 and 5.6.2.
2010-09-14 v1.26 rafl 5558 tests DEVELOPMENT RELEASE
- * Error out early if libgmp or gmp.h are missing.
- * Clone Math::BigInt::GMP instances on thread cloning.
- This should make the module threadsafe.
+ * Error out early if libgmp or gmp.h are missing.
+ * Clone Math::BigInt::GMP instances on thread cloning.
+ This should make the module threadsafe.
2010-09-10 v1.25 rafl 5536 tests
- * Fix tests with Math::BigInt >= 1.90 and depend on it.
+ * Fix tests with Math::BigInt >= 1.90 and depend on it.
2007-07-31 v1.24 Tels 5530 tests
- * apply patch for warnings about ptr size mismatch under Cygwin (thanx Reini Urban!)
- * make it work under 5.6.x again by defining SvUOK() (Thanx Marcus Holland-Moritz
- and Reini Urban!)
+ * apply patch for warnings about ptr size mismatch under Cygwin (thanx Reini Urban!)
+ * make it work under 5.6.x again by defining SvUOK() (Thanx Marcus Holland-Moritz
+ and Reini Urban!)
2007-07-25 v1.23 Tels 5527 tests
- * require Math::BigInt 1.87
- * fix for _new() (appeared under Cygwin, but possible others, thanx
- Linda W. (report) and Reini Urban (patch)!)
+ * require Math::BigInt 1.87
+ * fix for _new() (appeared under Cygwin, but possible others, thanx
+ Linda W. (report) and Reini Urban (patch)!)
2007-06-01 v1.22 Tels 5527 tests
- * require Math::BigInt 1.86
- * support api_version() 2 by adding _nok()
- * fix compilation issues on Mac/Darwin
- * _log_int() modifies it's argument instead of just returning a
- different object as result
- * speed up _log_int() greatly by taking a guess of the result
- and then improve it, instead of startig with 1 and going up. This means
- it takes now a more or less constant time, instead of a time proportional
- to the size/value of the result:
-
- Using Math::BigInt::GMP v1.21
- baselen 2: 3s (3.22 usr + 0.00 sys = 3.22 CPU) @ 7270/s (n=23411)
- baselen 2 big: 3s (3.11 usr + 0.06 sys = 3.17 CPU) @ 962/s (n=3051)
- baselen 3: 3s (3.20 usr + 0.00 sys = 3.20 CPU) @ 1304/s (n=4173)
- baselen 7: 3s (3.20 usr + 0.00 sys = 3.20 CPU) @ 3306/s (n=10582)
- baselen 8: 3s (3.14 usr + 0.00 sys = 3.14 CPU) @ 3769/s (n=11836)
- baselen 11: 3s (3.24 usr + 0.00 sys = 3.24 CPU) @ 4750/s (n=15392)
- baselen 14: 3s (3.20 usr + 0.00 sys = 3.20 CPU) @ 5835/s (n=18673)
- baselen 20: 3s (3.10 usr + 0.03 sys = 3.13 CPU) @ 7621/s (n=23855)
- baselen 3 big: 4s (3.17 usr + 0.00 sys = 3.17 CPU) @ 320/s (n=1016)
-
- Using Math::BigInt::GMP v1.22
- baselen 2: 3s (3.15 usr + 0.00 sys = 3.15 CPU) @ 16290/s (n=51316)
- baselen 2 big: 4s (3.21 usr + 0.01 sys = 3.22 CPU) @ 15933/s (n=51306)
- baselen 3: 4s (3.12 usr + 0.02 sys = 3.14 CPU) @ 15555/s (n=48844)
- baselen 7: 4s (3.15 usr + 0.07 sys = 3.22 CPU) @ 15658/s (n=50420)
- baselen 8: 3s (3.18 usr + 0.01 sys = 3.19 CPU) @ 15610/s (n=49797)
- baselen 11: 3s (3.14 usr + 0.00 sys = 3.14 CPU) @ 15555/s (n=48844)
- baselen 14: 3s (3.15 usr + 0.00 sys = 3.15 CPU) @ 15506/s (n=48844)
- baselen 20: 3s (3.14 usr + 0.01 sys = 3.15 CPU) @ 15506/s (n=48844)
- baselen 3 big: 3s (3.10 usr + 0.04 sys = 3.14 CPU) @ 15555/s (n=48844)
+ * require Math::BigInt 1.86
+ * support api_version() 2 by adding _nok()
+ * fix compilation issues on Mac/Darwin
+ * _log_int() modifies it's argument instead of just returning a
+ different object as result
+ * speed up _log_int() greatly by taking a guess of the result
+ and then improve it, instead of startig with 1 and going up. This means
+ it takes now a more or less constant time, instead of a time proportional
+ to the size/value of the result:
+
+Using Math::BigInt::GMP v1.21
+ baselen 2: 3s (3.22 usr + 0.00 sys = 3.22 CPU) @ 7270/s (n=23411)
+ baselen 2 big: 3s (3.11 usr + 0.06 sys = 3.17 CPU) @ 962/s (n=3051)
+ baselen 3: 3s (3.20 usr + 0.00 sys = 3.20 CPU) @ 1304/s (n=4173)
+ baselen 7: 3s (3.20 usr + 0.00 sys = 3.20 CPU) @ 3306/s (n=10582)
+ baselen 8: 3s (3.14 usr + 0.00 sys = 3.14 CPU) @ 3769/s (n=11836)
+ baselen 11: 3s (3.24 usr + 0.00 sys = 3.24 CPU) @ 4750/s (n=15392)
+ baselen 14: 3s (3.20 usr + 0.00 sys = 3.20 CPU) @ 5835/s (n=18673)
+ baselen 20: 3s (3.10 usr + 0.03 sys = 3.13 CPU) @ 7621/s (n=23855)
+ baselen 3 big: 4s (3.17 usr + 0.00 sys = 3.17 CPU) @ 320/s (n=1016)
+
+Using Math::BigInt::GMP v1.22
+ baselen 2: 3s (3.15 usr + 0.00 sys = 3.15 CPU) @ 16290/s (n=51316)
+ baselen 2 big: 4s (3.21 usr + 0.01 sys = 3.22 CPU) @ 15933/s (n=51306)
+ baselen 3: 4s (3.12 usr + 0.02 sys = 3.14 CPU) @ 15555/s (n=48844)
+ baselen 7: 4s (3.15 usr + 0.07 sys = 3.22 CPU) @ 15658/s (n=50420)
+ baselen 8: 3s (3.18 usr + 0.01 sys = 3.19 CPU) @ 15610/s (n=49797)
+ baselen 11: 3s (3.14 usr + 0.00 sys = 3.14 CPU) @ 15555/s (n=48844)
+ baselen 14: 3s (3.15 usr + 0.00 sys = 3.15 CPU) @ 15506/s (n=48844)
+ baselen 20: 3s (3.14 usr + 0.01 sys = 3.15 CPU) @ 15506/s (n=48844)
+ baselen 3 big: 3s (3.10 usr + 0.04 sys = 3.14 CPU) @ 15555/s (n=48844)
2007-04-17 v1.21 Tels 5488 tests
- * add _as_oct(), _from_oct(), _alen(), _1ex() and some _root() tests
- * require Math::BigInt 1.83
- * support api_version() by adding _1ex() and _alen()
- * _new(): take a shortcut if the passed an IV (integer value)
+ * add _as_oct(), _from_oct(), _alen(), _1ex() and some _root() tests
+ * require Math::BigInt 1.83
+ * support api_version() by adding _1ex() and _alen()
+ * _new(): take a shortcut if the passed an IV (integer value)
2007-04-09 v1.20 Tels 5351 tests
- * remove PREREQ_FATAL because the toolchain is broken and cannot handle it
- * take over tests from MBI 1.82 and require it
- * require Perl 5.6.2 as minimum
- * speed up _zeros():
- + use Newx() instead of a full-blown SV for temp storage
- + no need to allocate temp storage for numbers < 10
- * put _len() into XS code, making $x->length() faster (about 30% for "123",
- less for longer numbers as the binary=>decimal conversion dominates)
- * add POD tests
- * add MANIFEST.SKIP
+ * remove PREREQ_FATAL because the toolchain is broken and cannot handle it
+ * take over tests from MBI 1.82 and require it
+ * require Perl 5.6.2 as minimum
+ * speed up _zeros():
+ + use Newx() instead of a full-blown SV for temp storage
+ + no need to allocate temp storage for numbers < 10
+ * put _len() into XS code, making $x->length() faster (about 30% for "123",
+ less for longer numbers as the binary=>decimal conversion dominates)
+ * add POD tests
+ * add MANIFEST.SKIP
2007-01-27 v1.19 Tels 5339 tests
- * add support for octal
- * take over tests from MBI 1.78 and require it
+ * add support for octal
+ * take over tests from MBI 1.78 and require it
Older Changelog:
2001-07-22 v1.00 Tels
* First version (basically working with some quirks)
+
2001-08-06 v1.01 Tels
- * first release
- * fixed all the bugs in v1.00
- * taken over tests from BigInt v1.40
+* first release
+* fixed all the bugs in v1.00
+* taken over tests from BigInt v1.40
+
2001-09-02 v1.02 Tels
- * removed auto-export and added empty import()
- * taken over tests from BigInt v1.42
+* removed auto-export and added empty import()
+* taken over tests from BigInt v1.42
+
2001-11-01 v1.03 Tels
- * taken over tests from BigInt v1.45
- * added _mod() for more speed for $x % $y
-
- #!/usr/bin/perl -w
- use lib 'lib';
- #use lib '../Math-BigInt-GMP-1.02/lib';
- use Math::BigInt lib => 'GMP';
- use Benchmark;
- my $digits = 1024;
- my $x = Math::BigInt->new('1' . '0' x $digits);
- my $y = Math::BigInt->new('3' . '0' x ($digits - 2) . '3');
- my $u = Math::BigInt->new('3');
- timethese ( 2000,
- {
- mod_l => sub { $z = $x % $y, },
- mod_s => sub { $z = $x % $u, },
- div_l => sub { ($z,$r) = $x->copy()->bdiv($y), },
- } );
-
- On a 1 Ghz Athlon with v1.45 of BigInt in ops/s:
- v1.02 v1.03
- mod_s 1100 2350
- mod_l 1111 2325
- div_l 1260 1300
+* taken over tests from BigInt v1.45
+* added _mod() for more speed for $x % $y
+
+ #!/usr/bin/perl -w
+ use lib 'lib';
+ #use lib '../Math-BigInt-GMP-1.02/lib';
+ use Math::BigInt lib => 'GMP';
+ use Benchmark;
+ my $digits = 1024;
+ my $x = Math::BigInt->new('1' . '0' x $digits);
+ my $y = Math::BigInt->new('3' . '0' x ($digits - 2) . '3');
+ my $u = Math::BigInt->new('3');
+ timethese ( 2000,
+ {
+ mod_l => sub { $z = $x % $y, },
+ mod_s => sub { $z = $x % $u, },
+ div_l => sub { ($z,$r) = $x->copy()->bdiv($y), },
+ } );
+
+ On a 1 Ghz Athlon with v1.45 of BigInt in ops/s:
+ v1.02 v1.03
+ mod_s 1100 2350
+ mod_l 1111 2325
+ div_l 1260 1300
2001-11-01 v1.04a Tels (never released)
- * _is_odd()/_is_even() use $two instead of 2: 5600 op/s instead of 4700
+ * _is_odd()/_is_even() use $two instead of 2: 5600 op/s instead of 4700
+
2002-01-26 v1.04 Tels
- * use $zero,$one,$two etc instead of 0,1,2 in some routines
- * tests from Math::BigInt v1.50
- * bypass Math::GMP's overload interface and use Math::GMP::gmp_foo() directly
- * added _gcd() and _fac() for more speed in bgcd() and bfac(), respectively
+ * use $zero,$one,$two etc instead of 0,1,2 in some routines
+ * tests from Math::BigInt v1.50
+ * bypass Math::GMP's overload interface and use Math::GMP::gmp_foo() directly
+ * added _gcd() and _fac() for more speed in bgcd() and bfac(), respectively
+
2002-02-16 v1.05 Tels
- * tests from Math::BigInt v1.51
- * replaced _core_lib() by config()->{lib}
- * added _and, _or, _xor (using Math::GMP internal methods)
- * switched _fac over to use Math::GMP gmp_fac()
- * added _sqrt() using gmp_sqrt()
- * used div_two and bdiv_two for _div()
- * tests for _div() in list context and _mod
- * added _from_hex()
-
- The speedups in band(), bxor(), bior() and bfac() are at least factor 10 for
- small numbers and quickly raise as the numbers grow ;)
- The speedup for bmod() and bdiv() aren't that dramatic, but still worth it.
+ * tests from Math::BigInt v1.51
+ * replaced _core_lib() by config()->{lib}
+ * added _and, _or, _xor (using Math::GMP internal methods)
+ * switched _fac over to use Math::GMP gmp_fac()
+ * added _sqrt() using gmp_sqrt()
+ * used div_two and bdiv_two for _div()
+ * tests for _div() in list context and _mod
+ * added _from_hex()
+
+ The speedups in band(), bxor(), bior() and bfac() are at least factor 10 for
+ small numbers and quickly raise as the numbers grow ;)
+ The speedup for bmod() and bdiv() aren't that dramatic, but still worth it.
+
2002-03-23 v1.06 Tels
- * testsuite from v1.55 - 3874 tests
- * fixed PREREQUISITES to Math::GMP v2.03, BigInt v1.55
- * fixed typos in CHANGES
- * added _from_bin()
+ * testsuite from v1.55 - 3874 tests
+ * fixed PREREQUISITES to Math::GMP v2.03, BigInt v1.55
+ * fixed typos in CHANGES
+ * added _from_bin()
+
2002-07-07 v1.07 Tels
- * testsuite from BigInt v1.60 - 4054 tests
- * fixed PREREQUISITES to BigInt v1.60
+ * testsuite from BigInt v1.60 - 4054 tests
+ * fixed PREREQUISITES to BigInt v1.60
+
2002-12-12 v1.08 Tels 4069 tests (never released)
- * added implementation of bmodpow() using GMPs mpow_gmp()
- * release signed by key http://bloodgate.com/tels.asc id 93B84C15
+ * added implementation of bmodpow() using GMPs mpow_gmp()
+ * release signed by key http://bloodgate.com/tels.asc id 93B84C15
+
2002-12-15 v1.10a Tels Never released
- * no longer needs Math::GMP (and Carp), but uses own XS layer
- * is thus faster (saves one perl subroutine layer) and less memory hungry
- (it now uses even less memory than using Calc!)
- new XS lets us cut out a subroutine layer
- * new XS will enable us to implement *all* missing functions like _root(),
- _as_hex(), _as_bin() and _rsft(), _lsft()
- * fixed PREREQ to BigInt v1.65
- * extended tests in bigintg.t to cover more functions
+ * no longer needs Math::GMP (and Carp), but uses own XS layer
+ * is thus faster (saves one perl subroutine layer) and less memory hungry
+ (it now uses even less memory than using Calc!)
+ new XS lets us cut out a subroutine layer
+ * new XS will enable us to implement *all* missing functions like _root(),
+ _as_hex(), _as_bin() and _rsft(), _lsft()
+ * fixed PREREQ to BigInt v1.65
+ * extended tests in bigintg.t to cover more functions
+
2002-12-24 v1.10 Tels 4109 tests
- * Merry Christmas and a Happy New Year to all!
- * cut out more dead wood from GMP.xs, GMP.so file shrunk a bit
- * added some comments in GMP.xs
- * fixed PREREQ to BigInt v1.64 since v1.65 is not yet out *sigh*
- * more functions like _is_odd()/_is_even()/_acmp() directly in XS - cut away
- perl layer subroutines for more speed (about 10-30% more ops/s for small
- argument or constant cases or other cases where the overhead is greater
- than the actual math operation itself)
- * __stringify() no longer malloc()s a temp. storage => faster
- * added _root(), _lsft() and_rsft() functions for great speedups
- * Running the benchmark script above (adopted a bit) on the same 1 Ghz AMD
- under BigInt v1.64:
- Benchmark: running div_l, mod_l, mod_s for at least 3 CPU seconds...
- div_l: 3s ( 3.20 usr + 0.00 sys = 3.20 CPU) @ 4655.00/s (n=14896)
- mod_l: 4s ( 3.31 usr + 0.00 sys = 3.31 CPU) @ 6851.96/s (n=22680)
- mod_s: 3s ( 3.01 usr + 0.00 sys = 3.01 CPU) @ 7088.37/s (n=21336)
- * Full (memory and other) benchmarks at http://bloodgate.com/perl/bigint/
+ * Merry Christmas and a Happy New Year to all!
+ * cut out more dead wood from GMP.xs, GMP.so file shrunk a bit
+ * added some comments in GMP.xs
+ * fixed PREREQ to BigInt v1.64 since v1.65 is not yet out *sigh*
+ * more functions like _is_odd()/_is_even()/_acmp() directly in XS - cut away
+ perl layer subroutines for more speed (about 10-30% more ops/s for small
+ argument or constant cases or other cases where the overhead is greater
+ than the actual math operation itself)
+ * __stringify() no longer malloc()s a temp. storage => faster
+ * added _root(), _lsft() and_rsft() functions for great speedups
+ * Running the benchmark script above (adopted a bit) on the same 1 Ghz AMD
+ under BigInt v1.64:
+ Benchmark: running div_l, mod_l, mod_s for at least 3 CPU seconds...
+ div_l: 3s ( 3.20 usr + 0.00 sys = 3.20 CPU) @ 4655.00/s (n=14896)
+ mod_l: 4s ( 3.31 usr + 0.00 sys = 3.31 CPU) @ 6851.96/s (n=22680)
+ mod_s: 3s ( 3.01 usr + 0.00 sys = 3.01 CPU) @ 7088.37/s (n=21336)
+ * Full (memory and other) benchmarks at http://bloodgate.com/perl/bigint/
+
2003-01-01 v1.11 Tels 4109 tests
- * rewrote stringify_bin() and stringify_hex() to not allocate scratch buffers
- Faster, no longer needs malloc()/free() and strlen().
- Thanx to Sysiphus for pointing this out.
- * removed _as_hex() and _as_bin() from GMP.pm and moved the logic to GMP.xs
- * documented in todo to replace all malloc()/free() with New and Safefree()
- * removed unused cmp_two() function in GMP.xs
- * removed the unused "$zero = ..."/"$one = ..." in GMP.pm
+ * rewrote stringify_bin() and stringify_hex() to not allocate scratch buffers
+ Faster, no longer needs malloc()/free() and strlen().
+ Thanx to Sysiphus for pointing this out.
+ * removed _as_hex() and _as_bin() from GMP.pm and moved the logic to GMP.xs
+ * documented in todo to replace all malloc()/free() with New and Safefree()
+ * removed unused cmp_two() function in GMP.xs
+ * removed the unused "$zero = ..."/"$one = ..." in GMP.pm
+
2003-01-08 v1.12a Tels 4109 tests (not released)
- * removed unused function _mmod from XS code
- * removed unnecc. if len == 0 check in _as_bin(), _as_hex() etc
- * replace some RETVAL = malloc() lines with defined to make changing them
- later much easier
+ * removed unused function _mmod from XS code
+ * removed unnecc. if len == 0 check in _as_bin(), _as_hex() etc
+ * replace some RETVAL = malloc() lines with defined to make changing them
+ later much easier
+
2003-07-04 v1.12b Tels 4491 tests (not released)
- * testsuite from v1.65
- * fixed prereq to require BigInt v1.65
+ * testsuite from v1.65
+ * fixed prereq to require BigInt v1.65
+
2003-12-11 v1.12 Tels 4677 tests
- * testsuite from v1.67, especialy revamped bigintg.t
- * fixed prereq to require BigInt v1.67
- * added _log_int() to XS code
- * some routines did only return the result, but not modify $x in place
+ * testsuite from v1.67, especialy revamped bigintg.t
+ * fixed prereq to require BigInt v1.67
+ * added _log_int() to XS code
+ * some routines did only return the result, but not modify $x in place
+
2004-01-10 v1.13 Tels 4759 tests
- * tests from BigInt v1.68
- * removed DESTROY from GMP.pm and made GMP.xs destroy => DESTROY
- * removed _num from GMP.pm and made GMP.xs __stringify => _num
- * removed _modinv() from GMP.pm and fixed up _modinv in GMP.xs
- * disabled the borken _log_int() from the XS code
- * modify $x in place for _dec, _inc, _add, _mod, _mul, _fac, _and, _or,
- _xor, _sqrt, _root and _sub (sub in non-reversed form), this removes some
- malloc/free and makes these ops slightly faster
- (between 10 and 33% in Math::BigInt (!), depending on input and size)
+ * tests from BigInt v1.68
+ * removed DESTROY from GMP.pm and made GMP.xs destroy => DESTROY
+ * removed _num from GMP.pm and made GMP.xs __stringify => _num
+ * removed _modinv() from GMP.pm and fixed up _modinv in GMP.xs
+ * disabled the borken _log_int() from the XS code
+ * modify $x in place for _dec, _inc, _add, _mod, _mul, _fac, _and, _or,
+ _xor, _sqrt, _root and _sub (sub in non-reversed form), this removes some
+ malloc/free and makes these ops slightly faster
+ (between 10 and 33% in Math::BigInt (!), depending on input and size)
+
2004-02-15 v1.14 Tels 4867 tests
- * require BigInt v1.70, use tests from it and make API compatible with it
- * _rsft() and _lsft() modify their argument instead of making a copy,
- meaning brsft() and blsft() got about 20% faster in BigInt
- * added a working _zeros() method
- * added a working _log_int() method
+ * require BigInt v1.70, use tests from it and make API compatible with it
+ * _rsft() and _lsft() modify their argument instead of making a copy,
+ meaning brsft() and blsft() got about 20% faster in BigInt
+ * added a working _zeros() method
+ * added a working _log_int() method
+
2004-11-22 v1.15 Tels 5112 tests
- * some small cleanups in the Perl code
- * changed "class" to "Class" to avoid the reserved keyword for MS compiler
- * do not pull unused parameter "Class" from stack - avoid compiler warnings
- * put _sub() into XS for more speed and smaller memory footprint
- * testsuite from MBI v1.73
+ * some small cleanups in the Perl code
+ * changed "class" to "Class" to avoid the reserved keyword for MS compiler
+ * do not pull unused parameter "Class" from stack - avoid compiler warnings
+ * put _sub() into XS for more speed and smaller memory footprint
+ * testsuite from MBI v1.73
+
2004-12-09 v1.16 Tels 5112 tests
- * fixed a leak in _div() (Thanx Tassilo v. Parsival!)
- * put _div() into XS, making division slightly faster for small numbers
- * put leak.pl and leaktest into MANIFEST for later checking
+ * fixed a leak in _div() (Thanx Tassilo v. Parsival!)
+ * put _div() into XS, making division slightly faster for small numbers
+ * put leak.pl and leaktest into MANIFEST for later checking
+
2005-01-01 v1.17 Tels 5182 tests
- * use XSLoader instead of DynaLoader to save a tiny amount of memory
- * take over tests from Math::BigInt v1.74
- * require Math::BigInt v1.74
- * simplify sub code in XS (left-over artifact from v1.16)
- * fix a leak in _zeros()
- * _zeros() is now much faster for odd numbers (O(1) vs. O(N*N))
+ * use XSLoader instead of DynaLoader to save a tiny amount of memory
+ * take over tests from Math::BigInt v1.74
+ * require Math::BigInt v1.74
+ * simplify sub code in XS (left-over artifact from v1.16)
+ * fix a leak in _zeros()
+ * _zeros() is now much faster for odd numbers (O(1) vs. O(N*N))
+
2005-04-11 v1.18 Tels 5186 tests
- * _log_int() handles now plain scalars as $base parameter
- * take over tests from MBI 1.76, require it
+ * _log_int() handles now plain scalars as $base parameter
+ * take over tests from MBI 1.76, require it
Please send me test-reports, your experiences with this and your ideas - I love
to hear about my work!
@@ -4,7 +4,7 @@
"Tels"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150",
+ "generated_by" : "ExtUtils::MakeMaker version 6.94, CPAN::Meta::Converter version 2.140640",
"license" : [
"perl_5"
],
@@ -22,21 +22,21 @@
"prereqs" : {
"build" : {
"requires" : {
- "ExtUtils::MakeMaker" : 0
+ "ExtUtils::MakeMaker" : "0"
}
},
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : 0
+ "ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
- "Math::BigInt" : "1.997",
+ "Math::BigInt" : "1.9993",
"XSLoader" : "0.02"
}
}
},
"release_status" : "stable",
- "version" : "1.37"
+ "version" : "1.38"
}
@@ -3,21 +3,21 @@ abstract: 'Use the GMP library for Math::BigInt routines'
author:
- Tels
build_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
configure_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150'
+generated_by: 'ExtUtils::MakeMaker version 6.94, CPAN::Meta::Converter version 2.140640'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Math-BigInt-GMP
no_index:
directory:
- t
- inc
requires:
- Math::BigInt: 1.997
- XSLoader: 0.02
-version: 1.37
+ Math::BigInt: '1.9993'
+ XSLoader: '0.02'
+version: '1.38'
@@ -25,9 +25,9 @@ WriteMakefile
'INSTALLDIRS' => 'site',
'ABSTRACT_FROM' => 'lib/Math/BigInt/GMP.pm',
'PREREQ_PM' => {
- Math::BigInt => 1.997,
+ Math::BigInt => 1.9993,
XSLoader => 0.02,
},
'LIBS' => ['-lgmp'],
- 'SIGN' => 1,
+ 'SIGN' => 1,
);
@@ -1,5 +1,5 @@
This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.68.
+signed via the Module::Signature module, version 0.73.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
@@ -15,41 +15,45 @@ not run its Makefile.PL or Build.PL.
Hash: SHA1
SHA1 70d6187d0152848c922dc4360fa6dd3a3dc35c62 BUGS
-SHA1 1c38b0790580a2e2239404dd7d5de0b8ce415f11 CHANGES
+SHA1 a3590f9b33b207ebfe55ea375ac754438f5a128b CHANGES
SHA1 dda5ca4f413031e9efcaa1600461d5e2adaa3a40 CREDITS
SHA1 d7497d6d105042817c1734585be04ad2ebec4db2 GMP.xs
SHA1 d6b7be7fb558f2df93e6bc55148bba35cae22ce4 INSTALL
SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE
SHA1 f1f5d7799d2a10004d9fde9e929edaca038b8c6b MANIFEST
SHA1 411ab4f05c252f85f12f12e087bae0adc5ba0aad MANIFEST.SKIP
-SHA1 95a51ac44107896279b27d07eb571553f3c5a457 META.json
-SHA1 f8705c7b74812ddd94b4056fc5bad153d8d8273f META.yml
-SHA1 c1e61286ff1f620f3da7fc7d06fdc4f6ce105546 Makefile.PL
+SHA1 487a110705adf77f7c5b84075fe73308bdcc433c META.json
+SHA1 0e776863fc72946e4be67987a3b7b941165a5a8c META.yml
+SHA1 ab794c91e16a3cf176bf8c2f3f89b083a4035ae2 Makefile.PL
SHA1 ddef2225fa80a87f3138f23cb7fdbc8468c1f58f README
SHA1 6c7207c83d636868d3d1f1fc42f3f9e5897cbe85 TODO
SHA1 fd48d0d8750eb949e485d8136b5b424fe73e9775 build/README
SHA1 7bcc4113830721ad6e37a1ea79df94a6987c836d build/leak.pl
SHA1 ac25bda8a6eb9058a9e42a8943c3e11b9fed88dc build/leaktest
-SHA1 5bad87980fc59ecb29c9afe0719c48ad32758d63 inc/Devel/CheckLib.pm
-SHA1 06320330b1c5212c4b733c24f12d5594ab35dbe1 lib/Math/BigInt/GMP.pm
+SHA1 58711d6c7095097a2b79697eb29cc361aa12da72 inc/Devel/CheckLib.pm
+SHA1 57afa5ea67d4bb8bf6932ad78a64b83216552cb5 lib/Math/BigInt/GMP.pm
SHA1 6e9557e746e881ab1568cdcec17ff3c4f1508502 t/00sig.t
-SHA1 ab94a8c86b2b8fda2e02f9e3de43dff6186e65d3 t/01load.t
+SHA1 2b034eaa838015c62ed42cfc23cbc3814ce0a04f t/01load.t
SHA1 02ef05af53cb7378452590324bb21dfe61f44069 t/02pod.t
-SHA1 ada3fcae2f9313cc97e0b999b13b30dac9a3deda t/03podcov.t
-SHA1 d05514d6cae3afa4feb983d5467eaf9422aa546c t/bigfltpm.inc
-SHA1 a8f364fea5e2993f5ae7bd3f8463024175d33e24 t/bigfltpm.t
+SHA1 c2891d57a7da799a196ae8b276da940cb3eccead t/03podcov.t
+SHA1 e6bb2aea2f026016848db9ca96507c4ca4e3d265 t/bigfltpm.inc
+SHA1 9537400817c028f2282e3c085796ecbded0ccb66 t/bigfltpm.t
SHA1 26c3ca060f6b7474ad8b2db3c1bae2b98e13adfd t/bigintg.t
-SHA1 845e7daa3c6b2463a6fdc9218044975801547bb8 t/bigintpm.inc
-SHA1 5c7e31a73f1827d08118f96cf31d5d4e792ab8c0 t/bigintpm.t
+SHA1 d5d419d73cc52371ba3487895fd49f793ffe4d0c t/bigintpm.inc
+SHA1 73ac3701a1116b1831c871153c836f618a60f4d7 t/bigintpm.t
SHA1 5bdf82ef7085b97caa496bfc71ab1fbfe48ef9e8 t/biglog.t
SHA1 da260b6e02b220868fc7b4c0f87569299402fbf7 t/bigroot.t
SHA1 f1bcab94173a57861fcc40ac90eb72f64aafea7f t/storable.t
SHA1 e489ec79ce64d0d943e291a3eaa654298e6e49ab t/threads.t
SHA1 20cf43acc1a728d0ee8245b106937a2a97900266 typemap
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.9 (Cygwin)
+Version: GnuPG v1
-iEYEARECAAYFAk5jykUACgkQVQvyyU1bchpbUQCglrXtBTDqJHOcg4jNhANCddpi
-SRMAoNAV0CKT1a3JdH7AdSkh4vixU8Jw
-=HATQ
+iQEcBAEBAgAGBQJTPpqeAAoJEGcmPl2fr166OTAIAL9qXmVxJmPQeR5C4zUxAakN
+SNsMlXOJv5jIPLiG9SSMmIYbBWqRn/3iFUY6twrcffdEM1BCsJXPSj2kSOO7Pl+M
+DCOwjtLYIXtltH8Fcutu5j12Z6uL91OoqtGNYk2DFsQhszbyNeRvRBvEclhGQZKH
+d/Ji9c3E1MIrzKHDlASq7h+EsJEdL2a3qPQBTX17f4RkzAXqDGHUt1c0mal05DOm
+xnY+6qBVjotsd3xODBNHeKhLYicWiv6jCFkoEa0HeNveJDMfT3BRMyx2ZUG0+1lV
+1WpF765y7NVZ4Kv0tC20+rlCN0CmN+ICgePD02/x5Y6fqytsMpZGqg2sLEJdnek=
+=nraw
-----END PGP SIGNATURE-----
diff --git a/var/tmp/source/PJACKLAM/Math-BigInt-GMP-1.37/Math-BigInt-GMP-1.37/build/leaktest b/var/tmp/source/PJACKLAM/Math-BigInt-GMP-1.38/Math-BigInt-GMP-1.38/build/leaktest
old mode 100755
new mode 100644
@@ -5,7 +5,7 @@ package Devel::CheckLib;
use 5.00405; #postfix foreach
use strict;
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = '0.93';
+$VERSION = '1.01';
use Config qw(%Config);
use Text::ParseWords 'quotewords';
@@ -114,6 +114,11 @@ libraries (each preceded by '-l') and directories (preceded by '-L').
This can also be supplied on the command-line.
+=item debug
+
+If true - emit information during processing that can be used for
+debugging.
+
=back
And libraries are no use without header files, so ...
@@ -202,7 +207,7 @@ sub assert_lib {
# using special form of split to trim whitespace
if(defined($args{LIBS})) {
foreach my $arg (split(' ', $args{LIBS})) {
- die("LIBS argument badly-formed: $arg\n") unless($arg =~ /^-l/i);
+ die("LIBS argument badly-formed: $arg\n") unless($arg =~ /^-[lLR]/);
push @{$arg =~ /^-l/ ? \@libs : \@libpaths}, substr($arg, 2);
}
}
@@ -213,7 +218,7 @@ sub assert_lib {
}
}
- my @cc = _findcc();
+ my ($cc, $ld) = _findcc();
my @missing;
my @wrongresult;
my @use_headers;
@@ -224,6 +229,8 @@ sub assert_lib {
my($ch, $cfile) = File::Temp::tempfile(
'assertlibXXXXXXXX', SUFFIX => '.c'
);
+ my $ofile = $cfile;
+ $ofile =~ s/\.c$/$Config{_o}/;
print $ch qq{#include <$_>\n} for @use_headers;
print $ch qq{int main(void) { return 0; }\n};
close($ch);
@@ -233,21 +240,25 @@ sub assert_lib {
if ( $Config{cc} eq 'cl' ) { # Microsoft compiler
require Win32;
@sys_cmd = (
- @cc,
+ @$cc,
$cfile,
"/Fe$exefile",
- (map { '/I'.Win32::GetShortPathName($_) } @incpaths)
+ (map { '/I'.Win32::GetShortPathName($_) } @incpaths),
+ "/link",
+ @$ld
);
} elsif($Config{cc} =~ /bcc32(\.exe)?/) { # Borland
@sys_cmd = (
- @cc,
+ @$cc,
+ @$ld,
(map { "-I$_" } @incpaths),
"-o$exefile",
$cfile
);
} else { # Unix-ish: gcc, Sun, AIX (gcc, cc), ...
@sys_cmd = (
- @cc,
+ @$cc,
+ @$ld,
$cfile,
(map { "-I$_" } @incpaths),
"-o", "$exefile"
@@ -257,6 +268,7 @@ sub assert_lib {
my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd);
push @missing, $header if $rv != 0 || ! -x $exefile;
_cleanup_exe($exefile);
+ unlink $ofile if -e $ofile;
unlink $cfile;
}
@@ -264,6 +276,8 @@ sub assert_lib {
my($ch, $cfile) = File::Temp::tempfile(
'assertlibXXXXXXXX', SUFFIX => '.c'
);
+ my $ofile = $cfile;
+ $ofile =~ s/\.c$/$Config{_o}/;
print $ch qq{#include <$_>\n} foreach (@headers);
print $ch "int main(void) { ".($args{function} || 'return 0;')." }\n";
close($ch);
@@ -277,32 +291,35 @@ sub assert_lib {
} @libpaths;
# this is horribly sensitive to the order of arguments
@sys_cmd = (
- @cc,
+ @$cc,
$cfile,
"${lib}.lib",
"/Fe$exefile",
(map { '/I'.Win32::GetShortPathName($_) } @incpaths),
"/link",
+ @$ld,
(map {'/libpath:'.Win32::GetShortPathName($_)} @libpaths),
);
} elsif($Config{cc} eq 'CC/DECC') { # VMS
} elsif($Config{cc} =~ /bcc32(\.exe)?/) { # Borland
@sys_cmd = (
- @cc,
+ @$cc,
+ @$ld,
"-o$exefile",
- "-l$lib",
(map { "-I$_" } @incpaths),
(map { "-L$_" } @libpaths),
+ "-l$lib",
$cfile);
} else { # Unix-ish
# gcc, Sun, AIX (gcc, cc)
@sys_cmd = (
- @cc,
+ @$cc,
+ @$ld,
$cfile,
"-o", "$exefile",
- "-l$lib",
(map { "-I$_" } @incpaths),
- (map { "-L$_" } @libpaths)
+ (map { "-L$_" } @libpaths),
+ "-l$lib",
);
}
warn "# @sys_cmd\n" if $args{debug};
@@ -311,12 +328,13 @@ sub assert_lib {
my $absexefile = File::Spec->rel2abs($exefile);
$absexefile = '"'.$absexefile.'"' if $absexefile =~ m/\s/;
push @wrongresult, $lib if $rv == 0 && -x $exefile && system($absexefile) != 0;
+ unlink $ofile if -e $ofile;
_cleanup_exe($exefile);
}
unlink $cfile;
my $miss_string = join( q{, }, map { qq{'$_'} } @missing );
- die("Can't link/include $miss_string\n") if @missing;
+ die("Can't link/include C library $miss_string, aborting.\n") if @missing;
my $wrong_string = join( q{, }, map { qq{'$_'} } @wrongresult);
die("wrong result: $wrong_string\n") if @wrongresult;
}
@@ -328,19 +346,37 @@ sub _cleanup_exe {
unlink $exefile if -f $exefile;
unlink $ofile if -f $ofile;
unlink "$exefile\.manifest" if -f "$exefile\.manifest";
+ if ( $Config{cc} eq 'cl' ) {
+ # MSVC also creates foo.ilk and foo.pdb
+ my $ilkfile = $exefile;
+ $ilkfile =~ s/$Config{_exe}$/.ilk/;
+ my $pdbfile = $exefile;
+ $pdbfile =~ s/$Config{_exe}$/.pdb/;
+ unlink $ilkfile if -f $ilkfile;
+ unlink $pdbfile if -f $pdbfile;
+ }
return
}
+# return ($cc, $ld)
+# where $cc is an array ref of compiler name, compiler flags
+# where $ld is an array ref of linker flags
sub _findcc {
# Need to use $keep=1 to work with MSWin32 backslashes and quotes
- my @Config_ccflags_ldflags = @Config{qw(ccflags ldflags)}; # use copy so ASPerl will compile
- my @flags = grep { length } map { quotewords('\s+', 1, $_ || ()) } @Config_ccflags_ldflags;
+ my $Config_ccflags = $Config{ccflags}; # use copy so ASPerl will compile
+ my @Config_ldflags = ();
+ for my $config_val ( @Config{qw(ldflags perllibs)} ){
+ push @Config_ldflags, $config_val if ( $config_val =~ /\S/ );
+ }
+ my @ccflags = grep { length } quotewords('\s+', 1, $Config_ccflags||'');
+ my @ldflags = grep { length } quotewords('\s+', 1, @Config_ldflags);
my @paths = split(/$Config{path_sep}/, $ENV{PATH});
my @cc = split(/\s+/, $Config{cc});
- return (@cc, @flags) if -x $cc[0];
+ return ( [ @cc, @ccflags ], \@ldflags ) if -x $cc[0];
foreach my $path (@paths) {
my $compiler = File::Spec->catfile($path, $cc[0]) . $Config{_exe};
- return ($compiler, @cc[1 .. $#cc], @flags) if -x $compiler;
+ return ([ $compiler, @cc[1 .. $#cc], @ccflags ], \@ldflags)
+ if -x $compiler;
}
die("Couldn't find your C compiler\n");
}
@@ -9,7 +9,7 @@ use 5.006002;
use vars qw/$VERSION/;
-$VERSION = '1.37';
+$VERSION = '1.38';
use XSLoader;
XSLoader::load "Math::BigInt::GMP", $VERSION;
@@ -219,6 +219,65 @@ to access the GMP c-library. This cut's out another (perl sub routine) layer
and also reduces the memory footprint by not loading Math::GMP and Carp at
all.
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-math-bigint-gmp at rt.cpan.org>, or through the web interface at
+L<https://rt.cpan.org/Ticket/Create.html?Queue=Math-BigInt-GMP>
+(requires login).
+We will be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc Math::BigInt::GMP
+
+You can also look for information at:
+
+=over 4
+
+=item * RT: CPAN's request tracker
+
+L<https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt-GMP>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Math-BigInt-GMP>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/dist/Math-BigInt-GMP>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Math-BigInt-GMP/>
+
+=item * CPAN Testers Matrix
+
+L<http://matrix.cpantesters.org/?dist=Math-BigInt-GMP>
+
+=item * The Bignum mailing list
+
+=over 4
+
+=item * Post to mailing list
+
+C<bignum at lists.scsys.co.uk>
+
+=item * View mailing list
+
+L<http://lists.scsys.co.uk/pipermail/bignum/>
+
+=item * Subscribe/Unsubscribe
+
+L<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/bignum>
+
+=back
+
+=back
+
=head1 LICENSE
This program is free software; you may redistribute it and/or modify it under
@@ -232,7 +291,9 @@ Thanx to Chip Turner for providing Math::GMP, which was inspiring my work.
=head1 SEE ALSO
-L<Math::BigInt>, L<Math::BigInt::Calc>, L<Math::BigInt::FastCalc>,
-L<Math::BigInt::Pari>.
+L<Math::BigInt>, L<Math::BigFloat>, and the other backends
+L<Math::BigInt::Calc>, L<Math::BigInt::GMP>, and L<Math::BigInt::Pari>.
+
+The other GMP modules L<Math::GMP>, L<Math::GMPf>, L<Math::GMPq>, L<Math::GMPz>
=cut
@@ -9,5 +9,6 @@ BEGIN {
use_ok('Math::BigInt'); # Math::BigInt is required for the tests
};
-diag("Testing Math::BigInt::GMP $Math::BigInt::GMP::VERSION, Perl $], $^X");
-diag(" with Math::BigInt $Math::BigInt::VERSION");
+diag("Testing Math::BigInt::GMP $Math::BigInt::GMP::VERSION");
+diag("==> Perl $], $^X");
+diag("==> Math::BigInt $Math::BigInt::VERSION");
@@ -24,4 +24,4 @@ my $trustme = {
coverage_class => 'Pod::Coverage::CountParents',
};
-all_pod_coverage_ok($trustme, "All our Math::BigInt::GMP are covered");
+all_pod_coverage_ok($trustme, "Math::BigInt::GMP is covered");
@@ -58,7 +58,7 @@ while (<DATA>)
} elsif ($f =~ /^(numify|length|as_number|as_hex|as_bin)$/) {
$try .= "\$x->$f();";
# some unary ops (test the fxxx form, since that is done by AUTOLOAD)
- } elsif ($f =~ /^f(nan|sstr|neg|floor|ceil|abs)$/) {
+ } elsif ($f =~ /^f(nan|sstr|neg|floor|ceil|int|abs)$/) {
$try .= "\$x->f$1();";
# some is_xxx test function
} elsif ($f =~ /^is_(zero|one|negative|positive|odd|even|nan|int)$/) {
@@ -1825,3 +1825,12 @@ abc:NaN
-51:-51
-51.2:-51
12.2:13
+&fint
+0:0
+NaN:NaN
++inf:inf
+-inf:-inf
+1:1
+-51:-51
+-51.2:-51
+12.2:12
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 2322
+use Test::More tests => 2338
+ 5; # own tests
@@ -73,7 +73,7 @@ while (<DATA>)
} elsif ($f eq "bone") {
$try .= "\$x->bone('$args[1]');";
# some unary ops
- } elsif ($f =~ /^b(nan|floor|ceil|sstr|neg|abs|sgn|inc|dec|not|sqrt|fac)$/) {
+ } elsif ($f =~ /^b(nan|floor|ceil|int|sstr|neg|abs|sgn|inc|dec|not|sqrt|fac)$/) {
$try .= "\$x->$f();";
} elsif ($f =~ /^(numify|length|stringify|as_hex|as_bin)$/) {
$try .= "\$x->$f();";
@@ -2656,7 +2656,7 @@ NaNone:0
2:0
-1:0
-2:0
-# floor and ceil tests are pretty pointless in integer space...but play safe
+# floor, ceil, and int are pretty pointless in integer space, but play safe
&bfloor
0:0
NaNfloor:NaN
@@ -2677,6 +2677,15 @@ NaNceil:NaN
2:2
3:3
abc:NaN
+&bint
+NaN:NaN
++inf:inf
+-inf:-inf
+0:0
+-1:-1
+-2:-2
+2:2
+3:3
&as_hex
128:0x80
-128:-0x80
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 3635 + 6;
+use Test::More tests => 3651 + 6;
use Math::BigInt lib => 'Calc';