Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Math-BigInt for 
openSUSE:Factory checked in at 2023-04-03 17:47:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Math-BigInt (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Math-BigInt.new.9019 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Math-BigInt"

Mon Apr  3 17:47:24 2023 rev:45 rq:1076999 version:1.999838

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Math-BigInt/perl-Math-BigInt.changes        
2022-07-05 12:09:57.748598291 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Math-BigInt.new.9019/perl-Math-BigInt.changes  
    2023-04-03 17:47:37.066902384 +0200
@@ -1,0 +2,12 @@
+Sat Apr  1 03:07:57 UTC 2023 - Tina Müller <timueller+p...@suse.de>
+
+- updated to 1.999838
+   see /usr/share/doc/packages/perl-Math-BigInt/CHANGES
+
+  1.999838 2023-03-30
+
+   * Fix CPAN RT #146411 regarding infinite recursion in bitwise operations. 
This
+     happened when arguments were upgraded and downgraded and upgraded again ad
+     infinitum. Add tests to verify the fix.
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ perl-Math-BigInt.spec ++++++
--- /var/tmp/diff_new_pack.6ZGlgI/_old  2023-04-03 17:47:37.594906274 +0200
+++ /var/tmp/diff_new_pack.6ZGlgI/_new  2023-04-03 17:47:37.598906304 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Math-BigInt
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %define cpan_name Math-BigInt
 Name:           perl-Math-BigInt
-Version:        1.999837
+Version:        1.999838
 Release:        0
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Arbitrary size integer math package

++++++ Math-BigInt-1.999837.tar.gz -> Math-BigInt-1.999838.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/CHANGES 
new/Math-BigInt-1.999838/CHANGES
--- old/Math-BigInt-1.999837/CHANGES    2022-07-02 14:19:56.000000000 +0200
+++ new/Math-BigInt-1.999838/CHANGES    2023-03-31 14:30:21.000000000 +0200
@@ -1,3 +1,9 @@
+1.999838 2023-03-30
+
+ * Fix CPAN RT #146411 regarding infinite recursion in bitwise operations. This
+   happened when arguments were upgraded and downgraded and upgraded again ad
+   infinitum. Add tests to verify the fix.
+
 1.999837 2022-07-02
 
  * Improve the interoperability between objects of different classes for the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/META.json 
new/Math-BigInt-1.999838/META.json
--- old/Math-BigInt-1.999837/META.json  2022-07-02 18:38:08.000000000 +0200
+++ new/Math-BigInt-1.999838/META.json  2023-03-31 16:17:18.000000000 +0200
@@ -4,7 +4,7 @@
       "Peter John Acklam <pjack...@gmail.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "perl_5"
    ],
@@ -50,6 +50,6 @@
          "web" : "https://github.com/pjacklam/p5-Math-BigInt";
       }
    },
-   "version" : "1.999837",
-   "x_serialization_backend" : "JSON::PP version 4.09"
+   "version" : "1.999838",
+   "x_serialization_backend" : "JSON::PP version 4.16"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/META.yml 
new/Math-BigInt-1.999838/META.yml
--- old/Math-BigInt-1.999837/META.yml   2022-07-02 18:38:05.000000000 +0200
+++ new/Math-BigInt-1.999838/META.yml   2023-03-31 16:17:14.000000000 +0200
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '6.58'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,5 +24,5 @@
   perl: '5.006001'
 resources:
   repository: https://github.com/pjacklam/p5-Math-BigInt.git
-version: '1.999837'
+version: '1.999838'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/SIGNATURE 
new/Math-BigInt-1.999838/SIGNATURE
--- old/Math-BigInt-1.999837/SIGNATURE  2022-07-02 18:38:16.000000000 +0200
+++ new/Math-BigInt-1.999838/SIGNATURE  2023-03-31 16:17:27.000000000 +0200
@@ -15,15 +15,15 @@
 Hash: RIPEMD160
 
 SHA256 961f8c23b6fc94cb9766265257dd548b190087df0c71dfd7d994bc649af5f002 BUGS
-SHA256 ff6e661bb85121620f7afce30a73f12cc1816ab0341b88647a446bafd9c58b38 CHANGES
+SHA256 9b432465325ff89dc74a6149b45f99c76a4184d4cf8220ca67a0eb8205c7d711 CHANGES
 SHA256 7d84c6e69ee6c3ab6301314d2fa4bc233f24bd36a4a546b2cfd05a078bda98b7 CREDITS
 SHA256 fd8f78318c23adef95971cc01ee0e79d68f52f60b761ba28129c8509fff46954 GOALS
 SHA256 28e80ee628ff111dd34a2a26af921693c9c823caadab30c848e4c4f4fc00830f HISTORY
 SHA256 b857edab549ac6893e2df5e1ec768ee46b62bcf1607a55e876f4d23f079eacce LICENSE
 SHA256 eff8d9db8aa0fe02bc74643e8fdea5aaf423cd885e67d1d046526b903d4397b8 
MANIFEST
 SHA256 6cbc650165422bed661f292abb91ffaefa416830203a2aa8c790114ce6535cde 
MANIFEST.SKIP
-SHA256 304e19de0dded923fe216259e271491b1692d2c657266d66d7cced67f515ae30 
META.json
-SHA256 f6ce709213efe573904d1586ea91302b4eabd970ef6bb673948bb46db4295571 
META.yml
+SHA256 a1dc6acf784a5a6bb73f6b8ac1dfc6fcd83fbb55c9f8f5e0f035b82511d4f42c 
META.json
+SHA256 035d8a88fbc630bb729ecb63df5c6ca99d9fc3db8ee7b70627070e73e04b690f 
META.yml
 SHA256 053b2511fa5ac8e6141b5596d6777220ef257a5ddfda3f3ff7325907757660a7 
Makefile.PL
 SHA256 99f7f7df45a00c9f19ad38edec8c5dad5f5977c2b1a14ac3bb491ac193db1f7d NEW
 SHA256 2aadb8383836311d8b47a34b7eb1c68043ccd5b90bfc2d9c57016b33579d2385 README
@@ -32,10 +32,10 @@
 SHA256 77a80748e329a042faaa91eb0b44a493dfdfd726fec854a1a376c8404324b485 
examples/1000.txt
 SHA256 702e323f59be58db758a3fa70ffe5fb80d392043bb855b0f172dd748809435df 
examples/bigprimes.pl
 SHA256 81a3ff3476038ec839c12a2b3548898055112bebc81fbf3513ee5efd6adfd0bd 
examples/prime.pl
-SHA256 28e278e80e9f8c95f98bcb4d651a6c08bd8396045a8ae8aaba4ce58a9b8d0ae0 
lib/Math/BigFloat.pm
-SHA256 33a11cba8142b98f60ad00c38a5f759ef77559b55d875af2dc05a2bdc4c73cd5 
lib/Math/BigInt.pm
-SHA256 41959673347331a1a89653a9cd537355c9f0f0e18c69938393c49c47250deec1 
lib/Math/BigInt/Calc.pm
-SHA256 f354275521f3a6d3e3359d18ed27278ea4259d45ac604ffd05cd29af033c91fa 
lib/Math/BigInt/Lib.pm
+SHA256 2d8b8439445754dff1ec3871279b20fb807944d59b13e962e3beb5d99e8077fc 
lib/Math/BigFloat.pm
+SHA256 eadf4ebf7e263b816676b3b83625b4ac6622cab3e6270cd738e4dee12864f0bc 
lib/Math/BigInt.pm
+SHA256 0a5031476e2e649e9fb2bbeaf8bb1296bcc1a9f37a8b3389967bca793da76fbb 
lib/Math/BigInt/Calc.pm
+SHA256 31c7eb01a7517a96acadcffa0001ee0340c492384b390c3c90f9ba1cfd188172 
lib/Math/BigInt/Lib.pm
 SHA256 f855e68d0f171debf8369ead8b36d004188f1c9069287a0d3c67a87f9afb1312 
t/00sig.t
 SHA256 64c07f96b6a1d6adb075f40bf2dc496fd7951b653458bd9f826e4f76f8e5423d 
t/01load.t
 SHA256 a756e0bc9a221303e562d0f25969965962e6121605ee9bb0ee3cb54e69dd2222 
t/Math/BigFloat/Subclass.pm
@@ -71,7 +71,7 @@
 SHA256 bb5c7625cf1ee256e05e9997f1300b6ccddda3b60e60552ecf9aad197cef669f 
t/mbi_ali.t
 SHA256 c54763f1221b8b5ff3a262b1a7405c686f87197932f11f401fd52f0d4e6d7718 
t/mbi_rand.t
 SHA256 38b8514632ee9b9190862914678406bd4861c2b808d2eb4f3333d509066a74a8 
t/mbimbf.inc
-SHA256 a0164f4c021c85769b2bc1a871f1ed425ca82b86845380261fe2692822a3e99d 
t/mbimbf.t
+SHA256 d64300e6afc48bc76b65f25fffdbaea2e5c99ea6019eb93e7696fd1db5f0fb2d 
t/mbimbf.t
 SHA256 c6631d5efdc13d02d6e90bde8f3705ac1ae3d90bd6a6c337b71bced9e88585cb 
t/nan_cmp.t
 SHA256 9926011c771c07a60479a1ef9fdb2370670352c3fca14d2a7d71857e4c6b44ad 
t/new_overloaded.t
 SHA256 53558719e3d79cabe13c718e31262e5b970b02a475f204d0d3209b1cd369eb4d 
t/req_mbf0.t
@@ -88,8 +88,8 @@
 SHA256 a6c9732bef6db595fee11f0a8cd5254681858df9bd2eb796ca6016d8b6fcba72 
t/sub_mbi.t
 SHA256 e77752e001d0a5650d815d4221bb1de2d27e821df0a246bec8e6fb21ba261228 
t/sub_mif.t
 SHA256 733212fb1e51087fbbd66327659d4b4495f1464b3c19fd5069ab5cfdbcf5cec1 
t/trap.t
-SHA256 e096499eafaa38e20c5dce76b8214ae9b7da4a2a9101ad115e836701b1271f11 
t/upgrade.inc
-SHA256 ee981278ee767320db4056632aaabae54fc181a58dccdf5923499d90c5b3843c 
t/upgrade.t
+SHA256 9c4401cb4c608b7edeaf7db4715405faa5f9d970ecf787a4566ca6fba1a39b81 
t/upgrade.inc
+SHA256 c6eebb0f9f32a9639e536555aaa51884e3753b622ce594df91a687bc1deaf190 
t/upgrade.t
 SHA256 2954aba78a6bd8e66f00f0454b450bdcb128c16033a124046e0215c883a25ab5 
t/upgrade2.t
 SHA256 01b543fd9de9aacb54d5d4c64479a064e9c5e3050f9f79b88c0d8d5d2d858f4a 
t/upgradef.t
 SHA256 abb78d9e1b5f3bbb798f28050130d1fe03bfe61e6a8cb2110ea12795a1d5a850 t/use.t
@@ -320,7 +320,7 @@
 SHA256 aaed59450d1d267018e70889d9b47bed046298b74514d0a837f9c6ab5f429b52 
xt/author/objectify-mbf.t
 SHA256 82dcd68d49b9dc8d931c6b1f132431545b3addf7d137074b26e23b0451dec650 
xt/author/objectify-mbi.t
 SHA256 291a9d9b311a223e7790640c436f8f5bcc03380b63bb587aad08d8d793905ef8 
xt/author/relop-mbi-mbf.t
-SHA256 337d3eafa8653e03f007cc1774ec08b709061c92b4e6b80283e562ad89913a83 
xt/author/sparts-mbf.t
+SHA256 5ed9f43664572474dfeb67b4966fb0e10fa237ca36df29ecbf727307a18b3b06 
xt/author/sparts-mbf.t
 SHA256 7fb4d9612d591694d3db8ae1cb5549fcec42bbec4a13957bbc2d514388610fe3 
xt/author/sparts-mbi.t
 SHA256 697e650c97e0da6e80f3fabc23a1acc47cc647559a8666f8c21094a05dbeb0e6 
xt/author/to_base-mbi.t
 SHA256 aca767e64ac49a5f48a93132ae175d3cc451c332232cb3aae157d36784b49ab7 
xt/author/to_base_num-mbi.t
@@ -342,11 +342,11 @@
 SHA256 7aa223732dec88d581e015ac171308b256a9d061ea3c832ad4f7048266226e97 
xt/release/whitespaces.t
 -----BEGIN PGP SIGNATURE-----
 
-iQEcBAEBAwAGBQJiwHR1AAoJEGcmPl2fr166mH4H/ikWsk/0rAUNMpTaVi56L6/V
-mNraTQrKLhCSKcR0QWrz00zCE/bigNNaA2QAsCOGqRH4kb1KGVufHTqHLTaGa6iM
-IPoG+P6+EJpgD+YLrGfEOZ/4b3T1Ylk6EXqAXZiqhCDXVFgb51NH7hyXZoV54kpQ
-estrTp+EYvKmICBPO9k9zhu5NN/NnRKvDAv+bf3MOpepTrZO/M/gKLNm19TadLgh
-lRFEzpzdff51RfzJP0uFROY9yThO75kLGp9OslskfXtb4gqJ+vN/ZTR8mVdDST5p
-dlXntbESHDLdt6Sl50qHZF7W1VNIq3aOctN+rBwunwweScmPAbpbece7hAO6hkc=
-=NSnp
+iQEcBAEBAwAGBQJkJut0AAoJEGcmPl2fr166mmUH/ArOOsdbdiv0BpsfCNRnujat
+1j3/ZbdPquZeQfrhhTv19S/OnvEJfMNQC23hfONlKYwP++n8uTbaQb6m8++IMEbV
+9C2SUIbqBiNqEI32c8+e0+1u8tfqKmF5DQXrrCzpF3+vsJ7BOGayVNGtW5Bl4wY0
+QZq+U4n4NUlWAqsQYMQGgoYNjo9tdxcS2xAP0JK+JjrUEeySuTNWtNKkuxSak8LR
+CL4lQtGsbOngJ5VaCK5RTEDA+Ly+OO/Y7ulQWenfV13JgoMULXZIehP896fAiydc
+YOi4uxPsamP+TgVU9rXlT4GL56QmVMtjVVTCrKrLIb/55BXymckBGDMByPd2e+k=
+=lbuf
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/lib/Math/BigFloat.pm 
new/Math-BigInt-1.999838/lib/Math/BigFloat.pm
--- old/Math-BigInt-1.999837/lib/Math/BigFloat.pm       2022-07-02 
14:15:22.000000000 +0200
+++ new/Math-BigInt-1.999838/lib/Math/BigFloat.pm       2023-03-31 
13:30:02.000000000 +0200
@@ -20,7 +20,7 @@
 use Scalar::Util  qw< blessed >;
 use Math::BigInt  qw< >;
 
-our $VERSION = '1.999837';
+our $VERSION = '1.999838';
 $VERSION =~ tr/_//d;
 
 require Exporter;
@@ -2189,16 +2189,16 @@
 
     # shortcut to not run through _find_round_parameters again
     if (defined $params[0]) {
-        delete $x->{_a};               # clear before round
+        $x->{_a} = undef;               # clear before round
         $x = $x->bround($params[0], $params[2]); # then round accordingly
     } else {
-        delete $x->{_p};                # clear before round
+        $x->{_p} = undef;               # clear before round
         $x = $x->bfround($params[1], $params[2]); # then round accordingly
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
 
     if (wantarray) {
@@ -2208,8 +2208,8 @@
         }
         if ($fallback) {
             # clear a/p after round, since user did not request it
-            delete $rem->{_a};
-            delete $rem->{_p};
+            $rem->{_a} = undef;
+            $rem->{_p} = undef;
         }
         $x = $downgrade -> new($x -> bdstr(), @r)
           if defined($downgrade) && $x -> is_int();
@@ -2565,8 +2565,8 @@
     if ($done) {
         if ($fallback) {
             # clear a/p after round, since user did not request it
-            delete $x->{_a};
-            delete $x->{_p};
+            $x->{_a} = undef;
+            $x->{_p} = undef;
         }
         return $downgrade -> new($x -> bdstr(), @r)
           if defined($downgrade) && $x->is_int();
@@ -2584,8 +2584,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     $done = 0;
 
@@ -2626,8 +2626,8 @@
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
     # restore globals
     $$abr = $ab;
@@ -2688,8 +2688,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     # Disabling upgrading and downgrading is no longer necessary to avoid an
     # infinite recursion, but it avoids unnecessary upgrading and downgrading 
in
@@ -2810,8 +2810,8 @@
         }
     } else {
         # else just round the already computed result
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
         # shortcut to not run through _find_round_parameters again
         if (defined $params[0]) {
             $x = $x->bround($params[0], $params[2]); # then round accordingly
@@ -2821,8 +2821,8 @@
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
     # restore globals
     $$abr = $ab;
@@ -2910,8 +2910,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     # Disabling upgrading and downgrading is no longer necessary to avoid an
     # infinite recursion, but it avoids unnecessary upgrading and downgrading 
in
@@ -2926,8 +2926,8 @@
     my $sign = 1;               # start with -=
     my $below = $class->new(6);
     my $factorial = $class->new(4);
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     my $limit = $class->new("1E-". ($scale-1));
     while (1) {
@@ -2959,8 +2959,8 @@
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
     # restore globals
     $$abr = $ab;
@@ -3014,8 +3014,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     my $over = $x * $x;         # X ^ 2
     my $x2 = $over->copy();     # X ^ 2; difference between terms
@@ -3023,8 +3023,8 @@
     my $below = $class->new(2);
     my $factorial = $class->new(3);
     $x = $x->bone();
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     my $limit = $class->new("1E-". ($scale-1));
     #my $steps = 0;
@@ -3057,8 +3057,8 @@
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
     # restore globals
     $$abr = $ab;
@@ -3167,8 +3167,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     # Disabling upgrading and downgrading is no longer necessary to avoid an
     # infinite recursion, but it avoids unnecessary upgrading and downgrading 
in
@@ -3183,8 +3183,8 @@
     my $sign = 1;               # start with -=
     my $below = $class->new(3);
     my $two = $class->new(2);
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     my $limit = $class->new("1E-". ($scale-1));
     #my $steps = 0;
@@ -3225,8 +3225,8 @@
     }
     if ($fallback) {
         # Clear a/p after round, since user did not request it.
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
 
     # restore globals
@@ -3322,8 +3322,8 @@
     $y = $y -> round(@r);
 
     if ($fallback) {
-        delete $y->{_a};
-        delete $y->{_p};
+        $y->{_a} = undef;
+        $y->{_p} = undef;
     }
 
     return $y;
@@ -3380,8 +3380,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     # Disabling upgrading and downgrading is no longer necessary to avoid an
     # infinite recursion, but it avoids unnecessary upgrading and downgrading 
in
@@ -3414,8 +3414,8 @@
         }
         if ($fallback) {
             # clear a/p after round, since user did not request it
-            delete $x->{_a};
-            delete $x->{_p};
+            $x->{_a} = undef;
+            $x->{_p} = undef;
         }
         # re-enable A and P, upgrade is taken care of by "local"
         ${"$class\::accuracy"} = $ab;
@@ -3496,8 +3496,8 @@
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
     # restore globals
     $$abr = $ab;
@@ -3567,8 +3567,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     # Disabling upgrading and downgrading is no longer necessary to avoid an
     # infinite recursion, but it avoids unnecessary upgrading and downgrading 
in
@@ -3623,8 +3623,8 @@
         }
         if ($done == 0) {
             my $u = $class->bone()->bdiv($y, $scale+4);
-            delete $u->{_a};
-            delete $u->{_p};
+            $u->{_a} = undef;
+            $u->{_p} = undef;
             $x = $x->bpow($u, $scale+4);            # el cheapo
         }
     }
@@ -3638,8 +3638,8 @@
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
     # restore globals
     $$abr = $ab;
@@ -3856,16 +3856,18 @@
 
     return $x -> bnan(@r) if $x -> is_nan() || $y -> is_nan();
 
-    my $xtmp = Math::BigInt -> new($x -> bint());   # to Math::BigInt
-    $xtmp = $xtmp -> band($y);
+    my $xint = $x -> as_int();          # to Math::BigInt
+    my $yint = $y -> as_int();          # to Math::BigInt
 
-    return $xtmp -> round(@r) if defined $downgrade;
+    $xint = $xint -> band($yint);
 
-    $xtmp = $class -> new($xtmp);                   # back to Math::BigFloat
-    $x -> {sign} = $xtmp -> {sign};
-    $x -> {_m}   = $xtmp -> {_m};
-    $x -> {_es}  = $xtmp -> {_es};
-    $x -> {_e}   = $xtmp -> {_e};
+    return $xint -> round(@r) if defined $downgrade;
+
+    my $xflt = $class -> new($xint);    # back to Math::BigFloat
+    $x -> {sign} = $xflt -> {sign};
+    $x -> {_m}   = $xflt -> {_m};
+    $x -> {_es}  = $xflt -> {_es};
+    $x -> {_e}   = $xflt -> {_e};
 
     return $x -> round(@r);
 }
@@ -3879,16 +3881,18 @@
 
     return $x -> bnan(@r) if $x -> is_nan() || $y -> is_nan();
 
-    my $xtmp = Math::BigInt -> new($x -> bint());   # to Math::BigInt
-    $xtmp = $xtmp -> bior($y);
+    my $xint = $x -> as_int();          # to Math::BigInt
+    my $yint = $y -> as_int();          # to Math::BigInt
+
+    $xint = $xint -> bior($yint);
 
-    return $xtmp -> round(@r) if defined $downgrade;
+    return $xint -> round(@r) if defined $downgrade;
 
-    $xtmp = $class -> new($xtmp);                   # back to Math::BigFloat
-    $x -> {sign} = $xtmp -> {sign};
-    $x -> {_m}   = $xtmp -> {_m};
-    $x -> {_es}  = $xtmp -> {_es};
-    $x -> {_e}   = $xtmp -> {_e};
+    my $xflt = $class -> new($xint);    # back to Math::BigFloat
+    $x -> {sign} = $xflt -> {sign};
+    $x -> {_m}   = $xflt -> {_m};
+    $x -> {_es}  = $xflt -> {_es};
+    $x -> {_e}   = $xflt -> {_e};
 
     return $x -> round(@r);
 }
@@ -3902,16 +3906,18 @@
 
     return $x -> bnan(@r) if $x -> is_nan() || $y -> is_nan();
 
-    my $xtmp = Math::BigInt -> new($x -> bint());   # to Math::BigInt
-    $xtmp = $xtmp -> bxor($y);
+    my $xint = $x -> as_int();          # to Math::BigInt
+    my $yint = $y -> as_int();          # to Math::BigInt
+
+    $xint = $xint -> bxor($yint);
 
-    return $xtmp -> round(@r) if defined $downgrade;
+    return $xint -> round(@r) if defined $downgrade;
 
-    $xtmp = $class -> new($xtmp);                   # back to Math::BigFloat
-    $x -> {sign} = $xtmp -> {sign};
-    $x -> {_m}   = $xtmp -> {_m};
-    $x -> {_es}  = $xtmp -> {_es};
-    $x -> {_e}   = $xtmp -> {_e};
+    my $xflt = $class -> new($xint);    # back to Math::BigFloat
+    $x -> {sign} = $xflt -> {sign};
+    $x -> {_m}   = $xflt -> {_m};
+    $x -> {_es}  = $xflt -> {_es};
+    $x -> {_e}   = $xflt -> {_e};
 
     return $x -> round(@r);
 }
@@ -3923,16 +3929,16 @@
 
     return $x -> bnan(@r) if $x -> is_nan();
 
-    my $xtmp = Math::BigInt -> new($x -> bint());   # to Math::BigInt
-    $xtmp = $xtmp -> bnot();
+    my $xint = $x -> as_int();          # to Math::BigInt
+    $xint = $xint -> bnot();
 
-    return $xtmp -> round(@r) if defined $downgrade;
+    return $xint -> round(@r) if defined $downgrade;
 
-    $xtmp = $class -> new($xtmp);                   # back to Math::BigFloat
-    $x -> {sign} = $xtmp -> {sign};
-    $x -> {_m}   = $xtmp -> {_m};
-    $x -> {_es}  = $xtmp -> {_es};
-    $x -> {_e}   = $xtmp -> {_e};
+    my $xflt = $class -> new($xint);    # back to Math::BigFloat
+    $x -> {sign} = $xflt -> {sign};
+    $x -> {_m}   = $xflt -> {_m};
+    $x -> {_es}  = $xflt -> {_es};
+    $x -> {_e}   = $xflt -> {_e};
 
     return $x -> round(@r);
 }
@@ -3995,7 +4001,7 @@
     $m = $m->bround($scale, $mode);     # round mantissa
     $x->{_m} = $m->{value};             # get our mantissa back
     $x->{_a} = $scale;                  # remember rounding
-    delete $x->{_p};                    # and clear P
+    $x->{_p} = undef;                   # and clear P
 
     # bnorm() downgrades if necessary, so no need to check whether to 
downgrade.
     $x->bnorm();                # del trailing zeros gen. by bround()
@@ -4040,7 +4046,7 @@
     }
 
     $x->{_p} = $scale;          # remember round in any case
-    delete $x->{_a};            # and clear A
+    $x->{_a} = undef;           # and clear A
     if ($scale < 0) {
         # round right from the '.'
 
@@ -4394,17 +4400,13 @@
 
     # Finite number.
 
-    my $mant = $x -> copy();
+    my $mant = $class -> new($x);
     $mant->{_es} = '+';
     $mant->{_e}  = $LIB->_zero();
     $mant = $downgrade -> new($mant) if defined $downgrade;
     return $mant unless wantarray;
 
-    my $expo = bless { sign => $x -> {_es},
-                       _m   => $LIB->_copy($x -> {_e}),
-                       _es  => '+',
-                       _e   => $LIB->_zero(),
-                     }, $class;
+    my $expo = $class -> new($x -> {_es} . $LIB->_str($x -> {_e}));
     $expo = $downgrade -> new($expo) if defined $downgrade;
     return ($mant, $expo);
 }
@@ -5520,8 +5522,8 @@
 
         last if $next->bacmp($limit) <= 0;
 
-        delete $next->{_a};
-        delete $next->{_p};
+        $next->{_a} = undef;
+        $next->{_p} = undef;
         $x = $x->badd($next);
         # calculate things for the next term
         $over *= $u;
@@ -5792,8 +5794,8 @@
     $$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
-    delete $x->{_a};
-    delete $x->{_p};
+    $x->{_a} = undef;
+    $x->{_p} = undef;
 
     # Disabling upgrading and downgrading is no longer necessary to avoid an
     # infinite recursion, but it avoids unnecessary upgrading and downgrading 
in
@@ -5843,8 +5845,8 @@
     }
     if ($fallback) {
         # clear a/p after round, since user did not request it
-        delete $x->{_a};
-        delete $x->{_p};
+        $x->{_a} = undef;
+        $x->{_p} = undef;
     }
     # restore globals
     $$abr = $ab;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/lib/Math/BigInt/Calc.pm 
new/Math-BigInt-1.999838/lib/Math/BigInt/Calc.pm
--- old/Math-BigInt-1.999837/lib/Math/BigInt/Calc.pm    2022-07-02 
14:14:54.000000000 +0200
+++ new/Math-BigInt-1.999838/lib/Math/BigInt/Calc.pm    2022-07-05 
15:52:58.000000000 +0200
@@ -7,7 +7,7 @@
 use Carp qw< carp croak >;
 use Math::BigInt::Lib;
 
-our $VERSION = '1.999837';
+our $VERSION = '1.999838';
 $VERSION =~ tr/_//d;
 
 our @ISA = ('Math::BigInt::Lib');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/lib/Math/BigInt/Lib.pm 
new/Math-BigInt-1.999838/lib/Math/BigInt/Lib.pm
--- old/Math-BigInt-1.999837/lib/Math/BigInt/Lib.pm     2022-07-02 
14:14:54.000000000 +0200
+++ new/Math-BigInt-1.999838/lib/Math/BigInt/Lib.pm     2022-07-05 
15:52:58.000000000 +0200
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.999837';
+our $VERSION = '1.999838';
 $VERSION =~ tr/_//d;
 
 use Carp;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/lib/Math/BigInt.pm 
new/Math-BigInt-1.999838/lib/Math/BigInt.pm
--- old/Math-BigInt-1.999837/lib/Math/BigInt.pm 2022-07-02 14:15:22.000000000 
+0200
+++ new/Math-BigInt-1.999838/lib/Math/BigInt.pm 2023-03-31 13:30:02.000000000 
+0200
@@ -23,7 +23,7 @@
 use Carp          qw< carp croak >;
 use Scalar::Util  qw< blessed refaddr >;
 
-our $VERSION = '1.999837';
+our $VERSION = '1.999838';
 $VERSION =~ tr/_//d;
 
 require Exporter;
@@ -350,34 +350,34 @@
     if (@_ > 0) {
         my $a = shift;
         if (defined $a) {
-            $a = $a->numify() if ref($a) && $a->can('numify');
+            $a = $a -> can('numify') ? $a -> numify() : 0 + "$a" if ref($a);
             # also croak on non-numerical
-            if (!$a || $a <= 0) {
-                croak('Argument to accuracy must be greater than zero');
-            }
-            if (int($a) != $a) {
-                croak('Argument to accuracy must be an integer');
-            }
+            croak "accuracy must be a number, not '$a'"
+              unless $a =~/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/;
+            croak "accuracy must be an integer, not '$a'"
+              if $a != int $a;
+            croak "accuracy must be greater than zero, not '$a'"
+              if $a <= 0;
         }
 
         if (ref($x)) {
             # Set instance variable.
-            $x = $x->bround($a) if $a; # not for undef, 0
-            $x->{_a} = $a;        # set/overwrite, even if not rounded
-            delete $x->{_p};      # clear P
+            $x = $x->bround($a) if defined $a;
+            $x->{_a} = $a;      # set/overwrite, even if not rounded
+            $x->{_p} = undef;   # clear P
             # Why return class variable here? Fixme!
             $a = ${"${class}::accuracy"} unless defined $a;
         } else {
             # Set class variable.
-            ${"${class}::accuracy"} = $a; # set global A
-            ${"${class}::precision"} = undef; # clear global P
+            ${"${class}::accuracy"}  = $a;      # set global A
+            ${"${class}::precision"} = undef;   # clear global P
         }
 
         return $a;              # shortcut
     }
 
     # Return instance variable.
-    return $x->{_a} if ref($x) && (defined($x->{_a}) || defined($x->{_p}));
+    return $x->{_a} if ref($x);
 
     # Return class variable.
     return ${"${class}::accuracy"};
@@ -396,30 +396,31 @@
     if (@_ > 0) {
         my $p = shift;
         if (defined $p) {
-            $p = $p->numify() if ref($p) && $p->can('numify');
-            if ($p != int $p) {
-                croak('Argument to precision must be an integer');
-            }
+            $p = $p -> can('numify') ? $p -> numify() : 0 + "$p" if ref($p);
+            croak "precision must be a number, not '$p'"
+              unless $p =~/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?\z/;
+            croak "precision must be an integer, not '$p'"
+              if $p != int $p;
         }
 
         if (ref($x)) {
             # Set instance variable.
-            $x = $x->bfround($p) if $p; # not for undef, 0
-            $x->{_p} = $p;         # set/overwrite, even if not rounded
-            delete $x->{_a};       # clear A
+            $x = $x->bfround($p) if defined $p;
+            $x->{_p} = $p;      # set/overwrite, even if not rounded
+            $x->{_a} = undef;   # clear A
             # Why return class variable here? Fixme!
             $p = ${"${class}::precision"} unless defined $p;
         } else {
             # Set class variable.
-            ${"${class}::precision"} = $p; # set global P
-            ${"${class}::accuracy"} = undef; # clear global A
+            ${"${class}::precision"} = $p;      # set global P
+            ${"${class}::accuracy"}  = undef;   # clear global A
         }
 
         return $p;              # shortcut
     }
 
     # Return instance variable.
-    return $x->{_p} if ref($x) && (defined($x->{_a}) || defined($x->{_p}));
+    return $x->{_p} if ref($x);
 
     # Return class variable.
     return ${"${class}::precision"};
@@ -3770,7 +3771,7 @@
     # no-op for Math::BigInt objects if $n <= 0
     $x = $x->bround($x->length()-$scale, $mode) if $scale > 0;
 
-    delete $x->{_a};            # delete to save memory
+    $x->{_a} = undef;
     $x->{_p} = $scale;          # store new _p
     $x;
 }
@@ -4003,8 +4004,8 @@
         return $class->new($x->{sign}, @r);
     }
     my $m = $x->copy();
-    delete $m->{_p};
-    delete $m->{_a};
+    $m -> precision(undef);
+    $m -> accuracy(undef);
 
     # that's a bit inefficient:
     my $zeros = $LIB->_zeros($m->{value});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/t/mbimbf.t 
new/Math-BigInt-1.999838/t/mbimbf.t
--- old/Math-BigInt-1.999837/t/mbimbf.t 2022-05-24 10:46:59.000000000 +0200
+++ new/Math-BigInt-1.999838/t/mbimbf.t 2022-10-02 13:58:46.000000000 +0200
@@ -7,7 +7,7 @@
 use warnings;
 
 use Test::More tests => 712             # tests in require'd file
-                        + 26;           # tests in this file
+                        + 52;           # tests in this file
 
 use Math::BigInt only => 'Calc';
 use Math::BigFloat;
@@ -58,24 +58,71 @@
 }
 
 foreach my $class (qw/Math::BigInt Math::BigFloat/)  {
-    $class->accuracy(42);
+    my $x;
 
-    # $x gets A of 42, too!
-    my $x = $class->new(123);
+    # Accuracy
 
-    # really?
-    is($x->accuracy(), 42, '$x has A of 42');
+    # set and check the class accuracy
+    $class->accuracy(1);
+    is($class->accuracy(), 1, "$class has A of 1");
 
-    # $x has no A, but the global is still in effect for $x so the return value
-    # of that operation should be 42, not undef
-    is($x->accuracy(undef), 42, '$x has A from global');
+    # a new instance gets the class accuracy
+    $x = $class->new(123);
+    is($x->accuracy(), 1, '$x has A of 1');
 
-    # so $x should still have A = 42
-    is($x->accuracy(), 42, '$x has still A of 42');
+    # set and check the instance accuracy
+    $x->accuracy(2);
+    is($x->accuracy(), 2, '$x has A of 2');
 
-    # reset for further tests
+    # change the class accuracy
+    $class->accuracy(3);
+    is($class->accuracy(), 3, "$class has A of 3");
+
+    # verify that the instance accuracy hasn't changed
+    is($x->accuracy(), 2, '$x still has A of 2');
+
+    # change the instance accuracy
+    $x->accuracy(undef);
+    is($x->accuracy(), undef, '$x now has A of undef');
+
+    # check the class accuracy
+    is($class->accuracy(), 3, "$class still has A of 3");
+
+    # change the class accuracy again
     $class->accuracy(undef);
+    is($class->accuracy(), undef, "$class now has A of undef");
+
+    # Precision
+
+    # set and check the class precision
+    $class->precision(1);
+    is($class->precision(), 1, "$class has A of 1");
+
+    # a new instance gets the class precision
+    $x = $class->new(123);
+    is($x->precision(), 1, '$x has A of 1');
+
+    # set and check the instance precision
+    $x->precision(2);
+    is($x->precision(), 2, '$x has A of 2');
+
+    # change the class precision
+    $class->precision(3);
+    is($class->precision(), 3, "$class has A of 3");
+
+    # verify that the instance precision hasn't changed
+    is($x->precision(), 2, '$x still has A of 2');
+
+    # change the instance precision
+    $x->precision(undef);
+    is($x->precision(), undef, '$x now has A of undef');
+
+    # check the class precision
+    is($class->precision(), 3, "$class still has A of 3");
+
+    # change the class precision again
     $class->precision(undef);
+    is($class->precision(), undef, "$class now has A of undef");
 }
 
 # bug with blog(Math::BigFloat, Math::BigInt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/t/upgrade.inc 
new/Math-BigInt-1.999838/t/upgrade.inc
--- old/Math-BigInt-1.999837/t/upgrade.inc      2022-06-20 13:03:56.000000000 
+0200
+++ new/Math-BigInt-1.999838/t/upgrade.inc      2023-03-31 12:49:52.000000000 
+0200
@@ -1108,6 +1108,8 @@
 -7:-4:-8
 -7:4:0
 -4:7:4
+1:0.5:0
+
 # equal arguments are treated special, so also do some test with unequal ones
 0xFFFF:0xFFFF:0x0xFFFF
 0xFFFFFF:0xFFFFFF:0x0xFFFFFF
@@ -1140,6 +1142,8 @@
 -6:-6:-6
 -7:4:-3
 -4:7:-1
+1:0.5:1
+
 # equal arguments are treated special, so also do some test with unequal ones
 0xFFFF:0xFFFF:0x0xFFFF
 0xFFFFFF:0xFFFFFF:0x0xFFFFFF
@@ -1189,6 +1193,8 @@
 -4:7:-5
 4:-7:-3
 -4:-7:5
+1:0.5:1
+
 # equal arguments are treated special, so also do some test with unequal ones
 0xFFFF:0xFFFF:0
 0xFFFFFF:0xFFFFFF:0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/t/upgrade.t 
new/Math-BigInt-1.999838/t/upgrade.t
--- old/Math-BigInt-1.999837/t/upgrade.t        2022-06-20 13:03:56.000000000 
+0200
+++ new/Math-BigInt-1.999838/t/upgrade.t        2023-03-31 12:50:15.000000000 
+0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 2134            # tests in require'd file
+use Test::More tests => 2140            # tests in require'd file
                          + 6;           # tests in this file
 
 use Math::BigInt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-1.999837/xt/author/sparts-mbf.t 
new/Math-BigInt-1.999838/xt/author/sparts-mbf.t
--- old/Math-BigInt-1.999837/xt/author/sparts-mbf.t     2022-06-20 
13:03:57.000000000 +0200
+++ new/Math-BigInt-1.999838/xt/author/sparts-mbf.t     2022-07-06 
13:31:38.000000000 +0200
@@ -57,7 +57,7 @@
     my ($mant, $expo) = $x -> sparts();
     cmp_ok($mant, '==', 3, "value of significand");
     cmp_ok($expo, '==', 0, "value of exponent");
-    cmp_ok($mant -> accuracy(), '==', 10, "accuracy of significand");
+    cmp_ok($mant -> accuracy(), '==', 20, "accuracy of significand");
     cmp_ok($expo -> accuracy(), '==', 20, "accuracy of exponent");
 }
 
@@ -71,7 +71,7 @@
     my ($mant, $expo) = $x -> sparts();
     cmp_ok($mant, '==', 3, "value of significand");
     cmp_ok($expo, '==', 0, "value of exponent");
-    cmp_ok($mant -> precision(), '==', 10, "precision of significand");
+    cmp_ok($mant -> precision(), '==', 20, "precision of significand");
     cmp_ok($expo -> precision(), '==', 20, "precision of exponent");
 }
 

Reply via email to