Hello community,
here is the log from the commit of package perl-Math-BigInt for openSUSE:Factory checked in at 2015-10-30 21:52:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Math-BigInt (Old)
and /work/SRC/openSUSE:Factory/.perl-Math-BigInt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Math-BigInt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Math-BigInt/perl-Math-BigInt.changes 2015-10-28 17:31:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Math-BigInt.new/perl-Math-BigInt.changes 2015-10-30 21:52:57.000000000 +0100
@@ -1,0 +2,34 @@
+Fri Oct 30 10:55:11 UTC 2015 - coolo@suse.com
+
+- updated to 1.999707
+ see /usr/share/doc/packages/perl-Math-BigInt/CHANGES
+
+ 2015-10-29 v1.999707 pjacklam
+
+ * Added dependency on Math::Complex 1.39 for Math::Complex::Inf(), which is
+ used for numifying infinity.
+
+ * Updated author information.
+
+ * Updated information in the file README.
+
+ * Removed the files INSTALL and LICENSE as this information is already covered
+ in the file README.
+
+ * Enable 'use warnings' in all modules. We require a Perl newer than 5.6.0
+ anyway.
+
+ * Replace 'use vars ...' with 'our ...'. We require a Perl newer than 5.6.0
+ anyway.
+
+ * Avoid indirect object syntax in documentation.
+
+ * Moved 'Test::More' from 'build_requires' to 'test_requires' in Makefile.PL.
+
+-------------------------------------------------------------------
+Thu Oct 29 10:06:14 UTC 2015 - coolo@suse.com
+
+- updated to 1.999706
+ see /usr/share/doc/packages/perl-Math-BigInt/CHANGES
+
+-------------------------------------------------------------------
Old:
----
Math-BigInt-1.999705.tar.gz
New:
----
Math-BigInt-1.999707.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Math-BigInt.spec ++++++
--- /var/tmp/diff_new_pack.mzpd9d/_old 2015-10-30 21:52:58.000000000 +0100
+++ /var/tmp/diff_new_pack.mzpd9d/_new 2015-10-30 21:52:58.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-Math-BigInt
-Version: 1.999705
+Version: 1.999707
Release: 0
%define cpan_name Math-BigInt
Summary: Arbitrary size integer/float math package
@@ -30,6 +30,8 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
+BuildRequires: perl(Math::Complex) >= 1.39
+Requires: perl(Math::Complex) >= 1.39
%{perl_requires}
# MANUAL BEGIN
Recommends: perl(bignum) >= 0.22
@@ -43,7 +45,7 @@
All operators (including basic math operations) are overloaded if you
declare your big integers as
- $i = new Math::BigInt '123_456_789_123_456_789';
+ $i = Math::BigInt -> new('123_456_789_123_456_789');
Operations with overloaded operators preserve the arguments which is
exactly what you expect.
++++++ Math-BigInt-1.999705.tar.gz -> Math-BigInt-1.999707.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/CHANGES new/Math-BigInt-1.999707/CHANGES
--- old/Math-BigInt-1.999705/CHANGES 2015-10-26 14:23:58.000000000 +0100
+++ new/Math-BigInt-1.999707/CHANGES 2015-10-29 16:41:47.000000000 +0100
@@ -1433,12 +1433,40 @@
* Added test files t/objectify_mbf.t and t/objectify_mbi.t.
-2015-09-25 v1.999705 pjacklam
+2015-10-26 v1.999705 pjacklam
* Avoid using "my" in a false conditional. See "Deprecated use of my() in
false conditional" in perldiag(1).
- * Faster algorithm for bpi() when precision is >= 1000.
+ * Faster algorithm for bpi() when accuracy is >= 1000.
+
+2015-10-28 v1.999706 pjacklam
+
+ * Corrected release date of v1.999705 in CHANGES.
+
+ * Added code and tests for numify() on non-finite objects.
+
+2015-10-29 v1.999707 pjacklam
+
+ * Added dependency on Math::Complex 1.39 for Math::Complex::Inf(), which is
+ used for numifying infinity.
+
+ * Updated author information.
+
+ * Updated information in the file README.
+
+ * Removed the files INSTALL and LICENSE as this information is already covered
+ in the file README.
+
+ * Enable 'use warnings' in all modules. We require a Perl newer than 5.6.0
+ anyway.
+
+ * Replace 'use vars ...' with 'our ...'. We require a Perl newer than 5.6.0
+ anyway.
+
+ * Avoid indirect object syntax in documentation.
+
+ * Moved 'Test::More' from 'build_requires' to 'test_requires' in Makefile.PL.
Please send us test-reports, your experiences with this and your ideas - we love
to hear about our work!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/INSTALL new/Math-BigInt-1.999707/INSTALL
--- old/Math-BigInt-1.999705/INSTALL 2010-09-03 17:08:51.000000000 +0200
+++ new/Math-BigInt-1.999707/INSTALL 1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-Rewrite project of Math::Big*
-
-(C) Copyright ..--- ----- ----- .---- - ..--- by - . .-.. ... .-.-.-
-
-Contains new version of Math::BigInt and Math::BigFloat as they are in the
-Perl core from v5.8.0 onwards.
-
-This rewritten version is mainly compatible, minus some bugfixes, and more
-features and speed.
-
-To test, unzip & untar package, then run
-
- perl Makefile.PL
- make
- make test
- make install # as root
-
-These modules should be installed automatically into the Perl core, and not
-into site-perl. You can check whether you get the old or new versions by doing
-this:
-
- perl -MMath::BigInt -le 'print "v$Math::BigInt::VERSION"'
-
-If it prints undef or v0.01 you still got the old version. Delete the files
-from the Perl core installation path manually, and make sure that you
-delete all old versions, then try again to print the version from above.
-
-For a quick reference on what has changed from the old versions, please see
-CHANGES. HISTORY brings you a detailed history log of the rewrite.
-
-In ./examples are some basic example scripts.
-
-More information including HTMLified help and benchmark results are
-available under:
-
- http://bloodgate.com/perl/
-
-Please send me test-reports, your experiences with this and your ideas - I love
-to hear about my work!
-
-Tels http://bloodgate.com/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/MANIFEST new/Math-BigInt-1.999707/MANIFEST
--- old/Math-BigInt-1.999705/MANIFEST 2015-10-26 14:27:04.000000000 +0100
+++ new/Math-BigInt-1.999707/MANIFEST 2015-10-29 16:43:15.000000000 +0100
@@ -15,7 +15,6 @@
inc/Module/Install/Metadata.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
-INSTALL
lib/Math/BigFloat.pm
lib/Math/BigInt.pm
lib/Math/BigInt/Calc.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/META.json new/Math-BigInt-1.999707/META.json
--- old/Math-BigInt-1.999705/META.json 2015-10-26 14:27:03.000000000 +0100
+++ new/Math-BigInt-1.999707/META.json 2015-10-29 16:43:14.000000000 +0100
@@ -1,7 +1,7 @@
{
"abstract" : "Arbitrary size integer/float math package",
"author" : [
- "Original code by Mark Biggar, overloaded interface by Ilya Zakharevich., Tels "
+ "=over 4, Peter John Acklam "
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005",
@@ -33,11 +33,13 @@
},
"runtime" : {
"requires" : {
+ "Math::Complex" : "1.39",
+ "Test::More" : "0.62",
"perl" : "5.006002"
}
}
},
"release_status" : "stable",
- "version" : "1.999705",
+ "version" : "1.999707",
"x_serialization_backend" : "JSON::PP version 2.27300"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/META.yml new/Math-BigInt-1.999707/META.yml
--- old/Math-BigInt-1.999705/META.yml 2015-10-26 14:27:00.000000000 +0100
+++ new/Math-BigInt-1.999707/META.yml 2015-10-29 16:43:11.000000000 +0100
@@ -1,7 +1,7 @@
---
abstract: 'Arbitrary size integer/float math package'
author:
- - 'Original code by Mark Biggar, overloaded interface by Ilya Zakharevich., Tels '
+ - '=over 4, Peter John Acklam '
build_requires:
ExtUtils::MakeMaker: '6.59'
Test::More: '0.62'
@@ -19,6 +19,8 @@
- t
- inc
requires:
+ Math::Complex: '1.39'
+ Test::More: '0.62'
perl: '5.006002'
-version: '1.999705'
+version: '1.999707'
x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/Makefile.PL new/Math-BigInt-1.999707/Makefile.PL
--- old/Math-BigInt-1.999705/Makefile.PL 2014-04-04 09:01:33.000000000 +0200
+++ new/Math-BigInt-1.999707/Makefile.PL 2015-10-29 15:53:33.000000000 +0100
@@ -12,15 +12,15 @@
all_from 'lib/Math/BigInt.pm';
# Required versions.
-requires 'perl' => 5.006002;
-
-build_requires 'Test::More' => 0.62;
+requires 'perl' => 5.006002;
+requires 'Math::Complex' => 1.39,
+test_requires 'Test::More' => 0.62;
install_as_core();
license 'perl';
-author 'Tels ';
+author 'Peter John Acklam ';
# Do not index these
no_index directory => 'examples';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/README new/Math-BigInt-1.999707/README
--- old/Math-BigInt-1.999705/README 2010-09-03 17:08:51.000000000 +0200
+++ new/Math-BigInt-1.999707/README 2015-10-29 15:52:44.000000000 +0100
@@ -1,30 +1,43 @@
-Rewrite project of Math::BigInt, Math::BigFloat.
+Math-BigInt
-(C) Copyright ..--- ----- ----- .---- - ..--- by - . .-.. ... .-.-.-
+Math::BigInt and Math::BigFloat are modules for arbitrary precision
+arithmetic.
-This package contains completely rewritten versions of Math::BigInt and
-Math::BigFloat.
+INSTALLATION
-To test, unzip & untar package, then run
+To install this module, unpack the distribution file, and run the following
+commands:
- perl Makefile.PL
- make
- make test
- make install
+ perl Makefile.PL
+ make
+ make test
+ make install
-See also ./examples for some example scripts.
+SUPPORT AND DOCUMENTATION
-See INSTALL for detailed help on installing these modules.
+After installing, you can find documentation for these modules with the
+perldoc command.
-You can look on CPAN (http://search.cpan.org/) for modules that replace the
-core math routines of Math::BigInt (look for Math::BigInt::BitVect, f.i.).
+ perldoc Math::BigInt
+ perldoc Math::BigFloat
-More information including HTMLified help are available under:
+You can also look for information at:
- http://bloodgate.com/perl/ # project homepage
- http://bloodgate.com/perl/benchmarks.html # benchmarks
+ RT, CPAN's request tracker
+ http://rt.cpan.org/NoAuth/Bugs.html?Dist=Math-BigInt
-Please send me test-reports, your experiences with this and your ideas - I love
-to hear about my work!
+ AnnoCPAN, Annotated CPAN documentation
+ http://annocpan.org/dist/Math-BigInt
-Tels http://bloodgate.com/
+ CPAN Ratings
+ http://cpanratings.perl.org/d/Math-BigInt
+
+ Search CPAN
+ http://search.cpan.org/dist/Math-BigInt
+
+COPYRIGHT AND LICENCE
+
+Copyright 2007-2010 Peter John Acklam
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/SIGNATURE new/Math-BigInt-1.999707/SIGNATURE
--- old/Math-BigInt-1.999705/SIGNATURE 2015-10-26 14:27:08.000000000 +0100
+++ new/Math-BigInt-1.999707/SIGNATURE 2015-10-29 16:43:18.000000000 +0100
@@ -16,19 +16,18 @@
SHA1 f6ef98e8f3f6a4f670d569f279ef5a3c05c16d0c BENCHMARK
SHA1 d681b992c9e027633a59fbd52530805ee4e1621c BUGS
-SHA1 070dfc5e5b1451e3632ad5afaaf22e09edb5e7ef CHANGES
+SHA1 e1631812ed199c52be5185306d15e4bb4593891c CHANGES
SHA1 f27c8bd98e754f96c9825fa6ce9f1244c93bdbe6 CREDITS
SHA1 bc2db74538d3acd53f71b5512a144fe18c253ecd GOALS
SHA1 fe61299e80a1dca48fbaa33f0869e3238ec07c70 HISTORY
-SHA1 c42565ad26cdf91502bacf19a4f7080e63c51fe2 INSTALL
SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE
-SHA1 183f44987a5dfba10182b1b89f1f92647e388a5f MANIFEST
+SHA1 e717092a11b1e42a0a7b340c68e75fa84b8a68b8 MANIFEST
SHA1 86df44fbe1ea7a68897113f0e327d0f0c25b91e3 MANIFEST.SKIP
-SHA1 c2b7ce2ce2a199cc4fe2973476af791446a8b9b2 META.json
-SHA1 e1a84ca18d2afd3e3d8ec616c0bb80b9795d8dad META.yml
-SHA1 ae1e2767f1988a537d4a64fc84a07587cbca2ef5 Makefile.PL
+SHA1 20885b2d7e7695e64a9164d2b557a3f728de8a84 META.json
+SHA1 0b7fa178b5c3b96317f466af4de50517da24442d META.yml
+SHA1 a3da36a5af3eedcf0461fea65319bc69e8ff69ee Makefile.PL
SHA1 4e2191d1724e699862efc5350f480c8e02755112 NEW
-SHA1 481f5827752d2100914db1eaeb60bf0bbd13529e README
+SHA1 a1c4ab669fbeff68e7965c1bc3ced16d17a9f2f5 README
SHA1 f1500916b488220b707bc10a0388d7dbcfd52e99 TODO
SHA1 c2bbe82659480de8710b9e64a62d47b64dddd2d2 examples/1000.txt
SHA1 fe55e27b4791656d36a6c9548280746de7003be5 examples/bigprimes.pl
@@ -41,10 +40,10 @@
SHA1 2e33e87882d60db3913da6284dd5295e5315e18a inc/Module/Install/Metadata.pm
SHA1 c830b819e61bda5eca077c6291293bba61b3b9f2 inc/Module/Install/Win32.pm
SHA1 cb52b9d6f88d512d448a6f35ed0af0d1201a134b inc/Module/Install/WriteAll.pm
-SHA1 362611b1a57afc65286da4358fc4ce8ce316195c lib/Math/BigFloat.pm
-SHA1 dd4992a0e806c150939aae3ff2f40570bb078ecc lib/Math/BigInt.pm
-SHA1 c36ef4f421489ea7e0d753beb30c530a92f9025b lib/Math/BigInt/Calc.pm
-SHA1 1b79938af3f78e339f83a5601390d09fe28902bc lib/Math/BigInt/CalcEmu.pm
+SHA1 1914eb138f472f8fc090078c7b44259b000e3069 lib/Math/BigFloat.pm
+SHA1 5c79f8bb3acd0d867409ee39b2a9c32ae70e1ca6 lib/Math/BigInt.pm
+SHA1 486fc42db97cd2a05ea4c845e0bae2733d3d2896 lib/Math/BigInt/Calc.pm
+SHA1 56ceeb7353bf171e53dc2f8bb662a20c9f530f8b lib/Math/BigInt/CalcEmu.pm
SHA1 385cc7ed3bf3e6290640b9880445ca9a3dea629e t/00sig.t
SHA1 4463fdcebb8421cc2e63f87d678adb47856bf58c t/01load.t
SHA1 b2ed9206ca5b69ec3b8bbf850bf4b6dfde518e7e t/02pod.t
@@ -55,14 +54,14 @@
SHA1 27c1738a064e7f7bf91c762d411af447847c331c t/Math/BigInt/Subclass.pm
SHA1 a2014803baec5dbef46235f83411f76efa0efea7 t/_e_math.t
SHA1 0e725849a20e80bb1da796a7be40b69a958c8313 t/alias.inc
-SHA1 544c9c718179ef5ea77766c5a6d0c1a393609f52 t/bare_mbf.t
+SHA1 9f0d228c71dd1b49ea6de9ea9f67dcf30d3edccc t/bare_mbf.t
SHA1 633a5d1446321301fe2fbf8d440111ad62ffddfb t/bare_mbi.t
SHA1 97fb1db80aeb4ab007e2260d35329e149edf5e05 t/bare_mif.t
SHA1 333a425247b4e276696210a6322b815a0f55f5ab t/big_pi_e.t
-SHA1 96dbc74d7c77cf3bf70dd77d7b21fbce44c630b2 t/bigfltpm.inc
-SHA1 965f40208f73d9e51277d309310763d8336a0f1b t/bigfltpm.t
+SHA1 9bc755bda3026da5300d62e88bd797ead7366348 t/bigfltpm.inc
+SHA1 10f64067004036704aa30c0e40da7a8d83eef708 t/bigfltpm.t
SHA1 b3ceebc429c05bce95347575d28348306dbcfcc8 t/bigintc.t
-SHA1 ea7f75ed9aa5feae4b1f32ea7a7c2d909f6b68c3 t/bigintpm.inc
+SHA1 7954255fd6b3a4a09b6e47c98a1ed79d40a49e22 t/bigintpm.inc
SHA1 ba3d855434e4fea04c22bdd54076ed9706a79d5f t/bigintpm.t
SHA1 cb07d195c20eb306088eeacccc2c7475f267446c t/bigints.t
SHA1 0e505ab877fb41505d683163ad3f09027f9eef35 t/biglog.t
@@ -96,7 +95,7 @@
SHA1 ad6cc6fe4bb93ae78db4eb7dcb96c95024b963d2 t/round.t
SHA1 8201ea0035861736224992039bcc01d5bd72b778 t/rt-16221.t
SHA1 9d51def046889bf20c6ac2a278f9b3f5f8e36025 t/sub_ali.t
-SHA1 d03a42bc484dd3517979c1a3668e38d5c5d26367 t/sub_mbf.t
+SHA1 3e85cad277cb8490910285f8541a43bda6623cbb t/sub_mbf.t
SHA1 94d13e2f3807f37b1489f7540fa46995f9f78d8e t/sub_mbi.t
SHA1 a9d994551c5ca127c11f5cdd1d8df1d93972c72c t/sub_mif.t
SHA1 22c563a6879c94ce7c8eb72c645f2e374837c34e t/trap.t
@@ -110,15 +109,15 @@
SHA1 29606835c9d63a19075003429b00947b922ef144 t/use_lib3.t
SHA1 a5cc44a7e485828791696b2b27925e0d2855f883 t/use_lib4.t
SHA1 0c5f496ed66b02d0e118763c91862d84e3fb5629 t/use_mbfw.t
-SHA1 34e18efc281d6538ba91742afa82d50c3b4434ad t/with_sub.t
+SHA1 01c5bfaa17310e1cea23ad46eacfe1613c291cac t/with_sub.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-iQEcBAEBAgAGBQJWLiopAAoJEGcmPl2fr166jpQH/2c4Vtr1INnlfrwyRJ/99sog
-dmFh/w1GjKakuLBnS6pNAQY9reIA3JPIoa0SDwv4D6nvSfrjQXdhBt7xcmh6GAtM
-Lns+zSUvFgZD/LCm4JJSq2XOh1Hxrcs/k9IXtVk4xqh/TnkcPeBzOVbDS+9ovB7z
-qDGbZ0ZsJ3/NK8Z51808GGGOhl+h+Ps6Kgpzt9IoG4y64f2QKII/FeeBm0bon2Wk
-p8KNk+KccwMDEb8QqjnDcwhRFb16cnsA+Cfh2Sa6njGFZWf2bzDtv2yKI/CH6RoT
-jyaDTahNmxxlfGd507lshM29nVnvA4ZDr4rwPy3VQNb9O+saD4fqVkG0+20mHQg=
-=2XJv
+iQEcBAEBAgAGBQJWMj6TAAoJEGcmPl2fr166dAQH/RfhE0u3Rl7TxLyTDikGrPX2
+xL21DLsagbLKn705iFqxRiDRzI6lQ/cQEaI37wDeAee6IrABAZW5daFKGJgAv83q
+3K+oDFnNfiPHQvmJdlbkvGJw2Xyi8HPrKwDbUifXxPblMPiHVzJT/84o68FYwqrq
+CcpkRQ+FgoraH+zW4k9m9FLfTCNkgCioP/WqzZmVp6aRcyyiOdMWQlZQauyKMhSk
+YFlcPHaRvJJ8AUS6ktAsX0E+qM7CZo3oINMO1CqzgYZlxZTXklGSKMwA69ymVPMa
+C5s1uZM/cjnyK11BVclqoWy/Xyuswagud1WBs2wV7ybTrS4rPMOy20Ye+Musv/w=
+=52Ia
-----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/lib/Math/BigFloat.pm new/Math-BigInt-1.999707/lib/Math/BigFloat.pm
--- old/Math-BigInt-1.999705/lib/Math/BigFloat.pm 2015-10-26 10:07:03.000000000 +0100
+++ new/Math-BigInt-1.999707/lib/Math/BigFloat.pm 2015-10-29 16:38:48.000000000 +0100
@@ -12,17 +12,20 @@
# _a : accuracy
# _p : precision
-$VERSION = '1.999705';
-require 5.006002;
+use 5.006002;
+use strict;
+use warnings;
+
+our $VERSION = '1.999707';
require Exporter;
-@ISA = qw/Math::BigInt/;
-@EXPORT_OK = qw/bpi/;
+our @ISA = qw/Math::BigInt/;
+our @EXPORT_OK = qw/bpi/;
-use strict;
# $_trap_inf/$_trap_nan are internal and should never be accessed from outside
-use vars qw/$AUTOLOAD $accuracy $precision $div_scale $round_mode $rnd_mode
- $upgrade $downgrade $_trap_nan $_trap_inf/;
+our ($AUTOLOAD, $accuracy, $precision, $div_scale, $round_mode, $rnd_mode,
+ $upgrade, $downgrade, $_trap_nan, $_trap_inf);
+
my $class = "Math::BigFloat";
use overload
@@ -437,10 +440,23 @@
sub numify
{
- # Convert a Perl scalar number from a BigFloat object.
- # Create a string and let Perl's atoi()/atof() handle the rest.
+ # Make a Perl scalar number from a Math::BigFloat object.
my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
- return 0 + $x->bsstr();
+
+ if ($x -> is_nan()) {
+ require Math::Complex;
+ my $inf = Math::Complex::Inf();
+ return $inf - $inf;
+ }
+
+ if ($x -> is_inf()) {
+ require Math::Complex;
+ my $inf = Math::Complex::Inf();
+ return $x -> is_negative() ? -$inf : $inf;
+ }
+
+ # Create a string and let Perl's atoi()/atof() handle the rest.
+ return 0 + $x -> bsstr();
}
##############################################################################
@@ -4126,7 +4142,7 @@
All operators (including basic math operations) are overloaded if you
declare your big floating point numbers as
- $i = new Math::BigFloat '12_3.456_789_123_456_789E-2';
+ $i = Math::BigFloat -> new('12_3.456_789_123_456_789E-2');
Operations with overloaded operators preserve the arguments, which is
exactly what you expect.
@@ -4771,8 +4787,24 @@
=head1 AUTHORS
-Mark Biggar, overloaded interface by Ilya Zakharevich.
-Completely rewritten by Tels Lhttp://bloodgate.com in 2001 - 2006, and still
-at it in 2007.
+=over 4
+
+=item *
+
+Mark Biggar, overloaded interface by Ilya Zakharevich, 1996-2001.
+
+=item *
+
+Completely rewritten by Tels Lhttp://bloodgate.com in 2001-2008.
+
+=item *
+
+Florian Ragwitz L, 2010.
+
+=item *
+
+Peter John Acklam, L, 2011-.
+
+=back
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/lib/Math/BigInt/Calc.pm new/Math-BigInt-1.999707/lib/Math/BigInt/Calc.pm
--- old/Math-BigInt-1.999705/lib/Math/BigInt/Calc.pm 2015-10-26 10:07:03.000000000 +0100
+++ new/Math-BigInt-1.999707/lib/Math/BigInt/Calc.pm 2015-10-29 16:27:41.000000000 +0100
@@ -2,9 +2,9 @@
use 5.006002;
use strict;
-# use warnings; # do not use warnings for older Perls
+use warnings;
-our $VERSION = '1.999705';
+our $VERSION = '1.999707';
# Package to store unsigned big integers in decimal and do math with them
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/lib/Math/BigInt/CalcEmu.pm new/Math-BigInt-1.999707/lib/Math/BigInt/CalcEmu.pm
--- old/Math-BigInt-1.999705/lib/Math/BigInt/CalcEmu.pm 2015-10-26 10:07:03.000000000 +0100
+++ new/Math-BigInt-1.999707/lib/Math/BigInt/CalcEmu.pm 2015-10-29 16:29:10.000000000 +0100
@@ -2,10 +2,9 @@
use 5.006002;
use strict;
-# use warnings; # do not use warnings for older Perls
-use vars qw/$VERSION/;
+use warnings;
-$VERSION = '1.999705';
+our $VERSION = '1.999707';
package Math::BigInt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/lib/Math/BigInt.pm new/Math-BigInt-1.999707/lib/Math/BigInt.pm
--- old/Math-BigInt-1.999705/lib/Math/BigInt.pm 2015-10-26 10:07:03.000000000 +0100
+++ new/Math-BigInt-1.999707/lib/Math/BigInt.pm 2015-10-29 16:34:12.000000000 +0100
@@ -15,19 +15,21 @@
# Remember not to take shortcuts ala $xs = $x->{value}; $CALC->foo($xs); since
# underlying lib might change the reference!
-my $class = "Math::BigInt";
use 5.006002;
+use strict;
+use warnings;
-$VERSION = '1.999705';
+our $VERSION = '1.999707';
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(objectify bgcd blcm);
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(objectify bgcd blcm);
# _trap_inf and _trap_nan are internal and should never be accessed from the
# outside
-use vars qw/$round_mode $accuracy $precision $div_scale $rnd_mode
- $upgrade $downgrade $_trap_nan $_trap_inf/;
-use strict;
+our ($round_mode, $accuracy, $precision, $div_scale, $rnd_mode,
+ $upgrade, $downgrade, $_trap_nan, $_trap_inf);
+
+my $class = "Math::BigInt";
# Inside overload, the first arg is always an object. If the original code had
# it reversed (like $x = 2 * $y), then the third parameter is true.
@@ -846,13 +848,23 @@
sub numify
{
- # Make a "normal" scalar from a BigInt object
+ # Make a Perl scalar number from a Math::BigInt object.
my $x = shift; $x = $class->new($x) unless ref $x;
- return $x->bstr() if $x->{sign} !~ /^[+-]$/;
- my $num = $CALC->_num($x->{value});
- return -$num if $x->{sign} eq '-';
- $num;
+ if ($x -> is_nan()) {
+ require Math::Complex;
+ my $inf = Math::Complex::Inf();
+ return $inf - $inf;
+ }
+
+ if ($x -> is_inf()) {
+ require Math::Complex;
+ my $inf = Math::Complex::Inf();
+ return $x -> is_negative() ? -$inf : $inf;
+ }
+
+ my $num = 0 + $CALC->_num($x->{value});
+ return $x->{sign} eq '-' ? -$num : $num;
}
##############################################################################
@@ -3631,7 +3643,7 @@
All operators (including basic math operations) are overloaded if you
declare your big integers as
- $i = new Math::BigInt '123_456_789_123_456_789';
+ $i = Math::BigInt -> new('123_456_789_123_456_789');
Operations with overloaded operators preserve the arguments which is
exactly what you expect.
@@ -5182,13 +5194,20 @@
=item bexp()
-=back
+=item bpi()
-Beware: This list is not complete.
+=item bcos()
+
+=item bsin()
+
+=item batan2()
+
+=item batan()
+
+=back
All other methods upgrade themselves only when one (or all) of their
-arguments are of the class mentioned in $upgrade (This might change in later
-versions to a more sophisticated scheme):
+arguments are of the class mentioned in $upgrade.
=head1 EXPORTS
@@ -5225,8 +5244,8 @@
use Test::More tests => 1;
use Math::BigInt;
- my $x = new Math::BigInt 3*3;
- my $y = new Math::BigInt 3*3;
+ my $x = Math::BigInt -> new(3*3);
+ my $y = Math::BigInt -> new(3*3);
is ($x,3*3, 'multiplication');
print "$x eq 9" if $x eq $y;
@@ -5590,9 +5609,25 @@
=head1 AUTHORS
-Original code by Mark Biggar, overloaded interface by Ilya Zakharevich.
-Completely rewritten by Tels http://bloodgate.com in late 2000, 2001 - 2006
-and still at it in 2007.
+=over 4
+
+=item *
+
+Mark Biggar, overloaded interface by Ilya Zakharevich, 1996-2001.
+
+=item *
+
+Completely rewritten by Tels Lhttp://bloodgate.com in 2001-2008.
+
+=item *
+
+Florian Ragwitz L, 2010.
+
+=item *
+
+Peter John Acklam, L, 2011-.
+
+=back
Many people contributed in one or more ways to the final beast, see the file
CREDITS for an (incomplete) list. If you miss your name, please drop me a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/t/bare_mbf.t new/Math-BigInt-1.999707/t/bare_mbf.t
--- old/Math-BigInt-1.999705/t/bare_mbf.t 2015-09-17 14:16:31.000000000 +0200
+++ new/Math-BigInt-1.999707/t/bare_mbf.t 2015-10-28 10:47:31.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 2360;
+use Test::More tests => 2363;
BEGIN { unshift @INC, 't'; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/t/bigfltpm.inc new/Math-BigInt-1.999707/t/bigfltpm.inc
--- old/Math-BigInt-1.999705/t/bigfltpm.inc 2015-09-20 13:19:53.000000000 +0200
+++ new/Math-BigInt-1.999707/t/bigfltpm.inc 2015-10-28 10:33:41.000000000 +0100
@@ -269,6 +269,17 @@
unlike($class->new("1e9999")->numify(), qr/^1(\.0*)?e\+?9+$/); # overflow
###############################################################################
+# Check numify on non-finite objects.
+
+{
+ my $inf = 1e99 ** 1e99;
+ my $nan = $inf - $inf;
+ is($class -> binf("+") -> numify(), $inf, "numify of +Inf");
+ is($class -> binf("-") -> numify(), -$inf, "numify of -Inf");
+ is($class -> bnan() -> numify(), $nan, "numify of NaN");
+}
+
+###############################################################################
# fsqrt() with set global A/P or A/P enabled on $x, also a test whether fsqrt()
# correctly modifies $x
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/t/bigfltpm.t new/Math-BigInt-1.999707/t/bigfltpm.t
--- old/Math-BigInt-1.999705/t/bigfltpm.t 2015-09-17 14:16:31.000000000 +0200
+++ new/Math-BigInt-1.999707/t/bigfltpm.t 2015-10-28 10:47:56.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 2360
+use Test::More tests => 2363
+ 5; # own tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/t/bigintpm.inc new/Math-BigInt-1.999707/t/bigintpm.inc
--- old/Math-BigInt-1.999705/t/bigintpm.inc 2015-09-19 13:18:50.000000000 +0200
+++ new/Math-BigInt-1.999707/t/bigintpm.inc 2015-10-28 10:46:10.000000000 +0100
@@ -520,6 +520,17 @@
is (ref($x),'Math::Foo');
###############################################################################
+# Check numify on non-finite objects.
+
+{
+ my $inf = 1e99 ** 1e99;
+ my $nan = $inf - $inf;
+ is($class -> binf("+") -> numify(), $inf, "numify of +Inf");
+ is($class -> binf("-") -> numify(), -$inf, "numify of -Inf");
+ is($class -> bnan() -> numify(), $nan, "numify of NaN");
+}
+
+###############################################################################
# Test whether +inf eq inf
# This tried to test whether BigInt inf equals Perl inf. Unfortunately, Perl
# hasn't (before 5.7.3 at least) a consistent way to say inf, and some things
@@ -1227,9 +1238,6 @@
-5:-5e+0
-100:-1e+2
&numify
-numifyabc:NaN
-+inf:inf
--inf:-inf
5:5
-5:-5
100:100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/t/sub_mbf.t new/Math-BigInt-1.999707/t/sub_mbf.t
--- old/Math-BigInt-1.999705/t/sub_mbf.t 2015-09-17 14:18:08.000000000 +0200
+++ new/Math-BigInt-1.999707/t/sub_mbf.t 2015-10-28 10:49:19.000000000 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 2360
+use Test::More tests => 2363
+ 6; # + our own tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Math-BigInt-1.999705/t/with_sub.t new/Math-BigInt-1.999707/t/with_sub.t
--- old/Math-BigInt-1.999705/t/with_sub.t 2015-09-17 14:19:16.000000000 +0200
+++ new/Math-BigInt-1.999707/t/with_sub.t 2015-10-28 10:47:09.000000000 +0100
@@ -3,7 +3,7 @@
# Test use Math::BigFloat with => 'Math::BigInt::SomeSubclass';
use strict;
-use Test::More tests => 2360 + 1;
+use Test::More tests => 2363 + 1;
use Math::BigFloat with => 'Math::BigInt::Subclass', lib => 'Calc';