Hello community,

here is the log from the commit of package perl-Math-Clipper for 
openSUSE:Factory checked in at 2019-05-13 14:52:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Math-Clipper (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Math-Clipper.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Math-Clipper"

Mon May 13 14:52:21 2019 rev:5 rq:702490 version:1.28

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Math-Clipper/perl-Math-Clipper.changes      
2018-06-02 11:58:54.645119075 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Math-Clipper.new.5148/perl-Math-Clipper.changes
    2019-05-13 14:52:26.415075893 +0200
@@ -1,0 +2,13 @@
+Sun May 12 05:14:49 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 1.28
+   see /usr/share/doc/packages/perl-Math-Clipper/Changes
+
+  1.28  Sat May 11 03:42:00 2019
+  
+    - Avoid use of ** in calculating scaling factors in
+      integerize_coordinate_sets() to avoid inconsistent
+      behavior of underlying pow() function between BSD + clang
+      and other systems.
+
+-------------------------------------------------------------------

Old:
----
  Math-Clipper-1.27.tar.gz

New:
----
  Math-Clipper-1.28.tar.gz

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

Other differences:
------------------
++++++ perl-Math-Clipper.spec ++++++
--- /var/tmp/diff_new_pack.PmBJau/_old  2019-05-13 14:52:27.055077504 +0200
+++ /var/tmp/diff_new_pack.PmBJau/_new  2019-05-13 14:52:27.059077514 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Math-Clipper
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,18 +12,18 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           perl-Math-Clipper
-Version:        1.27
+Version:        1.28
 Release:        0
 %define cpan_name Math-Clipper
 Summary:        Polygon clipping in 2D
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
-Url:            http://search.cpan.org/dist/Math-Clipper/
+Url:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/S/SH/SHELDRAKE/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -45,7 +45,7 @@
 find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
 
 %build
-%{__perl} Build.PL installdirs=vendor optimize="%{optflags}"
+perl Build.PL installdirs=vendor optimize="%{optflags}"
 ./Build build flags=%{?_smp_mflags}
 
 %check

++++++ Math-Clipper-1.27.tar.gz -> Math-Clipper-1.28.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.27/Changes 
new/Math-Clipper-1.28/Changes
--- old/Math-Clipper-1.27/Changes       2018-05-14 02:52:12.000000000 +0200
+++ new/Math-Clipper-1.28/Changes       2019-05-12 00:58:59.000000000 +0200
@@ -1,5 +1,12 @@
 Revision history for Perl extension Math::Clipper.
 
+1.28  Sat May 11 03:42:00 2019
+
+  - Avoid use of ** in calculating scaling factors in
+    integerize_coordinate_sets() to avoid inconsistent
+    behavior of underlying pow() function between BSD + clang
+    and other systems.
+
 1.27  Sun May 13 17:46:00 2018
 
   - Fix integerize bug introduced in 1.26 for 32 bit Perl (ivsize < 8)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.27/META.json 
new/Math-Clipper-1.28/META.json
--- old/Math-Clipper-1.27/META.json     2018-05-14 02:52:12.000000000 +0200
+++ new/Math-Clipper-1.28/META.json     2019-05-12 00:58:59.000000000 +0200
@@ -32,7 +32,7 @@
    "provides" : {
       "Math::Clipper" : {
          "file" : "lib/Math/Clipper.pm",
-         "version" : "1.27"
+         "version" : "1.28"
       }
    },
    "release_status" : "stable",
@@ -41,6 +41,6 @@
          "http://dev.perl.org/licenses/";
       ]
    },
-   "version" : "1.27",
-   "x_serialization_backend" : "JSON::PP version 2.27300_01"
+   "version" : "1.28",
+   "x_serialization_backend" : "JSON::PP version 2.27400_02"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.27/META.yml 
new/Math-Clipper-1.28/META.yml
--- old/Math-Clipper-1.27/META.yml      2018-05-14 02:52:12.000000000 +0200
+++ new/Math-Clipper-1.28/META.yml      2019-05-12 00:58:59.000000000 +0200
@@ -11,7 +11,7 @@
   Module::Build: '0.38'
   Module::Build::WithXSpp: '0.14'
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 
2.150005'
+generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 
2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,8 +20,8 @@
 provides:
   Math::Clipper:
     file: lib/Math/Clipper.pm
-    version: '1.27'
+    version: '1.28'
 resources:
   license: http://dev.perl.org/licenses/
-version: '1.27'
+version: '1.28'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-Clipper-1.27/lib/Math/Clipper.pm 
new/Math-Clipper-1.28/lib/Math/Clipper.pm
--- old/Math-Clipper-1.27/lib/Math/Clipper.pm   2018-05-14 02:52:12.000000000 
+0200
+++ new/Math-Clipper-1.28/lib/Math/Clipper.pm   2019-05-12 00:58:59.000000000 
+0200
@@ -12,7 +12,7 @@
 
 BEGIN {
     use XSLoader;
-    $VERSION = '1.27';
+    $VERSION = '1.28';
     XSLoader::load('Math::Clipper', $VERSION);
 }
 
@@ -89,10 +89,10 @@
     # assume all coordinate vectors (points) have same number of coordinates; 
get that count from first one
     my $coord_count=scalar(@{$_[0]->[0]});
 
-    # return this with scaled data, so user can "unscale" Clipper results
+    # return this array of each column's calculated scale factor, so users can 
"unscale" Clipper results
     my @scale_vector;
 
-    # deal with each coordinate "column" (eg. x column, y column, ... possibly 
more)
+    # deal with each coordinate column (eg. x column, y column, ... possibly 
more)
     for (my $ci=0;$ci<$coord_count;$ci++) {
         my $maxc=$_[0]->[0]->[$ci];
         my $max_exp;
@@ -101,23 +101,34 @@
         foreach my $set (@_) {
             # for each "point"
             foreach my $vector (@{$set}) {
-                # looking for the maximum magnitude
+                # possibly update the the maximum magnitude seen in the column
                 if ($maxc<abs($vector->[$ci]) + $opts{margin}) 
{$maxc=abs($vector->[$ci]) + $opts{margin};}
-                # looking for the maximum exponent, when coords are in 
scientific notation
+                # look for the maximum exponent, when coords are in scientific 
notation
                 if (sprintf("%.20e",$vector->[$ci] + 
($vector->[$ci]<0?-1:1)*$opts{margin}) =~ /[eE]([+-])0*(\d+)$/) {
                     my $exp1 = eval($1.$2);
-                    if (defined $vector->[$ci] && (!defined($max_exp) || 
$max_exp<$exp1)) {$max_exp=$exp1} 
+                    if (defined $vector->[$ci] && (!defined($max_exp) || 
$max_exp<$exp1)) {$max_exp=$exp1;}
                 }
-                else {croak "some coordinate didn't look like a number: 
",$vector->[$ci]}
+                else {croak "some coordinate didn't look like a number: 
",$vector->[$ci];}
             }
         }
 
         # Set scale for this coordinate column to the largest value that will 
convert the
-        # larges coordinate in the set to near the top of the available 
integer range.
+        # largest coordinate in the set to near the top of the available 
integer range.
         # There's never any question of how much precision the user wants -
         # we just always give as much as possible, within the integer limit in 
effect (53 bit or 64 bit)
 
-        $scale_vector[$ci]=10**(-$max_exp + 
($intspecs{$opts{bits}}->{maxdigits} - 1));
+        $scale_vector[$ci] = 1;
+        my $power = -$max_exp + ($intspecs{$opts{bits}}->{maxdigits} - 1);
+
+        # We explicitly calculate the equivalent to 1**$power because
+        # the results of the system's pow() function underlying
+        # Perl's ** operator are sometimes inconsistent between
+        # BSD/clang and other systems.
+
+        for (my $pi = 0; $pi < abs($power); $pi++) {
+            if    ($power > 0) { $scale_vector[$ci] *= 10; }
+            elsif ($power < 0) { $scale_vector[$ci] /= 10; }
+        }
 
         if ($maxc * $scale_vector[$ci] > $intspecs{$opts{bits}}->{maxint}) {
             # Both 53 bit and 64 bit integers
@@ -127,13 +138,8 @@
             # zone just beyond the integer max, we'll only
             # scale up to 15 or 18 digit integers instead.
 
-            $scale_vector[$ci]=10**(-$max_exp + 
($intspecs{$opts{bits}}->{maxdigits} - 2));
-
+            $scale_vector[$ci] /= 10;
         }
-
-        # brings behavior of FreeBSD + clang systems into harmony with others
-        $scale_vector[$ci] = 0.0 + sprintf("%.0f",$scale_vector[$ci]);
-
     }
 
     # If the "constrain" option is set false,
@@ -628,7 +634,7 @@
 
 Copyright (C) 2010, 2011, 2014 by Steffen Mueller
 
-Copyright (C) 2011, 2018 by Mike Sheldrake
+Copyright (C) 2011, 2018, 2019 by Mike Sheldrake
 
 Copyright (C) 2012, 2013 by Alessandro Ranellucci and Mike Sheldrake
 


Reply via email to