[arch-commits] Commit in sagemath/trunk (PKGBUILD increase-rtol.patch)

Antonio Rojas arojas at archlinux.org
Fri Aug 5 22:06:53 UTC 2016


    Date: Friday, August 5, 2016 @ 22:06:53
  Author: arojas
Revision: 185390

Increase numerical tolerance, needed by scipy 0.18

Added:
  sagemath/trunk/increase-rtol.patch
Modified:
  sagemath/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   10 +++++++---
 increase-rtol.patch |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-08-05 20:50:16 UTC (rev 185389)
+++ PKGBUILD	2016-08-05 22:06:53 UTC (rev 185390)
@@ -9,7 +9,7 @@
 
 pkgname=sagemath
 pkgver=7.3
-pkgrel=2
+pkgrel=3
 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
 arch=(i686 x86_64)
 url="http://www.sagemath.org"
@@ -36,7 +36,8 @@
 provides=(sage-mathematics)
 source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
         anal.h env.patch paths.patch clean.patch skip-check.patch cython-sys-path.patch is-package-installed.patch package.patch
-        disable-fes.patch jupyter-path.patch test-optional.patch python-2.7.11.patch linbox-1.4.patch ecm-7.patch sagemath-ipython5.patch)
+        disable-fes.patch jupyter-path.patch test-optional.patch python-2.7.11.patch linbox-1.4.patch ecm-7.patch
+        sagemath-ipython5.patch increase-rtol.patch)
 md5sums=('cb2aed3d24de7b2228a9b34e81a27870'
          'a906a180d198186a39820b0a2f9a9c63'
          'd4d3c235c99b2bc92dde9f6e53935a8d'
@@ -52,7 +53,8 @@
          'ef927896f2071b442b1d07d7e69f5f3a'
          'a276f0fbbff6eade409d0569ebd728d4'
          '0c9a57d35de80c2cd418ebec912efbbb'
-         '2bcaca7284dda963ebdc17daf78cf6c9')
+         '2bcaca7284dda963ebdc17daf78cf6c9'
+         '39d3fded716d2a7ae0ab03e0896b7497')
 
 prepare(){
   cd sage-$pkgver
@@ -86,6 +88,8 @@
   patch -p1 -i ../cython-sys-path.patch
 # fix regressions with ECM 7
   patch -p1 -i ../ecm-7.patch
+# increase numerical tolerance, needed by scipy 0.18
+  patch -p1 -i ../increase-rtol.patch
 
 # Upstream patches  
 # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209

Added: increase-rtol.patch
===================================================================
--- increase-rtol.patch	                        (rev 0)
+++ increase-rtol.patch	2016-08-05 22:06:53 UTC (rev 185390)
@@ -0,0 +1,37 @@
+diff -ru sage-7.3.orig/src/sage/coding/code_bounds.py sage-7.3/src/sage/coding/code_bounds.py
+--- sage-7.3.orig/src/sage/coding/code_bounds.py        2016-08-05 20:26:10.033204091 +0200
++++ sage-7.3/src/sage/coding/code_bounds.py     2016-08-05 20:32:27.276579565 +0200
+@@ -554,7 +554,7 @@
+     if q < 2:   # Here we check that q is actually at least 2
+         raise ValueError("The value q must be an integer greater than 1")
+ 
+-    eps  = 4.5e-16 # find_root has about this as the default xtol
++    eps  = 4.5e-15 # find_root has about this as the default xtol
+     ymax = 1 - 1/q
+     if x <= eps:
+         return 0
+diff -ru sage-7.3.orig/src/sage/numerical/optimize.py sage-7.3/src/sage/numerical/optimize.py
+--- sage-7.3.orig/src/sage/numerical/optimize.py        2016-08-05 20:26:10.816536625 +0200
++++ sage-7.3/src/sage/numerical/optimize.py     2016-08-05 20:32:21.449907130 +0200
+@@ -15,7 +15,7 @@
+ from sage.rings.real_double import RDF
+ 
+ 
+-def find_root(f, a, b, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False):
++def find_root(f, a, b, xtol=10e-13, rtol=4.5e-15, maxiter=100, full_output=False):
+     """
+     Numerically find a root of ``f`` on the closed interval `[a,b]`
+     (or `[b,a]`) if possible, where ``f`` is a function in the one variable.
+diff -ru sage-7.3.orig/src/sage/symbolic/expression.pyx sage-7.3/src/sage/symbolic/expression.pyx
+--- sage-7.3.orig/src/sage/symbolic/expression.pyx      2016-08-05 20:26:11.333202767 +0200
++++ sage-7.3/src/sage/symbolic/expression.pyx   2016-08-05 20:32:14.236566826 +0200
+@@ -10884,7 +10884,7 @@
+             ret = ret[0]
+         return ret
+ 
+-    def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False):
++    def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-15, maxiter=100, full_output=False):
+         """
+         Numerically find a root of self on the closed interval [a,b] (or
+         [b,a]) if possible, where self is a function in the one variable.
+



More information about the arch-commits mailing list