Hello community,

here is the log from the commit of package perl-Math-BigInt for 
openSUSE:Factory checked in at 2015-09-24 06:15:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-09-17 09:20:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Math-BigInt.new/perl-Math-BigInt.changes   
2015-09-24 06:16:19.000000000 +0200
@@ -1,0 +2,25 @@
+Tue Sep 22 09:12:28 UTC 2015 - co...@suse.com
+
+- updated to 1.999703
+   see /usr/share/doc/packages/perl-Math-BigInt/CHANGES
+
+  2015-09-21 v1.999703 pjacklam
+  
+   * Fix blog() in Math::BigInt and Math::BigFloat to work correctly regardless
+     of the base.
+  
+   * Correct existing tests in bigintpm.inc and bigfltpm.inc.
+  
+   * Update test plans (number of tests) in t/bare_mbi.t, t/bigintpm.t, and
+     t/sub_mbi.t.
+  
+   * Add test files t/blog-mbf.t and t/blog-mbi.t for better testing of the
+     blog() methods.
+
+-------------------------------------------------------------------
+Sun Sep 20 09:00:16 UTC 2015 - co...@suse.com
+
+- updated to 1.999702
+   see /usr/share/doc/packages/perl-Math-BigInt/CHANGES
+
+-------------------------------------------------------------------

Old:
----
  Math-BigInt-1.999701.tar.gz

New:
----
  Math-BigInt-1.999703.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Math-BigInt.spec ++++++
--- /var/tmp/diff_new_pack.HQaQ8N/_old  2015-09-24 06:16:20.000000000 +0200
+++ /var/tmp/diff_new_pack.HQaQ8N/_new  2015-09-24 06:16:20.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Math-BigInt
-Version:        1.999701
+Version:        1.999703
 Release:        0
 %define cpan_name Math-BigInt
 Summary:        Arbitrary size integer/float math package

++++++ Math-BigInt-1.999701.tar.gz -> Math-BigInt-1.999703.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/CHANGES 
new/Math-BigInt-1.999703/CHANGES
--- old/Math-BigInt-1.999701/CHANGES    2015-09-11 19:54:27.000000000 +0200
+++ new/Math-BigInt-1.999703/CHANGES    2015-09-21 19:36:52.000000000 +0200
@@ -9,7 +9,6 @@
 ##############################################################################
 Math::BigInt::Calc:
 
-
 2001-07-09 v0.06 Tels
  * first release
 
@@ -1390,6 +1389,35 @@
    Math-BigInt distribution and the backend distributions are as few and as
    small as possible. This makes for easier release management.
 
+2015-09-17 v1.999702 pjacklam
+
+ * The overloaded log() is a unary operator, so don't pass additional
+   arguments.
+
+ * Fix blog() so the cases $x->blog() and $x->blog(undef) work correctly. An
+   undefined base means that blog() should use base e (Euler's number).
+
+ * Both CORE::log() and other mathematical software returns inf for log(inf),
+   so we do the same.
+
+ * Add tests for log() as well as templates for future tests of the other
+   overloadable functions.
+
+ * Improve descriptions of a few tests.
+
+2015-09-21 v1.999703 pjacklam
+
+ * Fix blog() in Math::BigInt and Math::BigFloat to work correctly regardless
+   of the base.
+
+ * Correct existing tests in bigintpm.inc and bigfltpm.inc.
+
+ * Update test plans (number of tests) in t/bare_mbi.t, t/bigintpm.t, and
+   t/sub_mbi.t.
+
+ * Add test files t/blog-mbf.t and t/blog-mbi.t for better testing of the
+   blog() methods.
+
 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.999701/MANIFEST 
new/Math-BigInt-1.999703/MANIFEST
--- old/Math-BigInt-1.999701/MANIFEST   2015-09-11 19:57:25.000000000 +0200
+++ new/Math-BigInt-1.999703/MANIFEST   2015-09-21 19:52:56.000000000 +0200
@@ -44,6 +44,8 @@
 t/bigints.t
 t/biglog.t
 t/bigroot.t
+t/blog-mbf.t
+t/blog-mbi.t
 t/calling.t
 t/config.t
 t/const_mbf.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/META.json 
new/Math-BigInt-1.999703/META.json
--- old/Math-BigInt-1.999701/META.json  2015-09-11 19:57:25.000000000 +0200
+++ new/Math-BigInt-1.999703/META.json  2015-09-21 19:52:55.000000000 +0200
@@ -4,7 +4,7 @@
       "Original code by Mark Biggar, overloaded interface by Ilya 
Zakharevich., Tels <nospam-ab...@bloodgate.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150005",
+   "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter 
version 2.150005",
    "license" : [
       "perl_5"
    ],
@@ -38,6 +38,6 @@
       }
    },
    "release_status" : "stable",
-   "version" : "1.999701",
+   "version" : "1.999703",
    "x_serialization_backend" : "JSON::PP version 2.27300"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/META.yml 
new/Math-BigInt-1.999703/META.yml
--- old/Math-BigInt-1.999701/META.yml   2015-09-11 19:57:23.000000000 +0200
+++ new/Math-BigInt-1.999703/META.yml   2015-09-21 19:52:50.000000000 +0200
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150005'
+generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 
2.150005'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,5 +20,5 @@
     - inc
 requires:
   perl: '5.006002'
-version: '1.999701'
+version: '1.999703'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/SIGNATURE 
new/Math-BigInt-1.999703/SIGNATURE
--- old/Math-BigInt-1.999701/SIGNATURE  2015-09-11 19:57:28.000000000 +0200
+++ new/Math-BigInt-1.999703/SIGNATURE  2015-09-21 19:53:02.000000000 +0200
@@ -16,16 +16,16 @@
 
 SHA1 f6ef98e8f3f6a4f670d569f279ef5a3c05c16d0c BENCHMARK
 SHA1 d681b992c9e027633a59fbd52530805ee4e1621c BUGS
-SHA1 0815a28c08ef29d983d21a6c7683c8c2b0d803e1 CHANGES
+SHA1 6b566f5d8c537a75d173e1845d330a020b06ddab CHANGES
 SHA1 f27c8bd98e754f96c9825fa6ce9f1244c93bdbe6 CREDITS
 SHA1 bc2db74538d3acd53f71b5512a144fe18c253ecd GOALS
 SHA1 fe61299e80a1dca48fbaa33f0869e3238ec07c70 HISTORY
 SHA1 c42565ad26cdf91502bacf19a4f7080e63c51fe2 INSTALL
 SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE
-SHA1 43408348b400ef1d910a18feab394817e343cc86 MANIFEST
+SHA1 8f6a77cdcfede79a3fcf27549b2b8739eaefbfe8 MANIFEST
 SHA1 86df44fbe1ea7a68897113f0e327d0f0c25b91e3 MANIFEST.SKIP
-SHA1 d2c249bd0aa356187e6ad4326be5879dd0f83d1c META.json
-SHA1 caefe2c8385d8be85408dc56b2c29cede24e3e17 META.yml
+SHA1 43cf33ae05d036694ebfe2987e31217140278c9e META.json
+SHA1 3cec127e47b24f6b3b0a21c8a6fc67aec2f3916a META.yml
 SHA1 ae1e2767f1988a537d4a64fc84a07587cbca2ef5 Makefile.PL
 SHA1 4e2191d1724e699862efc5350f480c8e02755112 NEW
 SHA1 481f5827752d2100914db1eaeb60bf0bbd13529e README
@@ -41,10 +41,10 @@
 SHA1 2e33e87882d60db3913da6284dd5295e5315e18a inc/Module/Install/Metadata.pm
 SHA1 c830b819e61bda5eca077c6291293bba61b3b9f2 inc/Module/Install/Win32.pm
 SHA1 cb52b9d6f88d512d448a6f35ed0af0d1201a134b inc/Module/Install/WriteAll.pm
-SHA1 bff33aecc126b34d7c2461f8c6ceee4bdabf428d lib/Math/BigFloat.pm
-SHA1 981073b6c2b63068f5dee95608b1d14c837af5f7 lib/Math/BigInt.pm
-SHA1 5e0a467afb8bfb66938252a2aa055b1cc343d728 lib/Math/BigInt/Calc.pm
-SHA1 a5956e02f12e77650bc984f806be1172cab9b278 lib/Math/BigInt/CalcEmu.pm
+SHA1 d69e58dac458d7bd76c7fb6182d50e7005fcca6d lib/Math/BigFloat.pm
+SHA1 7bc1a3b537261121d93d275431bd86c45c0c6e5e lib/Math/BigInt.pm
+SHA1 92b2144f0032d651cf1e7d3b37a82b01010febac lib/Math/BigInt/Calc.pm
+SHA1 193c0c6d9b83e783b8071b8bbeee3f5bc0dcfddd lib/Math/BigInt/CalcEmu.pm
 SHA1 385cc7ed3bf3e6290640b9880445ca9a3dea629e t/00sig.t
 SHA1 4463fdcebb8421cc2e63f87d678adb47856bf58c t/01load.t
 SHA1 b2ed9206ca5b69ec3b8bbf850bf4b6dfde518e7e t/02pod.t
@@ -55,18 +55,20 @@
 SHA1 27c1738a064e7f7bf91c762d411af447847c331c t/Math/BigInt/Subclass.pm
 SHA1 a2014803baec5dbef46235f83411f76efa0efea7 t/_e_math.t
 SHA1 0e725849a20e80bb1da796a7be40b69a958c8313 t/alias.inc
-SHA1 c46706c4d6e75f1be26c938f8de19ca5990c672f t/bare_mbf.t
-SHA1 4f40065bfe169022be4742991d4f28da17b65bfd t/bare_mbi.t
+SHA1 544c9c718179ef5ea77766c5a6d0c1a393609f52 t/bare_mbf.t
+SHA1 633a5d1446321301fe2fbf8d440111ad62ffddfb t/bare_mbi.t
 SHA1 97fb1db80aeb4ab007e2260d35329e149edf5e05 t/bare_mif.t
 SHA1 333a425247b4e276696210a6322b815a0f55f5ab t/big_pi_e.t
-SHA1 d0a7c7c8852762abd7f962d26d72f2f8956f946d t/bigfltpm.inc
-SHA1 2feb8161766c7a9427341307ab778f6eccbab21e t/bigfltpm.t
+SHA1 96dbc74d7c77cf3bf70dd77d7b21fbce44c630b2 t/bigfltpm.inc
+SHA1 965f40208f73d9e51277d309310763d8336a0f1b t/bigfltpm.t
 SHA1 b3ceebc429c05bce95347575d28348306dbcfcc8 t/bigintc.t
-SHA1 9fcc5a0c645880be1dc2083dc623de14f6b476d9 t/bigintpm.inc
-SHA1 c5f14cee5968dea1b2871f2210a7be1a6a905e8c t/bigintpm.t
+SHA1 ea7f75ed9aa5feae4b1f32ea7a7c2d909f6b68c3 t/bigintpm.inc
+SHA1 ba3d855434e4fea04c22bdd54076ed9706a79d5f t/bigintpm.t
 SHA1 cb07d195c20eb306088eeacccc2c7475f267446c t/bigints.t
-SHA1 4e27fc0056d6455d278c0d38f5fe7f3c9a57fbe8 t/biglog.t
+SHA1 0e505ab877fb41505d683163ad3f09027f9eef35 t/biglog.t
 SHA1 b1aa233c07e7988ef67c9f527c9dc67b46d0a6fc t/bigroot.t
+SHA1 01e72c0c34468a0c135c4bfc7e69a3274ca0a368 t/blog-mbf.t
+SHA1 6e093e61e67395b85dc64911ce4e554d8a8f23dc t/blog-mbi.t
 SHA1 2ed03baf88a7d868706605bada7874123f99eded t/calling.t
 SHA1 c1f7b6840e772f2b6d4f8dbea4c28aaa675c9b17 t/config.t
 SHA1 7c75531325efd55f15ef14e5ca22875d6d53e366 t/const_mbf.t
@@ -92,8 +94,8 @@
 SHA1 ad6cc6fe4bb93ae78db4eb7dcb96c95024b963d2 t/round.t
 SHA1 8201ea0035861736224992039bcc01d5bd72b778 t/rt-16221.t
 SHA1 9d51def046889bf20c6ac2a278f9b3f5f8e36025 t/sub_ali.t
-SHA1 7d09d1b2a56c4622536570e6199ce4bab35475ab t/sub_mbf.t
-SHA1 211fd2968a2fcbe0384c20c00984f5b8bbbf7688 t/sub_mbi.t
+SHA1 d03a42bc484dd3517979c1a3668e38d5c5d26367 t/sub_mbf.t
+SHA1 94d13e2f3807f37b1489f7540fa46995f9f78d8e t/sub_mbi.t
 SHA1 a9d994551c5ca127c11f5cdd1d8df1d93972c72c t/sub_mif.t
 SHA1 22c563a6879c94ce7c8eb72c645f2e374837c34e t/trap.t
 SHA1 6170a40ec68d8821a9d5cb7731cbf35c4c0291b6 t/upgrade.inc
@@ -106,15 +108,15 @@
 SHA1 29606835c9d63a19075003429b00947b922ef144 t/use_lib3.t
 SHA1 a5cc44a7e485828791696b2b27925e0d2855f883 t/use_lib4.t
 SHA1 0c5f496ed66b02d0e118763c91862d84e3fb5629 t/use_mbfw.t
-SHA1 d374a32db7274aa29c53f530ec4751509147cc10 t/with_sub.t
+SHA1 34e18efc281d6538ba91742afa82d50c3b4434ad t/with_sub.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
-iQEcBAEBAgAGBQJV8xYGAAoJEGcmPl2fr166RiEH/jxwvm/84sby96xXXcrUImDf
-EicWgwMfh7r986kcV6yr+ejRm+pQizDoKXt5GbNsLt3xtSjRZHIQazIcJYDxsOMk
-m9nRp9jIaESM3kk6pA/Al5OIO+peQ25snQpbn+THHUe07UW9az/aDCdYs878yJXN
-K9Gwt16LkVVLXgEKWgzXj988fK7+lu7VvlqUzH3GhTKlG2n4OoELjHHFapG4b6kv
-CngwNycCNyoJ+JoG5bfKCMNQfqLKEEeNVLG8cpTB6RFJ81qq1QZB52biVZ89yvOH
-N4awcVFWXVtMAKNUYdPD4fetBcGigzdpTtYSdF9YB834q/Ai+xKlvlD6BdrcpaA=
-=Ky1R
+iQEcBAEBAgAGBQJWAEP5AAoJEGcmPl2fr166vegH/0Qm1Z/66sNEhc2jGhRjhlVv
+aC2Y76G29bA7TkYhvVNxKZQ0imPBsLINr84jvAPynuwzdKa13EJX46sA1MUW3fmp
+ciT4BNoAqv48WUmukh67cm2p/lwNsmA4h4Tz8u7jgDH2r4Ilsh1pUZg6eKTUHLtJ
+3Hg3EYAqHuJKtrZQLzECmPpArNDYbHhcQbVI/mhqyIvKTne+qWDbxcvu9YKsAFHp
+XwwgOH+PVmqsFiosM6W9FeR8bLnHmTntFFvKKk+Wns4Qo2y0Gxxcq5KwxNgfgoz2
+dzWZtdzPqpXEWeqCEDYOMYC/lWu/fCcVamZfyBhTHaTubvari63DsB2hViwSZRc=
+=G3gV
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/lib/Math/BigFloat.pm 
new/Math-BigInt-1.999703/lib/Math/BigFloat.pm
--- old/Math-BigInt-1.999701/lib/Math/BigFloat.pm       2015-08-12 
16:08:40.000000000 +0200
+++ new/Math-BigInt-1.999703/lib/Math/BigFloat.pm       2015-09-21 
09:29:13.000000000 +0200
@@ -12,7 +12,7 @@
 #   _a : accuracy
 #   _p : precision
 
-$VERSION = '1.999701';
+$VERSION = '1.999703';
 require 5.006002;
 
 require Exporter;
@@ -860,19 +860,24 @@
   {
   my ($self,$x,$base,$a,$p,$r) = ref($_[0]) ? (ref($_[0]),@_) : 
objectify(1,@_);
 
+  # If called as $x -> blog() or $x -> blog(undef), don't objectify the
+  # undefined base, since undef signals that the base is Euler's number.
+  #unless (ref($x) && !defined($base)) {
+  #    # objectify is costly, so avoid it
+  #    if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1]))) {
+  #        ($self,$x,$base,$a,$p,$r) = objectify(2,@_);
+  #    }
+  #}
+
   return $x if $x->modify('blog');
 
-  # $base > 0, $base != 1; if $base == undef default to $base == e
-  # $x >= 0
+  return $x -> bnan() if $x -> is_nan();
 
   # we need to limit the accuracy to protect against overflow
   my $fallback = 0;
   my ($scale,@params);
   ($x,@params) = $x->_find_round_parameters($a,$p,$r);
 
-  # also takes care of the "error in _find_round_parameters?" case
-  return $x->bnan() if $x->{sign} ne '+' || $x->is_zero();
-
   # no rounding at all, so must use fallback
   if (scalar @params == 0)
     {
@@ -890,33 +895,67 @@
     $scale = abs($params[0] || $params[1]) + 4;        # take whatever is 
defined
     }
 
-  return $x->bzero(@params) if $x->is_one();
-  # base not defined => base == Euler's number e
-  if (defined $base)
-    {
-    # make object, since we don't feed it through objectify() to still get the
-    # case of $base == undef
-    $base = $self->new($base) unless ref($base);
-    # $base > 0; $base != 1
-    return $x->bnan() if $base->is_zero() || $base->is_one() ||
-      $base->{sign} ne '+';
-    # if $x == $base, we know the result must be 1.0
-    if ($x->bcmp($base) == 0)
-      {
-      $x->bone('+',@params);
-      if ($fallback)
-        {
-        # clear a/p after round, since user did not request it
-        delete $x->{_a}; delete $x->{_p};
-        }
-      return $x;
+  my $done = 0;
+  if (defined $base) {
+      $base = $self -> new($base) unless ref $base;
+      if ($base -> is_nan() || $base -> is_one()) {
+          $x -> bnan();
+          $done = 1;
+      } elsif ($base -> is_inf() || $base -> is_zero()) {
+          if ($x -> is_inf() || $x -> is_zero()) {
+              $x -> bnan();
+          } else {
+              $x -> bzero(@params);
+          }
+          $done = 1;
+      } elsif ($base -> is_negative()) {        # -inf < base < 0
+          if ($x -> is_one()) {                 #     x = 1
+              $x -> bzero(@params);
+          } elsif ($x == $base) {
+              $x -> bone('+', @params);         #     x = base
+          } else {
+              $x -> bnan();                     #     otherwise
+          }
+          $done = 1;
+      } elsif ($x == $base) {
+          $x -> bone('+', @params);             # 0 < base && 0 < x < inf
+          $done = 1;
       }
-    }
+  }
+
+  # We now know that the base is either undefined or positive and finite.
+
+  unless ($done) {
+      if ($x -> is_inf()) {             #   x = +/-inf
+          my $sign = defined $base && $base < 1 ? '-' : '+';
+          $x -> binf($sign);
+          $done = 1;
+      } elsif ($x -> is_neg()) {        #   -inf < x < 0
+          $x -> bnan();
+          $done = 1;
+      } elsif ($x -> is_one()) {        #   x = 1
+          $x -> bzero(@params);
+          $done = 1;
+      } elsif ($x -> is_zero()) {       #   x = 0
+          my $sign = defined $base && $base < 1 ? '+' : '-';
+          $x -> binf($sign);
+          $done = 1;
+      }
+  }
+
+  if ($done) {
+      if ($fallback) {
+          # clear a/p after round, since user did not request it
+          delete $x->{_a};
+          delete $x->{_p};
+      }
+      return $x;
+  }
 
   # when user set globals, they would interfere with our calculation, so
   # disable them and later re-enable them
   no strict 'refs';
-  my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
+  my $abr = "$self\::accuracy";  my $ab = $$abr; $$abr = undef;
   my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
   # we also need to disable any set A or P on $x (_find_round_parameters took
   # them already into account), since these would interfere, too
@@ -932,8 +971,8 @@
     $x = Math::BigFloat->new($x);
     $self = ref($x);
     }
-  
-  my $done = 0;
+
+  $done = 0;
 
   # If the base is defined and an integer, try to calculate integer result
   # first. This is very fast, and in case the real result was found, we can
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/lib/Math/BigInt/Calc.pm 
new/Math-BigInt-1.999703/lib/Math/BigInt/Calc.pm
--- old/Math-BigInt-1.999701/lib/Math/BigInt/Calc.pm    2015-08-12 
16:08:40.000000000 +0200
+++ new/Math-BigInt-1.999703/lib/Math/BigInt/Calc.pm    2015-09-19 
14:23:35.000000000 +0200
@@ -4,7 +4,7 @@
 use strict;
 # use warnings;        # do not use warnings for older Perls
 
-our $VERSION = '1.999701';
+our $VERSION = '1.999703';
 
 # 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.999701/lib/Math/BigInt/CalcEmu.pm 
new/Math-BigInt-1.999703/lib/Math/BigInt/CalcEmu.pm
--- old/Math-BigInt-1.999701/lib/Math/BigInt/CalcEmu.pm 2015-08-12 
16:08:40.000000000 +0200
+++ new/Math-BigInt-1.999703/lib/Math/BigInt/CalcEmu.pm 2015-09-19 
14:24:20.000000000 +0200
@@ -5,7 +5,7 @@
 # use warnings;        # do not use warnings for older Perls
 use vars qw/$VERSION/;
 
-$VERSION = '1.999701';
+$VERSION = '1.999703';
 
 package Math::BigInt;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/lib/Math/BigInt.pm 
new/Math-BigInt-1.999703/lib/Math/BigInt.pm
--- old/Math-BigInt-1.999701/lib/Math/BigInt.pm 2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/lib/Math/BigInt.pm 2015-09-19 15:33:21.000000000 
+0200
@@ -18,7 +18,7 @@
 my $class = "Math::BigInt";
 use 5.006002;
 
-$VERSION = '1.999701';
+$VERSION = '1.999703';
 
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(objectify bgcd blcm); 
@@ -94,7 +94,7 @@
 #'oct' =>      sub { print "oct"; $_[0]; }, 
 
 # log(N) is log(N, e), where e is Euler's number
-'log'  =>      sub { $_[0]->copy()->blog($_[1], undef); }, 
+'log'  =>      sub { $_[0]->copy()->blog(); }, 
 'exp'  =>      sub { $_[0]->copy()->bexp($_[1]); }, 
 'int'  =>      sub { $_[0]->copy(); }, 
 'neg'  =>      sub { $_[0]->copy()->bneg(); }, 
@@ -1277,27 +1277,52 @@
 
 sub blog
   {
-  # calculate $x = $a ** $base + $b and return $a (e.g. the log() to base
-  # $base of $x)
+  # Return the logarithm of the operand. If a second operand is defined, that
+  # value is used as the base, otherwise the base is assumed to be Euler's
+  # constant.
+
+  # Don't objectify the base, since an undefined base, as in $x->blog() or
+  # $x->blog(undef) signals that the base is Euler's number.
 
   # set up parameters
   my ($self,$x,$base,@r) = (undef,@_);
   # objectify is costly, so avoid it
-  if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
-    {
-    ($self,$x,$base,@r) = objectify(2,@_);
-    }
+  if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1]))) {
+      ($self,$x,$base,@r) = objectify(1,@_);
+  }
 
   return $x if $x->modify('blog');
 
-  $base = $self->new($base) if defined $base && !ref $base;
+  # Handle all exception cases and all trivial cases. I have used Wolfram Alpha
+  # (http://www.wolframalpha.com) as the reference for these cases.
+
+  return $x -> bnan() if $x -> is_nan();
+
+  if (defined $base) {
+      $base = $self -> new($base) unless ref $base;
+      if ($base -> is_nan() || $base -> is_one()) {
+          return $x -> bnan();
+      } elsif ($base -> is_inf() || $base -> is_zero()) {
+          return $x -> bnan() if $x -> is_inf() || $x -> is_zero();
+          return $x -> bzero();
+      } elsif ($base -> is_negative()) {            # -inf < base < 0
+          return $x -> bzero() if $x -> is_one();   #     x = 1
+          return $x -> bone()  if $x == $base;      #     x = base
+          return $x -> bnan();                      #     otherwise
+      }
+      return $x -> bone() if $x == $base;           # 0 < base && 0 < x < inf
+  }
+
+  # We now know that the base is either undefined or >= 2 and finite.
+
+  return $x -> binf('+') if $x -> is_inf();         #   x = +/-inf
+  return $x -> bnan()    if $x -> is_neg();         #   -inf < x < 0
+  return $x -> bzero()   if $x -> is_one();         #   x = 1
+  return $x -> binf('-') if $x -> is_zero();        #   x = 0
 
-  # inf, -inf, NaN, <0 => NaN
-  return $x->bnan()
-   if $x->{sign} ne '+' || (defined $base && $base->{sign} ne '+');
+  # At this point we are done handling all exception cases and trivial cases.
 
-  return $upgrade->blog($upgrade->new($x),$base,@r) if 
-    defined $upgrade;
+  return $upgrade -> blog($upgrade -> new($x), $base, @r) if defined $upgrade;
 
   # fix for bug #24969:
   # the default base is e (Euler's number) which is not an integer
@@ -1312,7 +1337,7 @@
     }
 
   my ($rc,$exact) = $CALC->_log_int($x->{value},$base->{value});
-  return $x->bnan() unless defined $rc;                # not possible to take 
log?
+  return $x->bnan() unless defined $rc;         # not possible to take log?
   $x->{value} = $rc;
   $x->round(@r);
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/bare_mbf.t 
new/Math-BigInt-1.999703/t/bare_mbf.t
--- old/Math-BigInt-1.999701/t/bare_mbf.t       2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/bare_mbf.t       2015-09-17 14:16:31.000000000 
+0200
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 2340;
+use Test::More tests => 2360;
 
 BEGIN { unshift @INC, 't'; }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/bare_mbi.t 
new/Math-BigInt-1.999703/t/bare_mbi.t
--- old/Math-BigInt-1.999701/t/bare_mbi.t       2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/bare_mbi.t       2015-09-19 13:20:18.000000000 
+0200
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 3649;
+use Test::More tests => 3701;
 
 BEGIN { unshift @INC, 't'; }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/bigfltpm.inc 
new/Math-BigInt-1.999703/t/bigfltpm.inc
--- old/Math-BigInt-1.999701/t/bigfltpm.inc     2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/bigfltpm.inc     2015-09-20 13:19:53.000000000 
+0200
@@ -60,6 +60,9 @@
       # some unary ops (test the fxxx form, since that is done by AUTOLOAD)
       } elsif ($f =~ /^f(nan|sstr|neg|floor|ceil|int|abs)$/) {
         $try .= "\$x->f$1();";
+      # overloaded functions
+      } elsif ($f =~ /^(log|exp|sin|cos|atan2|int|neg|abs|sqrt)$/) {
+        $try .= "\$x = $f(\$x);";
       # some is_xxx test function      
       } elsif ($f =~ /^is_(zero|one|negative|positive|odd|even|nan|int)$/) {
         $try .= "\$x->$f();";
@@ -499,16 +502,16 @@
 7:0:1
 2:1:2
 &flog
-0::NaN
+0::-inf
 -1::NaN
 -2::NaN
 # base > 0, base != 1
 2:-1:NaN
-2:0:NaN
+2:0:0
 2:1:NaN
-# log(1) is always 1, regardless of $base
+# log(1)
 1::0
-1:1:0
+1:1:NaN
 1:2:0
 2::0.6931471805599453094172321214581765680755
 2.718281828::0.9999999998311266953289851340574956564911
@@ -1834,3 +1837,23 @@
 -51.2:-51
 12.2:12
 -0.4:0
+# overloaded functions
+&log
+-1:NaN
+0:-inf
+1:0
+2:0.6931471805599453094172321214581765680755
+3:1.098612288668109691395245236922525704647
+123456789:18.63140176616801803319393334796320420971
+1234567890987654321:41.657252696908474880343847955484513481
+-inf:inf
+inf:inf
+NaN:NaN
+&exp
+&sin
+&cos
+&atan2
+&int
+&neg
+&abs
+&sqrt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/bigfltpm.t 
new/Math-BigInt-1.999703/t/bigfltpm.t
--- old/Math-BigInt-1.999701/t/bigfltpm.t       2015-09-10 13:28:05.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/bigfltpm.t       2015-09-17 14:16:31.000000000 
+0200
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 2340
+use Test::More tests => 2360
     + 5;               # own tests
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/bigintpm.inc 
new/Math-BigInt-1.999703/t/bigintpm.inc
--- old/Math-BigInt-1.999701/t/bigintpm.inc     2015-09-10 13:32:38.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/bigintpm.inc     2015-09-19 13:18:50.000000000 
+0200
@@ -75,6 +75,9 @@
   # some unary ops
    } elsif ($f =~ 
/^b(nan|floor|ceil|int|sstr|neg|abs|sgn|inc|dec|not|sqrt|fac)$/) {
     $try .= "\$x->$f();";
+  # overloaded functions
+   } elsif ($f =~ /^(log|exp|sin|cos|atan2|int|neg|abs|sqrt)$/) {
+    $try .= "\$x = $f(\$x);";
    } elsif ($f =~ /^(numify|length|stringify|as_hex|as_bin)$/) {
     $try .= "\$x->$f();";
    } elsif ($f eq "exponent"){
@@ -749,18 +752,40 @@
 &^=
 5:7:2
 &blog
+#
 NaNlog:2:NaN
 122:NaNlog:NaN
 NaNlog1:NaNlog:NaN
-122:inf:NaN
-inf:122:NaN
-122:-inf:NaN
--inf:122:NaN
+#
+122:inf:0
+inf:122:inf
+122:-inf:0
+-inf:122:inf
 -inf:-inf:NaN
-inf:inf:NaN
-0:4:NaN
+0:4:-inf
 -21:4:NaN
 21:-21:NaN
+#
+0:-inf:NaN
+0:-1:NaN
+0:0:NaN
+0:1:NaN
+0:inf:NaN
+#
+1:-inf:0
+1:-1:0
+1:0:0
+1:1:NaN
+1:4:0
+1:inf:0
+#
+inf:-inf:NaN
+inf:-1:NaN
+inf:0:NaN
+inf:1:NaN
+inf:4:inf
+inf:inf:NaN
+#
 # normal results
 1024:2:10
 81:3:4
@@ -768,6 +793,7 @@
 82:3:4
 # 3.9... truncate
 80:3:3
+4096:2:12
 15625:5:6
 15626:5:6
 15624:5:5
@@ -785,7 +811,6 @@
 144115188075855872:2:57
 288230376151711744:2:58
 576460752303423488:2:59
-4096:2:12
 1329227995784915872903807060280344576:2:120
 # $x == $base => result 1
 3:3:1
@@ -2709,3 +2734,23 @@
 +inf:inf
 -inf:-inf
 NaNas_bin:NaN
+# overloaded functions
+&log
+-1:NaN
+0:-inf
+1:0
+2:0
+3:1
+123456789:18
+1234567890987654321:41
+-inf:inf
+inf:inf
+NaN:NaN
+&exp
+&sin
+&cos
+&atan2
+&int
+&neg
+&abs
+&sqrt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/bigintpm.t 
new/Math-BigInt-1.999703/t/bigintpm.t
--- old/Math-BigInt-1.999701/t/bigintpm.t       2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/bigintpm.t       2015-09-19 13:20:18.000000000 
+0200
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 3649 + 6;
+use Test::More tests => 3701 + 6;
 
 use Math::BigInt lib => 'Calc';
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/biglog.t 
new/Math-BigInt-1.999703/t/biglog.t
--- old/Math-BigInt-1.999701/t/biglog.t 2015-09-10 12:27:09.000000000 +0200
+++ new/Math-BigInt-1.999703/t/biglog.t 2015-09-17 11:03:30.000000000 +0200
@@ -20,14 +20,14 @@
 my $cl = "Math::BigInt";
 
 #############################################################################
-# test log($n) in BigInt (broken until 1.80)
+# test $n->blog() in BigInt (broken until 1.80)
 
 is ($cl->new(2)->blog(), '0', "blog(2)");
 is ($cl->new(288)->blog(), '5',"blog(288)");
 is ($cl->new(2000)->blog(), '7', "blog(2000)");
 
 #############################################################################
-# test exp($n) in BigInt
+# test $n->bexp() in BigInt
 
 is ($cl->new(1)->bexp(), '2', "bexp(1)");
 is ($cl->new(2)->bexp(), '7',"bexp(2)");
@@ -38,7 +38,7 @@
 # BigFloat tests
 
 #############################################################################
-# test log(2, N) where N > 67 (broken until 1.82)
+# test $n->blog(undef, N) where N > 67 (broken until 1.82)
 
 $cl = "Math::BigFloat";
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/blog-mbf.t 
new/Math-BigInt-1.999703/t/blog-mbf.t
--- old/Math-BigInt-1.999701/t/blog-mbf.t       1970-01-01 01:00:00.000000000 
+0100
+++ new/Math-BigInt-1.999703/t/blog-mbf.t       2015-09-20 12:04:04.000000000 
+0200
@@ -0,0 +1,264 @@
+#!perl
+
+BEGIN {
+    unless ($ENV{AUTHOR_TESTING}) {
+        require Test::More;
+        Test::More::plan(skip_all => 'these tests are for release candidate 
testing');
+    }
+}
+
+use strict;
+use warnings;
+
+use Test::More tests => 139;
+use Scalar::Util qw< refaddr >;
+
+my $class;
+
+BEGIN { $class = 'Math::BigFloat'; }
+BEGIN { use_ok($class) }
+
+while (<DATA>) {
+    s/\s+\z//;
+    next if /^#/ || ! /\S/;
+
+    # $in0 - the x value
+    # $in1 - the base
+    # $out0 - the wanted output value
+    # $type - the type of the wanted number (real, non-real, ...)
+    # $expr - mathematical expression of the wanted number
+
+    my ($in0, $in1, $out0, $type, $expr) = split /:/;
+
+    # Some of the test data use rational numbers.
+    # - with Math::BigInt, we skip them
+    # - with Math::BigFloat, we convert them to floats
+    # - with Math::BigRat, we use them as they are
+
+    $in0  = eval $in0  if $in0  =~ m|/|;
+    $in1  = eval $in1  if $in1  =~ m|/|;
+    $out0 = eval $out0 if $out0 =~ m|/|;
+
+    my ($x, $y);        # input values as objects
+    my ($yo);           # copy of input value
+    my ($got);          # test output
+
+    my $test = qq|\$x = $class -> new("$in0"); | .
+               qq|\$y = $class -> new("$in1"); | .
+               qq|\$yo = \$y -> copy(); | .
+               qq|\$got = \$x -> blog(\$y);|;
+
+    my $desc = "logarithm of $in0 to base $in1";
+
+    print("#\n",
+          "# Now about to execute the following test.\n",
+          "#\n",
+          "# $test\n",
+          "#\n");
+
+    if ($in0 ne 'NaN' && $in1 ne 'NaN') {
+        print("# Enter log($in1, $in0) into Wolfram Alpha",
+              " (http://www.wolframalpha.com/), and it says that the result",
+              " is ", length($type) ? $type : "real",
+              length($expr) ? ": $expr" : "",
+              ".", "\n",
+              "#\n");
+    }
+
+    eval $test;
+    die $@ if $@;       # this should never happen
+
+    subtest $desc, sub {
+        plan tests => 5,
+
+        # Check output.
+
+        is(ref($got), $class, "output arg is a $class");
+        is($got, $out0, 'output arg has the right value');
+        is(refaddr($got), refaddr($x), 'output arg is the invocand');
+
+        # The second argument (if the invocand is the first) shall *not* be
+        # modified.
+
+        is(ref($y), $class, "second input arg is still a $class");
+        is_deeply($y, $yo, 'second output arg is unmodified');
+
+    };
+
+}
+
+__END__
+
+# base = -inf
+
+-inf:-inf:NaN:undefined:
+-4:-inf:0::
+-2:-inf:0::
+-1:-inf:0::
+-1/2:-inf:0::
+0:-inf:NaN:undefined:
+1/2:-inf:0::
+1:-inf:0::
+2:-inf:0::
+4:-inf:0::
+inf:-inf:NaN:undefined:
+NaN:-inf:NaN:undefined:
+
+# base = -4
+
+-4:-4:1::
+-2:-4:NaN:non-real and finite:(log(2)+i pi)/(log(4)+i pi)
+0:-4:NaN:non-real (directed) infinity:(-sqrt(pi^2+log^2(4))/(log(4)+i 
pi))infinity
+1/2:-4:NaN:non-real and finite:-(log(2))/(log(4)+i pi)
+1:-4:0::
+2:-4:NaN:non-real and finite:(log(2))/(log(4)+i pi)
+4:-4:NaN:non-real and finite:(log(4))/(log(4)+i pi)
+NaN:-4:NaN:undefined:
+
+# base = -2
+
+-inf:-2:NaN:non-real (directed) infinity:sqrt(pi^2+log^2(2))/(log(2)+i 
pi)infinity
+-4:-2:NaN:non-real and finite:(log(4)+i pi)/(log(2)+i pi)
+-2:-2:1::
+-1:-2:NaN:non-real and finite:(i pi)/(log(2)+i pi)
+-1/2:-2:NaN:non-real and finite:(-log(2)+i pi)/(log(2)+i pi)
+0:-2:NaN:complex infinity:
+1/2:-2:NaN:non-real and finite:-(log(2))/(log(2)+i pi)
+1:-2:0::
+2:-2:NaN:non-real and finite:(log(2))/(log(2)+i pi)
+4:-2:NaN:non-real and finite:(log(4))/(log(2)+i pi)
+inf:-2:NaN:non-real (directed) infinity:
+NaN:-2:NaN:undefined:
+
+# base = -1
+
+-inf:-1:NaN:non-real (directed) infinity:
+-4:-1:NaN:non-real and finite:-(i (log(4)+i pi))/pi
+-2:-1:NaN:non-real and finite:-(i (log(2)+i pi))/pi
+-1:-1:1::
+-1/2:-1:NaN:non-real and finite:-(i (-log(2)+i pi))/pi
+0:-1:NaN:complex infinity:
+1:-1:0::
+1/2:-1:NaN:non-real and finite:(i log(2))/pi
+2:-1:NaN:non-real and finite:-(i log(2))/pi
+4:-1:NaN:non-real and finite:-(i log(4))/pi
+inf:-1:NaN:non-real (directed) infinity:
+NaN:-1:NaN:undefined:
+
+# base = -1/2
+
+-inf:-1/2:NaN:non-real (directed) infinity:
+-4:-1/2:NaN:non-real and finite:(log(4)+i pi)/(-log(2)+i pi)
+-2:-1/2:NaN:non-real and finite:(log(2)+i pi)/(-log(2)+i pi)
+-1:-1/2:NaN:non-real and finite:(i pi)/(-log(2)+i pi)
+-1/2:-1/2:1::
+0:-1/2:NaN:complex infinity:
+1:-1/2:0::
+1/2:-1/2:NaN:non-real and finite:-(log(2))/(-log(2)+i pi)
+2:-1/2:NaN:non-real and finite:(log(2))/(-log(2)+i pi)
+4:-1/2:NaN:non-real and finite:(log(4))/(-log(2)+i pi)
+inf:-1/2:NaN:non-real (directed) infinity:
+NaN:-1/2:NaN:undefined:
+
+# base = 0
+
+-inf:0:NaN:undefined:
+-4:0:0::
+-2:0:0::
+-1:0:0::
+-1/2:0:0::
+0:0:NaN:undefined:
+1/2:0:0::
+1:0:0::
+2:0:0::
+4:0:0::
+inf:0:NaN:undefined:
+NaN:0:NaN:undefined:
+
+# base = 1/2
+
+-inf:1/2:-inf::
+-2:-1/2:NaN:non-real and finite:(log(2)+i pi)/(-log(2)+i pi)
+-1:1/2:NaN:non-real and finite:-(i pi)/(log(2))
+-1/2:1/2:NaN:non-real and finite:-(-log(2)+i pi)/(log(2))
+0:1/2:inf::
+1/2:1/2:1::
+1:1/2:0::
+2:1/2:-1::
+inf:1/2:-inf::
+NaN:1/2:NaN:undefined:
+
+# base = 1
+
+-inf:1:NaN:complex infinity:
+-4:1:NaN:complex infinity:
+-2:1:NaN:complex infinity:
+-1:1:NaN:complex infinity:
+-1/2:1:NaN:complex infinity:
+0:1:NaN:complex infinity:
+1/2:1:NaN:complex infinity:
+1:1:NaN:undefined:
+2:1:NaN:complex infinity:
+4:1:NaN:complex infinity:
+inf:1:NaN:complex infinity:
+NaN:1:NaN:undefined:
+
+# base = 2
+
+-inf:2:inf::
+-4:2:NaN:non-real and finite:(log(4)+i pi)/(log(2))
+-2:2:NaN:non-real and finite:(log(2)+i pi)/(log(2))
+-1:2:NaN:non-real and finite:(i pi)/(log(2))
+-1/2:2:NaN:non-real and finite:(-log(2)+i pi)/(log(2))
+0:2:-inf::
+1/2:2:-1::
+1:2:0::
+2:2:1::
+4:2:2::
+4:4:1::
+inf:2:inf::
+NaN:2:NaN:undefined:
+
+# base = 4
+
+-inf:4:inf::
+-4:4:NaN:non-real and finite:(log(4)+i pi)/(log(4))
+-2:4:NaN:non-real and finite:(log(2)+i pi)/(log(4))
+-1/2:4:NaN:non-real and finite:(-log(2)+i pi)/(log(4))
+0:4:-inf::
+1:4:0::
+1/2:4:-1/2::
+2:4:1/2::
+4:4:1::
+inf:4:inf::
+NaN:4:NaN:undefined:
+
+# base = inf
+
+-inf:inf:NaN:undefined:
+-4:inf:0::
+-2:inf:0::
+-1:inf:0::
+-1/2:inf:0::
+0:inf:NaN:undefined:
+1:inf:0::
+1/2:inf:0::
+2:inf:0::
+4:inf:0::
+inf:inf:NaN:undefined:
+NaN:inf:NaN:undefined:
+
+# base is NaN
+
+-inf:NaN:NaN:undefined:
+-4:NaN:NaN:undefined:
+-2:NaN:NaN:undefined:
+-1:NaN:NaN:undefined:
+-1/2:NaN:NaN:undefined:
+0:NaN:NaN:undefined:
+1:NaN:NaN:undefined:
+1/2:NaN:NaN:undefined:
+2:NaN:NaN:undefined:
+4:NaN:NaN:undefined:
+inf:NaN:NaN:undefined:
+NaN:NaN:NaN:undefined:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/blog-mbi.t 
new/Math-BigInt-1.999703/t/blog-mbi.t
--- old/Math-BigInt-1.999701/t/blog-mbi.t       1970-01-01 01:00:00.000000000 
+0100
+++ new/Math-BigInt-1.999703/t/blog-mbi.t       2015-09-20 12:04:04.000000000 
+0200
@@ -0,0 +1,264 @@
+#!perl
+
+BEGIN {
+    unless ($ENV{AUTHOR_TESTING}) {
+        require Test::More;
+        Test::More::plan(skip_all => 'these tests are for release candidate 
testing');
+    }
+}
+
+use strict;
+use warnings;
+
+use Test::More tests => 97;
+use Scalar::Util qw< refaddr >;
+
+my $class;
+
+BEGIN { $class = 'Math::BigInt'; }
+BEGIN { use_ok($class) }
+
+while (<DATA>) {
+    s/\s+\z//;
+    next if /^#/ || ! /\S/;
+
+    # $in0 - the x value
+    # $in1 - the base
+    # $out0 - the wanted output value
+    # $type - the type of the wanted number (real, non-real, ...)
+    # $expr - mathematical expression of the wanted number
+
+    my ($in0, $in1, $out0, $type, $expr) = split /:/;
+
+    # Some of the test data use rational numbers.
+    # - with Math::BigInt, we skip them
+    # - with Math::BigFloat, we convert them to floats
+    # - with Math::BigRat, we use them as they are
+
+    next if ($in0  =~ m|/| ||
+             $in1  =~ m|/| ||
+             $out0 =~ m|/|);
+
+    my ($x, $y);        # input values as objects
+    my ($yo);           # copy of input value
+    my ($got);          # test output
+
+    my $test = qq|\$x = $class -> new("$in0"); | .
+               qq|\$y = $class -> new("$in1"); | .
+               qq|\$yo = \$y -> copy(); | .
+               qq|\$got = \$x -> blog(\$y);|;
+
+    my $desc = "logarithm of $in0 to base $in1";
+
+    print("#\n",
+          "# Now about to execute the following test.\n",
+          "#\n",
+          "# $test\n",
+          "#\n");
+
+    if ($in0 ne 'NaN' && $in1 ne 'NaN') {
+        print("# Enter log($in1, $in0) into Wolfram Alpha",
+              " (http://www.wolframalpha.com/), and it says that the result",
+              " is ", length($type) ? $type : "real",
+              length($expr) ? ": $expr" : "",
+              ".", "\n",
+              "#\n");
+    }
+
+    eval $test;
+    die $@ if $@;       # this should never happen
+
+    subtest $desc, sub {
+        plan tests => 5,
+
+        # Check output.
+
+        is(ref($got), $class, "output arg is a $class");
+        is($got, $out0, 'output arg has the right value');
+        is(refaddr($got), refaddr($x), 'output arg is the invocand');
+
+        # The second argument (if the invocand is the first) shall *not* be
+        # modified.
+
+        is(ref($y), $class, "second input arg is still a $class");
+        is_deeply($y, $yo, 'second output arg is unmodified');
+
+    };
+
+}
+
+__END__
+
+# base = -inf
+
+-inf:-inf:NaN:undefined:
+-4:-inf:0::
+-2:-inf:0::
+-1:-inf:0::
+-1/2:-inf:0::
+0:-inf:NaN:undefined:
+1/2:-inf:0::
+1:-inf:0::
+2:-inf:0::
+4:-inf:0::
+inf:-inf:NaN:undefined:
+NaN:-inf:NaN:undefined:
+
+# base = -4
+
+-4:-4:1::
+-2:-4:NaN:non-real and finite:(log(2)+i pi)/(log(4)+i pi)
+0:-4:NaN:non-real (directed) infinity:(-sqrt(pi^2+log^2(4))/(log(4)+i 
pi))infinity
+1/2:-4:NaN:non-real and finite:-(log(2))/(log(4)+i pi)
+1:-4:0::
+2:-4:NaN:non-real and finite:(log(2))/(log(4)+i pi)
+4:-4:NaN:non-real and finite:(log(4))/(log(4)+i pi)
+NaN:-4:NaN:undefined:
+
+# base = -2
+
+-inf:-2:NaN:non-real (directed) infinity:sqrt(pi^2+log^2(2))/(log(2)+i 
pi)infinity
+-4:-2:NaN:non-real and finite:(log(4)+i pi)/(log(2)+i pi)
+-2:-2:1::
+-1:-2:NaN:non-real and finite:(i pi)/(log(2)+i pi)
+-1/2:-2:NaN:non-real and finite:(-log(2)+i pi)/(log(2)+i pi)
+0:-2:NaN:complex infinity:
+1/2:-2:NaN:non-real and finite:-(log(2))/(log(2)+i pi)
+1:-2:0::
+2:-2:NaN:non-real and finite:(log(2))/(log(2)+i pi)
+4:-2:NaN:non-real and finite:(log(4))/(log(2)+i pi)
+inf:-2:NaN:non-real (directed) infinity:
+NaN:-2:NaN:undefined:
+
+# base = -1
+
+-inf:-1:NaN:non-real (directed) infinity:
+-4:-1:NaN:non-real and finite:-(i (log(4)+i pi))/pi
+-2:-1:NaN:non-real and finite:-(i (log(2)+i pi))/pi
+-1:-1:1::
+-1/2:-1:NaN:non-real and finite:-(i (-log(2)+i pi))/pi
+0:-1:NaN:complex infinity:
+1:-1:0::
+1/2:-1:NaN:non-real and finite:(i log(2))/pi
+2:-1:NaN:non-real and finite:-(i log(2))/pi
+4:-1:NaN:non-real and finite:-(i log(4))/pi
+inf:-1:NaN:non-real (directed) infinity:
+NaN:-1:NaN:undefined:
+
+# base = -1/2
+
+-inf:-1/2:NaN:non-real (directed) infinity:
+-4:-1/2:NaN:non-real and finite:(log(4)+i pi)/(-log(2)+i pi)
+-2:-1/2:NaN:non-real and finite:(log(2)+i pi)/(-log(2)+i pi)
+-1:-1/2:NaN:non-real and finite:(i pi)/(-log(2)+i pi)
+-1/2:-1/2:1::
+0:-1/2:NaN:complex infinity:
+1:-1/2:0::
+1/2:-1/2:NaN:non-real and finite:-(log(2))/(-log(2)+i pi)
+2:-1/2:NaN:non-real and finite:(log(2))/(-log(2)+i pi)
+4:-1/2:NaN:non-real and finite:(log(4))/(-log(2)+i pi)
+inf:-1/2:NaN:non-real (directed) infinity:
+NaN:-1/2:NaN:undefined:
+
+# base = 0
+
+-inf:0:NaN:undefined:
+-4:0:0::
+-2:0:0::
+-1:0:0::
+-1/2:0:0::
+0:0:NaN:undefined:
+1/2:0:0::
+1:0:0::
+2:0:0::
+4:0:0::
+inf:0:NaN:undefined:
+NaN:0:NaN:undefined:
+
+# base = 1/2
+
+-inf:1/2:-inf::
+-2:-1/2:NaN:non-real and finite:(log(2)+i pi)/(-log(2)+i pi)
+-1:1/2:NaN:non-real and finite:-(i pi)/(log(2))
+-1/2:1/2:NaN:non-real and finite:-(-log(2)+i pi)/(log(2))
+0:1/2:inf::
+1/2:1/2:1::
+1:1/2:0::
+2:1/2:-1::
+inf:1/2:-inf::
+NaN:1/2:NaN:undefined:
+
+# base = 1
+
+-inf:1:NaN:complex infinity:
+-4:1:NaN:complex infinity:
+-2:1:NaN:complex infinity:
+-1:1:NaN:complex infinity:
+-1/2:1:NaN:complex infinity:
+0:1:NaN:complex infinity:
+1/2:1:NaN:complex infinity:
+1:1:NaN:undefined:
+2:1:NaN:complex infinity:
+4:1:NaN:complex infinity:
+inf:1:NaN:complex infinity:
+NaN:1:NaN:undefined:
+
+# base = 2
+
+-inf:2:inf::
+-4:2:NaN:non-real and finite:(log(4)+i pi)/(log(2))
+-2:2:NaN:non-real and finite:(log(2)+i pi)/(log(2))
+-1:2:NaN:non-real and finite:(i pi)/(log(2))
+-1/2:2:NaN:non-real and finite:(-log(2)+i pi)/(log(2))
+0:2:-inf::
+1/2:2:-1::
+1:2:0::
+2:2:1::
+4:2:2::
+4:4:1::
+inf:2:inf::
+NaN:2:NaN:undefined:
+
+# base = 4
+
+-inf:4:inf::
+-4:4:NaN:non-real and finite:(log(4)+i pi)/(log(4))
+-2:4:NaN:non-real and finite:(log(2)+i pi)/(log(4))
+-1/2:4:NaN:non-real and finite:(-log(2)+i pi)/(log(4))
+0:4:-inf::
+1:4:0::
+1/2:4:-1/2::
+2:4:1/2::
+4:4:1::
+inf:4:inf::
+NaN:4:NaN:undefined:
+
+# base = inf
+
+-inf:inf:NaN:undefined:
+-4:inf:0::
+-2:inf:0::
+-1:inf:0::
+-1/2:inf:0::
+0:inf:NaN:undefined:
+1:inf:0::
+1/2:inf:0::
+2:inf:0::
+4:inf:0::
+inf:inf:NaN:undefined:
+NaN:inf:NaN:undefined:
+
+# base is NaN
+
+-inf:NaN:NaN:undefined:
+-4:NaN:NaN:undefined:
+-2:NaN:NaN:undefined:
+-1:NaN:NaN:undefined:
+-1/2:NaN:NaN:undefined:
+0:NaN:NaN:undefined:
+1:NaN:NaN:undefined:
+1/2:NaN:NaN:undefined:
+2:NaN:NaN:undefined:
+4:NaN:NaN:undefined:
+inf:NaN:NaN:undefined:
+NaN:NaN:NaN:undefined:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/sub_mbf.t 
new/Math-BigInt-1.999703/t/sub_mbf.t
--- old/Math-BigInt-1.999701/t/sub_mbf.t        2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/sub_mbf.t        2015-09-17 14:18:08.000000000 
+0200
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 2340
+use Test::More tests => 2360
     + 6;       # + our own tests
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/sub_mbi.t 
new/Math-BigInt-1.999703/t/sub_mbi.t
--- old/Math-BigInt-1.999701/t/sub_mbi.t        2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/sub_mbi.t        2015-09-19 13:20:16.000000000 
+0200
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More tests => 3649
+use Test::More tests => 3701
     + 5;       # +5 own tests
 
 BEGIN { unshift @INC, 't'; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999701/t/with_sub.t 
new/Math-BigInt-1.999703/t/with_sub.t
--- old/Math-BigInt-1.999701/t/with_sub.t       2015-08-12 16:08:40.000000000 
+0200
+++ new/Math-BigInt-1.999703/t/with_sub.t       2015-09-17 14:19:16.000000000 
+0200
@@ -3,7 +3,7 @@
 # Test use Math::BigFloat with => 'Math::BigInt::SomeSubclass';
 
 use strict;
-use Test::More tests => 2340 + 1;
+use Test::More tests => 2360 + 1;
 
 use Math::BigFloat with => 'Math::BigInt::Subclass', lib => 'Calc';
 


Reply via email to