# HG changeset patch
# User Robert Bradshaw <robertwb@math.washington.edu>
# Date 1285582286 3600
# Node ID 30e18d8fdead2bf100c82bde6674241c379aa5f0
# Parent 5ac4a880d6bea25016621313c71631451a7800af
#5739, complex zeta segfaults on pole at 1
diff r 5ac4a880d6be r 30e18d8fdead sage/rings/complex_double.pyx
a

b


2131  2131  0.582158059752  0.926848564331*I 
2132  2132  sage: zeta(z) 
2133  2133  0.582158059752  0.926848564331*I 
 2134  sage: zeta(CDF(1)) 
 2135  Infinity 
2134  2136  """ 
 2137  if self._complex.dat[0] == 1 and self._complex.dat[1] == 0: 
 2138  import infinity 
 2139  return infinity.unsigned_infinity 
2135  2140  cdef pari_sp sp 
2136  2141  sp = avma 
2137  2142  return self._new_from_gen_c( gzeta(self._gen(), PREC), sp) 
diff r 5ac4a880d6be r 30e18d8fdead sage/rings/complex_number.pyx
a

b


2087  2087  0.58215806  0.92684856*I 
2088  2088  sage: zeta(z) 
2089  2089  0.58215806  0.92684856*I 
 2090  
 2091  sage: CC(1).zeta() 
 2092  Infinity 
2090  2093  """ 
 2094  if mpfr_zero_p(self.__im) and mpfr_cmp_ui(self.__re, 1) == 0: 
 2095  import infinity 
 2096  return infinity.unsigned_infinity 
2091  2097  return self._parent(self._pari_().zeta()) 
2092  2098  
2093  2099  def algdep(self, n, **kwds): 