[sagemath] 05/13: Add upstream patch for pynac 0.7.12.
Tobias Hansen
thansen at moszumanska.debian.org
Sun Oct 15 19:18:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository sagemath.
commit f6ca442018bc0d5f8fd1ab0b1b01ba4a45cb005b
Author: Tobias Hansen <thansen at debian.org>
Date: Sun Oct 15 11:17:52 2017 +0000
Add upstream patch for pynac 0.7.12.
---
debian/changelog | 2 +
debian/control.in | 2 +-
debian/patches/series | 1 +
debian/patches/u0-version-pynac-0.7.12.patch | 395 +++++++++++++++++++++++++++
4 files changed, 399 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 06ccfdc..b3071cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ sagemath (8.1~beta7-1) UNRELEASED; urgency=medium
* Patches with non-trivial modifications:
- u2-allow-override-sage-local.patch
- d0-paths.patch
+ * New patches:
+ - u0-version-pynac-0.7.12.patch
-- Tobias Hansen <thansen at debian.org> Sun, 15 Oct 2017 10:23:00 +0000
diff --git a/debian/control.in b/debian/control.in
index 3141ab0..b2ccbb0 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -62,7 +62,7 @@ Build-Depends:
libplanarity-dev,
libpng-dev,
libppl-dev (>= 1:1.1),
- libpynac-dev (>= 0.7.8-2~sage1),
+ libpynac-dev (>= 0.7.12),
libratpoints-dev,
libreadline-dev,
librw-dev,
diff --git a/debian/patches/series b/debian/patches/series
index ea8acab..46d8b9f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,6 @@
# Patches already applied upstream or committed in a side branch
# Or nearly-finished patches that they'll very probably merge.
+u0-version-pynac-0.7.12.patch #23950
# Patches that have open upstream tickets
u1-version-pbori-boost1.62-hashes.patch #22243
diff --git a/debian/patches/u0-version-pynac-0.7.12.patch b/debian/patches/u0-version-pynac-0.7.12.patch
new file mode 100644
index 0000000..75a02eb
--- /dev/null
+++ b/debian/patches/u0-version-pynac-0.7.12.patch
@@ -0,0 +1,395 @@
+Bug: https://trac.sagemath.org/ticket/23950
+
+From 5425450f4025dfb686df5eda75290ade6a0fc42f Mon Sep 17 00:00:00 2001
+From: Ralf Stephan <ralf at ark.in-berlin.de>
+Date: Sun, 1 Oct 2017 15:42:27 +0200
+Subject: 23950: update interface
+
+---
+ src/sage/libs/pynac/pynac.pxd | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/sage/src/sage/libs/pynac/pynac.pxd
++++ b/sage/src/sage/libs/pynac/pynac.pxd
+@@ -97,6 +97,7 @@
+
+ cdef cppclass GEx "ex":
+ GEx()
++ GEx(GNumeric o)
+ GEx(GSymbol m)
+ GEx(GEx m)
+ GEx(long n)
+@@ -127,8 +128,8 @@
+ GEx numer() except +
+ GEx denom() except +
+ GEx numer_denom() except +
+- int degree(GEx expr) except +
+- int ldegree(GEx expr) except +
++ GNumeric degree(GEx expr) except +
++ GNumeric ldegree(GEx expr) except +
+ GEx unit(GEx expr) except +
+ GEx content(GEx expr) except +
+ GEx primpart(GEx expr) except +
+@@ -161,6 +162,7 @@
+
+ # Algorithms
+ GEx g_gcd "gcd"(GEx a, GEx b) except +
++ bint g_factor "factor"(GEx expr, GEx res) except +
+ GEx g_gosper_term "gosper_term"(GEx the_ex, GEx n) except +
+ GEx g_gosper_sum_definite "gosper_sum_definite"(GEx the_ex,
+ GEx n, GEx a, GEx b, int* p) except +
+--- a/sage/src/sage/symbolic/expression.pyx
++++ b/sage/src/sage/symbolic/expression.pyx
+@@ -3248,11 +3248,8 @@
+ -1
+ sage: b = -x*A; c = b*b; c
+ 1/4*x^2*(sqrt(5) + I*sqrt(2*sqrt(5) + 10) - 1)
+-
+- Products of non integer powers of exp are not simplified::
+-
+ sage: exp(x)^I*exp(z)^(2.5)
+- (e^x)^I*(e^z)^2.50000000000000
++ e^(I*x + 2.50000000000000*z)
+
+ ::
+
+@@ -3309,17 +3306,17 @@
+ sage: ex.substitute(r1=z, r2=z)
+ -(c1 + z*c2 + z)/c3
+
+- Note the content and the leading coefficient of the numerator after
+- the substitution::
++ Note the content cannot be computed because of nonsensical
++ arithmetic::
+
+ sage: num = ex.op[0].subs({r1: z, r2: z}); num
+ -c1 + z*c2 + z
+ sage: num.leading_coefficient(c1)
+ -1
+ sage: num.content(c1)
+- 1
+- sage: num.content(c1).pyobject().parent()
+- Integer Ring
++ Traceback (most recent call last):
++ ...
++ TypeError: unsupported operand parent(s) for *: 'Finite Field in z of size 2^8' and 'Rational Field'
+
+ The leading coefficient is a negative number. The normalization process
+ tries to convert it to a positive number and extract the content, by
+@@ -3926,7 +3923,7 @@
+ sage: 0^1.0
+ 0.000000000000000
+ sage: exp(x)^1.0
+- (e^x)^1.00000000000000
++ e^(1.00000000000000*x)
+
+ Check that :trac:`23921` is resolved::
+
+@@ -6336,7 +6333,7 @@
+ 0
+ """
+ cdef Expression ss = self.coerce_in(s)
+- return self._gobj.ldegree(ss._gobj)
++ return new_Expression_from_GEx(self._parent, GEx(self._gobj.ldegree(ss._gobj)))
+
+ def degree(self, s):
+ """
+@@ -6362,7 +6359,7 @@
+ 0
+ """
+ cdef Expression ss = self.coerce_in(s)
+- return self._gobj.degree(ss._gobj)
++ return new_Expression_from_GEx(self._parent, GEx(self._gobj.degree(ss._gobj)))
+
+ def unit(self, s):
+ """
+@@ -7210,12 +7207,12 @@
+ sage: f.collect(z)
+ (x^2*y^2 + 4)*z^2 + 4*x*y + 20*y^2 + (x + 21*y)*z
+
+- Sometimes, we do have to call :meth:`expand()` on the
+- expression first to achieve the desired result::
++ The terms are collected, whether the expression
++ is expanded or not::
+
+ sage: f = (x + y)*(x - z)
+ sage: f.collect(x)
+- x^2 + x*y - x*z - y*z
++ x^2 + x*(y - z) - y*z
+ sage: f.expand().collect(x)
+ x^2 + x*(y - z) - y*z
+
+@@ -10458,9 +10455,9 @@
+ ``x*log(9)`` is contracted only if ``algorithm`` is ``'all'``::
+
+ sage: (x*log(9)).simplify_log()
+- x*log(9)
++ 2*x*log(3)
+ sage: (x*log(9)).simplify_log('all')
+- log(9^x)
++ log(3^(2*x))
+
+ TESTS:
+
+@@ -10575,7 +10572,7 @@
+ To expand also log(3/4) use ``algorithm='all'``::
+
+ sage: (log(3/4*x^pi)).log_expand('all')
+- pi*log(x) - log(4) + log(3)
++ pi*log(x) + log(3) - 2*log(2)
+
+ To expand only the power use ``algorithm='powers'``.::
+
+@@ -10598,7 +10595,7 @@
+ pi*log(x) + log(3/4)
+
+ sage: (log(3/4*x^pi)).log_expand('all')
+- pi*log(x) - log(4) + log(3)
++ pi*log(x) + log(3) - 2*log(2)
+
+ sage: (log(3/4*x^pi)).log_expand()
+ pi*log(x) + log(3/4)
+--- a/sage/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
++++ b/sage/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
+@@ -716,7 +716,7 @@
+ Diese Gesetze können auch umgekehrt verwendet werden, wie in diesem Beispiel::
+
+ sage: (5*log(2) + 5*log(5)).simplify_log()
+- log(100000)
++ 5*log(10)
+
+ Es geben weitere mögliche Vereinfachungen, die wir hier nicht weiter erwähnen.
+
+--- a/sage/src/sage/coding/code_bounds.py
++++ b/sage/src/sage/coding/code_bounds.py
+@@ -577,8 +577,8 @@
+
+ sage: codes.bounds.entropy(0, 2)
+ 0
+- sage: codes.bounds.entropy(1/5,4)
+- 1/5*log(3)/log(4) - 4/5*log(4/5)/log(4) - 1/5*log(1/5)/log(4)
++ sage: codes.bounds.entropy(1/5,4).factor()
++ 1/10*(log(3) - 4*log(4/5) - log(1/5))/log(2)
+ sage: codes.bounds.entropy(1, 3)
+ log(2)/log(3)
+
+--- a/sage/src/sage/functions/log.py
++++ b/sage/src/sage/functions/log.py
+@@ -121,12 +121,12 @@
+ sage: model_exp = exp(II)**a*(b)
+ sage: sol1_l={b: 5.0, a: 1.1}
+ sage: model_exp.subs(sol1_l)
+- 5.00000000000000*(e^II)^1.10000000000000
++ 5.00000000000000*e^(1.10000000000000*II)
+
+ ::
+
+ sage: exp(3)^II*exp(x)
+- (e^3)^II*e^x
++ e^(3*II + x)
+ sage: exp(x)*exp(x)
+ e^(2*x)
+ sage: exp(x)*exp(a)
+@@ -137,7 +137,7 @@
+ Another instance of the same problem (:trac:`7394`)::
+
+ sage: 2*sqrt(e)
+- 2*sqrt(e)
++ 2*e^(1/2)
+
+ Check that :trac:`19918` is fixed::
+
+@@ -271,7 +271,7 @@
+ sage: RDF(log(1024, 2))
+ 10.0
+ sage: log(10, 4)
+- log(10)/log(4)
++ 1/2*log(10)/log(2)
+ sage: RDF(log(10, 4))
+ 1.6609640474436813
+ sage: log(10, 2)
+--- a/sage/src/sage/functions/orthogonal_polys.py
++++ b/sage/src/sage/functions/orthogonal_polys.py
+@@ -1666,7 +1666,7 @@
+ EXAMPLES::
+
+ sage: gen_legendre_Q(2,1,3)
+- -1/4*sqrt(-2)*(-36*I*pi + 36*log(4) - 36*log(2) - 25)
++ -1/4*sqrt(-2)*(-36*I*pi + 36*log(2) - 25)
+ """
+ ret = self._eval_special_values_(n, m, x)
+ if ret is not None:
+--- a/sage/src/sage/rings/asymptotic/asymptotic_ring.py
++++ b/sage/src/sage/rings/asymptotic/asymptotic_ring.py
+@@ -2485,7 +2485,7 @@
+ ::
+
+ sage: (x^2 + log(x)).subs(x=4*x+2).truncate(5)
+- 16*x^2 + 16*x + log(x) + log(4) + 4 + 1/2*x^(-1) + O(x^(-2))
++ 16*x^2 + 16*x + log(x) + 2*log(2) + 4 + 1/2*x^(-1) + O(x^(-2))
+ sage: _.parent()
+ Asymptotic Ring <(e^x)^QQ * x^ZZ * log(x)^ZZ> over Symbolic Ring
+
+--- a/sage/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
++++ b/sage/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
+@@ -60,9 +60,15 @@
+ sage: decomp = F.asymptotic_decomposition(alpha)
+ sage: decomp
+ (0, []) +
+- (-1/2*(x^2 + 6*x + 9)*r^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
+- - 1/2*(5*x^2 + 24*x + 27)*r/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
+- - 3*(x^2 + 3*x + 3)/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
++ (-1/2*r^2*(x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++ + 6*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++ + 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
++ - 1/2*r*(5*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++ + 24*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++ + 27/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
++ - 3*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++ - 9*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++ - 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
+ [(x - 1/2, 1)])
+ sage: F1 = decomp[1]
+ sage: p = {x: 1/2}
+@@ -139,9 +145,9 @@
+ sage: alpha = (var('a'), var('b'))
+ sage: decomp = F.asymptotic_decomposition(alpha); decomp
+ (0, []) +
+- (-1/9*(2*b^2*x^2 - 5*a*b*x*y + 2*a^2*y^2)*r^2/(x^2*y^2)
+- - 1/9*(6*b*x^2 - 5*(a + b)*x*y + 6*a*y^2)*r/(x^2*y^2)
+- - 1/9*(4*x^2 - 5*x*y + 4*y^2)/(x^2*y^2),
++ (-1/9*r^2*(2*a^2/x^2 + 2*b^2/y^2 - 5*a*b/(x*y))
++ - 1/9*r*(6*a/x^2 + 6*b/y^2 - 5*a/(x*y) - 5*b/(x*y))
++ - 4/9/x^2 - 4/9/y^2 + 5/9/(x*y),
+ [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
+ sage: F1 = decomp[1]
+ sage: F1.asymptotics(p, alpha, 2)
+@@ -1480,9 +1486,9 @@
+ sage: alpha = [var('a')]
+ sage: F.asymptotic_decomposition(alpha)
+ (0, []) +
+- (1/54*(5*a^2*x^2 + 2*a^2*x + 11*a^2)*r^2/x^2
+- - 1/54*(5*a*x^2 - 2*a*x - 33*a)*r/x^2 + 11/27/x^2, [(x - 1, 1)]) +
+- (-5/27, [(x + 2, 1)])
++ (1/54*(5*a^2 + 2*a^2/x + 11*a^2/x^2)*r^2
++ - 1/54*(5*a - 2*a/x - 33*a/x^2)*r + 11/27/x^2,
++ [(x - 1, 1)]) + (-5/27, [(x + 2, 1)])
+
+ ::
+
+@@ -1495,7 +1501,7 @@
+ sage: alpha = var('a, b')
+ sage: F.asymptotic_decomposition(alpha)
+ (0, []) +
+- (1/3*(2*b*x - a*y)*r/(x*y) + 1/3*(2*x - y)/(x*y),
++ (-1/3*r*(a/x - 2*b/y) - 1/3/x + 2/3/y,
+ [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
+ """
+ R = self.denominator_ring
+@@ -1600,7 +1606,7 @@
+ (1, [(x*y + x + y - 1, 2)])
+ sage: alpha = [4, 3]
+ sage: decomp = F.asymptotic_decomposition(alpha); decomp
+- (0, []) + (-3/2*r*(y + 1)/y - 1/2*(y + 1)/y, [(x*y + x + y - 1, 1)])
++ (0, []) + (-3/2*r*(1/y + 1) - 1/2/y - 1/2, [(x*y + x + y - 1, 1)])
+ sage: F1 = decomp[1]
+ sage: p = {y: 1/3, x: 1/2}
+ sage: asy = F1.asymptotics(p, alpha, 2, verbose=True)
+@@ -1634,7 +1640,7 @@
+ sage: alpha = [3, 3, 2]
+ sage: decomp = F.asymptotic_decomposition(alpha); decomp
+ (0, []) +
+- (16*r*(4*y - 3*z)/(y*z) + 16*(2*y - z)/(y*z),
++ (-16*r*(3/y - 4/z) - 16/y + 32/z,
+ [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 1)])
+ sage: F1 = decomp[1]
+ sage: p = {x: 1, y: 1, z: 1}
+--- a/sage/src/sage/rings/asymptotic/term_monoid.py
++++ b/sage/src/sage/rings/asymptotic/term_monoid.py
+@@ -3339,7 +3339,7 @@
+ sage: T(x^1234).log_term()
+ (1234*log(x),)
+ sage: T(49*x^7).log_term(base=7)
+- (log(49)/log(7), 7/log(7)*log(x))
++ (2, 7/log(7)*log(x))
+
+ ::
+
+@@ -3347,7 +3347,7 @@
+ sage: T('x * y').log_term()
+ (log(x), log(y))
+ sage: T('4 * x * y').log_term(base=2)
+- (log(4)/log(2), 1/log(2)*log(x), 1/log(2)*log(y))
++ (2, 1/log(2)*log(x), 1/log(2)*log(y))
+
+ .. SEEALSO::
+
+--- a/sage/src/sage/rings/integer.pyx
++++ b/sage/src/sage/rings/integer.pyx
+@@ -2532,7 +2532,7 @@
+ sage: Integer(125).log(5,prec=53)
+ 3.00000000000000
+ sage: log(Integer(125))
+- log(125)
++ 3*log(5)
+
+ For extremely large numbers, this works::
+
+--- a/sage/src/sage/rings/rational.pyx
++++ b/sage/src/sage/rings/rational.pyx
+@@ -3075,11 +3075,11 @@
+ sage: (124/345).log(5,100)
+ -0.63578895682825611710391773754
+ sage: log(QQ(125))
+- log(125)
++ 3*log(5)
+ sage: log(QQ(125), 5)
+ 3
+ sage: log(QQ(125), 3)
+- log(125)/log(3)
++ 3*log(5)/log(3)
+ sage: QQ(8).log(1/2)
+ -3
+ sage: (1/8).log(1/2)
+--- a/sage/src/sage/schemes/elliptic_curves/ell_point.py
++++ b/sage/src/sage/schemes/elliptic_curves/ell_point.py
+@@ -2886,7 +2886,7 @@
+ sage: Q.non_archimedean_local_height(K.ideal(1-2*i))
+ 0
+ sage: Q.non_archimedean_local_height()
+- 1/2*log(16)
++ 2*log(2)
+
+ An example over the rational numbers::
+
+--- a/sage/src/sage/symbolic/constants_c.pyx
++++ b/sage/src/sage/symbolic/constants_c.pyx
+@@ -145,14 +145,14 @@
+ sage: t.operands()
+ [a]
+
+- As opposed to::
++ This applies to the unit argument as well::
+
+ sage: u = SR(1).exp()^a; u
+ e^a
+ sage: u.operator()
+- <built-in function pow>
++ exp
+ sage: u.operands()
+- [e, a]
++ [a]
+
+ It also works with matrices (see :trac:`4735`)::
+
+--- a/sage/src/sage/tests/french_book/calculus_doctest.py
++++ b/sage/src/sage/tests/french_book/calculus_doctest.py
+@@ -331,7 +331,7 @@
+ Sage example in ./calculus.tex, line 929::
+
+ sage: v(x) = diff(u(x), x); sol = solve(v(x) == 0, x); sol
+- [x == 100/log(100), x == 0]
++ [x == 50/log(10), x == 0]
+ sage: floor(sol[0].rhs())
+ 21
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list