You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/sympy/files/sympy-1.1.1-zeta.patch

30 lines
1.1 KiB

diff -U2 -r sympy-1.1.1.orig/sympy/functions/special/zeta_functions.py sympy-1.1.1/sympy/functions/special/zeta_functions.py
--- sympy-1.1.1.orig/sympy/functions/special/zeta_functions.py 2017-07-22 05:17:42.000000000 +0700
+++ sympy-1.1.1/sympy/functions/special/zeta_functions.py 2017-07-28 06:35:28.477927184 +0700
@@ -272,4 +272,5 @@
@classmethod
def eval(cls, s, z):
+ from sympy import unpolarify
if z == 1:
return zeta(s)
@@ -277,5 +278,11 @@
return -dirichlet_eta(s)
elif z == 0:
- return 0
+ return S.Zero
+
+ # branch handling
+ if (1 - abs(z)).is_nonnegative:
+ newz = unpolarify(z)
+ if newz != z:
+ return cls(s, newz)
def fdiff(self, argindex=1):
@@ -483,5 +490,5 @@
For `\operatorname{Re}(s) > 0`, this function is defined as
- .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^n}{n^s}.
+ .. math:: \eta(s) = \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^s}.
It admits a unique analytic continuation to all of :math:`\mathbb{C}`.