+
    i^                        R t ^ RIHt ^ RIHt ^ RIHtHtHt ^ RI	H
t
 ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHtHtHtHt ^ RIHtHtHtH t  ^ RI!H"t"H#t#H$t$ ^ RI%H&t&H't' ^ RI(H)t) ^ RI*H+t+ ^ RI,H-t-  ! R R]4      t. ! R R]4      t/ ! R R]4      t0 ! R R]4      t1 ! R R]4      t2 ! R R]4      t3]R 4       t4R# )z#Riemann zeta and related function. )Add)cacheit)ArgumentIndexError
expand_mulDefinedFunction)	fuzzy_not)piIInteger)Eq)S)Dummy)sympify)	bernoulli	factorialgenocchiharmonic)re
unpolarifyAbs
polar_lift)log	exp_polarexp)ceilingfloor)sqrt)	Piecewise)Polyc                   F   a  ] tR t^t o RtR tR	R ltR tR tR t	Rt
V tR# )
lerchphiaB  
Lerch transcendent (Lerch phi function).

Explanation
===========

For $\operatorname{Re}(a) > 0$, $|z| < 1$ and $s \in \mathbb{C}$, the
Lerch transcendent is defined as

.. math :: \Phi(z, s, a) = \sum_{n=0}^\infty \frac{z^n}{(n + a)^s},

where the standard branch of the argument is used for $n + a$,
and by analytic continuation for other values of the parameters.

A commonly used related function is the Lerch zeta function, defined by

.. math:: L(q, s, a) = \Phi(e^{2\pi i q}, s, a).

**Analytic Continuation and Branching Behavior**

It can be shown that

.. math:: \Phi(z, s, a) = z\Phi(z, s, a+1) + a^{-s}.

This provides the analytic continuation to $\operatorname{Re}(a) \le 0$.

Assume now $\operatorname{Re}(a) > 0$. The integral representation

.. math:: \Phi_0(z, s, a) = \int_0^\infty \frac{t^{s-1} e^{-at}}{1 - ze^{-t}}
                            \frac{\mathrm{d}t}{\Gamma(s)}

provides an analytic continuation to $\mathbb{C} - [1, \infty)$.
Finally, for $x \in (1, \infty)$ we find

.. math:: \lim_{\epsilon \to 0^+} \Phi_0(x + i\epsilon, s, a)
         -\lim_{\epsilon \to 0^+} \Phi_0(x - i\epsilon, s, a)
         = \frac{2\pi i \log^{s-1}{x}}{x^a \Gamma(s)},

using the standard branch for both $\log{x}$ and
$\log{\log{x}}$ (a branch of $\log{\log{x}}$ is needed to
evaluate $\log{x}^{s-1}$).
This concludes the analytic continuation. The Lerch transcendent is thus
branched at $z \in \{0, 1, \infty\}$ and
$a \in \mathbb{Z}_{\le 0}$. For fixed $z, a$ outside these
branch points, it is an entire function of $s$.

Examples
========

The Lerch transcendent is a fairly general function, for this reason it does
not automatically evaluate to simpler functions. Use ``expand_func()`` to
achieve this.

If $z=1$, the Lerch transcendent reduces to the Hurwitz zeta function:

>>> from sympy import lerchphi, expand_func
>>> from sympy.abc import z, s, a
>>> expand_func(lerchphi(1, s, a))
zeta(s, a)

More generally, if $z$ is a root of unity, the Lerch transcendent
reduces to a sum of Hurwitz zeta functions:

>>> expand_func(lerchphi(-1, s, a))
zeta(s, a/2)/2**s - zeta(s, a/2 + 1/2)/2**s

If $a=1$, the Lerch transcendent reduces to the polylogarithm:

>>> expand_func(lerchphi(z, s, 1))
polylog(s, z)/z

More generally, if $a$ is rational, the Lerch transcendent reduces
to a sum of polylogarithms:

>>> from sympy import S
>>> expand_func(lerchphi(z, s, S(1)/2))
2**(s - 1)*(polylog(s, sqrt(z))/sqrt(z) -
            polylog(s, sqrt(z)*exp_polar(I*pi))/sqrt(z))
>>> expand_func(lerchphi(z, s, S(3)/2))
-2**s/z + 2**(s - 1)*(polylog(s, sqrt(z))/sqrt(z) -
                      polylog(s, sqrt(z)*exp_polar(I*pi))/sqrt(z))/z

The derivatives with respect to $z$ and $a$ can be computed in
closed form:

>>> lerchphi(z, s, a).diff(z)
(-a*lerchphi(z, s, a) + lerchphi(z, s - 1, a))/z
>>> lerchphi(z, s, a).diff(a)
-s*lerchphi(z, s + 1, a)

See Also
========

polylog, zeta

References
==========

.. [1] Bateman, H.; Erdelyi, A. (1953), Higher Transcendental Functions,
       Vol. I, New York: McGraw-Hill. Section 1.11.
.. [2] https://dlmf.nist.gov/25.14
.. [3] https://en.wikipedia.org/wiki/Lerch_transcendent

c                d	   V P                   w  r#pV^8X  d   \        W44      # VP                  '       d   V^ 8:  d   \        R4      p\	        WT,           V) ,          V4      p^^V,
          ,          p\
        P                  p\        VP                  4       4       F)  p	WV,          ,          pWWP                  V4      ,          pK+  	  VP                  WR4      # VP                  '       Ed$   \
        P                  p
\
        P                  pV^8  dp   \        V4      pW8X  d
   V^,          pWL,          pW,) ,          p\        \        V4       Uu. uF&  qW,
          ,          ) WM,           V,          ,          NK(  	  up!  p
M{V^ 8:  du   \        V) 4      ^,           pWL,          pW,,          p\        \        V4       Uu. uF4  qV^,
          V,
          ,          WM,
          ^,
          V,          ,          NK6  	  up!  p
\        VP                   VP"                  .4      w  r\%        ^\&        ,          \(        ,          V,          4      pV^V,          ,          p\+        V4      p. p\        V4       Fq  p\-        W?V,          V,          4      p\/        V\,        4      '       d   VP0                  ! R/ VB pVP3                  VVV,          V,          V,          ,          4       Ks  	  WW^,
          ,          ,          \        V!  ,          ,           # \/        V\4        4      '       d:   VP                   ^ ,          \&        \(        ,          ,          P                  '       g   VR\(        \(        ) 39   Ed(   VR8X  d   \        ^^.4      w  ppMV\(        8X  d   \        ^^.4      w  ppMqV\(        ) 8X  d   \        R^.4      w  ppMTVP                   ^ ,          ^\&        ,          \(        ,          ,          p\        VP                   VP"                  .4      w  pp\        \        V4       Uu. uFe  p\5        ^\&        ,          \(        ,          V,          V,          V,          4      VV,          ,          \        W=V,           V,          4      ,          NKg  	  up!  # \7        W#V4      # u upi u upi u upi )   t )argszeta
is_Integerr   r   r   Zeroreversed
all_coeffsdiffsubsis_RationalOner   r   rangepqr   r   r	   r   polylog
isinstance_eval_expand_funcappendr   r    )selfhintszsar#   r1   startrescaddmulnkmzetrootup_zetaddargsr2   args   &,                   d/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/functions/special/zeta_functions.pyr5   lerchphi._eval_expand_func   s|   ))a6:<<<AFc
Aaer]A&Aq1uIE&&Calln-w**Q- . 88A>!=== &&C%%C1u!H6FA"gE!HEHqZK
22HEFa1"IMd58L8aA	NAEAI>998LMacc133Z=DAAbDF1H%Cqs8D_FG1XAAvd{+a))++4e4Aq&!)D.1!445	 
 QQZW555 a166!9bd#3"@"@"@A"aRSQSDTBw!Qy1a!Qy1qb"az1ffQi2a(#%%(1"'(,"*Q QrT!VAXaZ\*1a4/QQ	0BBB"*, - - a  E F
 M4,s   ,R#<:R('A+R-c                    V P                   w  r#pV^8X  d   V) \        W#^,           V4      ,          # V^8X  d3   \        W#^,
          V4      V\        W#V4      ,          ,
          V,          # \        h)   )r&   r    r   )r7   argindexr9   r:   r;   s   &&   rI   fdifflerchphi.fdiff   sb    ))aq=2hqa%+++]QAq)AhqQ.?,??BB$$    c                X    V P                  4       pVP                  V4      '       d   V# V # N)r5   has)r7   targetr=   s   && rI   _eval_rewrite_helperlerchphi._eval_rewrite_helper   s'    $$&776??JKrP   c                ,    V P                  \        4      # rR   )rU   r'   r7   r9   r:   r;   kwargss   &&&&,rI   _eval_rewrite_as_zetalerchphi._eval_rewrite_as_zeta   s    ((..rP   c                ,    V P                  \        4      # rR   )rU   r3   rX   s   &&&&,rI   _eval_rewrite_as_polylog!lerchphi._eval_rewrite_as_polylog   s    ((11rP   r$   Nr"   )__name__
__module____qualname____firstlineno____doc__r5   rN   rU   rZ   r]   __static_attributes____classdictcell____classdict__s   @rI   r    r       s+     gR?!B%/2 2rP   r    c                   f   a a ] tR t^t oRt]R 4       tR	R ltR tR t	R t
R
V 3R lltRtVtV ;t# )r3   aR  
Polylogarithm function.

Explanation
===========

For $|z| < 1$ and $s \in \mathbb{C}$, the polylogarithm is
defined by

.. math:: \operatorname{Li}_s(z) = \sum_{n=1}^\infty \frac{z^n}{n^s},

where the standard branch of the argument is used for $n$. It admits
an analytic continuation which is branched at $z=1$ (notably not on the
sheet of initial definition), $z=0$ and $z=\infty$.

The name polylogarithm comes from the fact that for $s=1$, the
polylogarithm is related to the ordinary logarithm (see examples), and that

.. math:: \operatorname{Li}_{s+1}(z) =
                \int_0^z \frac{\operatorname{Li}_s(t)}{t} \mathrm{d}t.

The polylogarithm is a special case of the Lerch transcendent:

.. math:: \operatorname{Li}_{s}(z) = z \Phi(z, s, 1).

Examples
========

For $z \in \{0, 1, -1\}$, the polylogarithm is automatically expressed
using other functions:

>>> from sympy import polylog
>>> from sympy.abc import s
>>> polylog(s, 0)
0
>>> polylog(s, 1)
zeta(s)
>>> polylog(s, -1)
-dirichlet_eta(s)

If $s$ is a negative integer, $0$ or $1$, the polylogarithm can be
expressed using elementary functions. This can be done using
``expand_func()``:

>>> from sympy import expand_func
>>> from sympy.abc import z
>>> expand_func(polylog(1, z))
-log(1 - z)
>>> expand_func(polylog(0, z))
z/(1 - z)

The derivative with respect to $z$ can be computed in closed form:

>>> polylog(s, z).diff(z)
polylog(s - 1, z)/z

The polylogarithm can be expressed in terms of the lerch transcendent:

>>> from sympy import lerchphi
>>> polylog(s, z).rewrite(lerchphi)
z*lerchphi(z, s, 1)

See Also
========

zeta, lerchphi

c                ~   VP                   '       d   V\        P                  J d   \        V4      # V\        P                  J d   \        V4      ) # V\        P                  J d   \        P                  # V^8X  d   \        4       pW#9   d	   W2,          # VP                  '       d   \        P                  # VP                  \        P                  4      pV'       d   \        V4      # VRJ dr   V\        P                  J d   V^V,
          ,          # V\        P                  J d   V^V,
          ^,          ,          # VP                  '       d   V^V,
          ,          # VP                  \        \        4      '       d>   V'       g"   \        V4      \        P                  8*  R8X  d   V ! V\        V4      4      # R# R# )   FTN)	is_numberr   r/   r'   NegativeOnedirichlet_etar)   _dilogtableis_zeroequalsrS   r   r   r   r   )clsr:   r9   
dilogtablezones   &&&  rI   evalpolylog.eval%  s2   ;;;AEEzAwamm#%a(((affvva(]
?%=(99966M xx7NU]
 AFF{!a%y amm#!a%!|#yyy!a%y  55J''Tc!fo$5Nq*Q-(( 6O'rP   c                l    V P                   w  r#V^8X  d   \        V^,
          V4      V,          # \        hrk   )r&   r3   r   )r7   rM   r:   r9   s   &&  rI   rN   polylog.fdiffL  s0    yyq=1q5!$Q&&  rP   c                (    V\        W!^4      ,          # r_   r    )r7   r:   r9   rY   s   &&&,rI   _eval_rewrite_as_lerchphi!polylog._eval_rewrite_as_lerchphiR  s    !"""rP   c                X   V P                   w  r#V^8X  d   \        ^V,
          4      ) # VP                  '       dg   V^ 8:  d`   \        R4      pV^V,
          ,          p\	        V) 4       F  pWEP                  V4      ,          pK  	  \        V4      P                  WC4      # \        W#4      # )r"   u)	r&   r   r(   r   r0   r,   r   r-   r3   )r7   r8   r:   r9   r   r<   _s   &,     rI   r5   polylog._eval_expand_funcU  s    yy6AJ;<<<AFc
Aq1uIEA2Y**Q- e$))!//q}rP   c                T    V P                   ^,          pVP                  '       d   R# R# )r"   TN)r&   rp   )r7   r9   s   & rI   _eval_is_zeropolylog._eval_is_zeroa  s     IIaL999 rP   c                  < ^ RI Hp V P                  w  rgVP                  V^ 4      pV\        P
                  J d2   TP                  T^ \        V4      P                  '       d   RMRR7      pVP                  '       d    VP                  V4      w  rT
P                  '       d   \        Y*,          4      pT! Y,          T4      pTP                  YY44      P!                  4       pT\        P"                  J d   T# TpT.p\%        ^T4       F*  pY,          pTP'                  TTT,          ,          4       K,  	  \)        T!  T,           # \*        \,        V `?  WW44      #   \        \        3 d    T u # i ; i)    )Order-+)dir)sympy.series.orderr   r&   r-   r   NaNlimitr   is_negativerp   leadterm
ValueErrorNotImplementedErroris_positiver   _eval_nseriesremoveOr)   r0   r6   r   superr3   )r7   xrA   logxcdirr   nur9   z0r   r   newnortermr:   rB   	__class__s   &&&&&            rI   r   polylog._eval_nseriesf  s0   ,		VVAq\;A"T(*>*>*>3CHB:::A qu~!$NOOA$5==?;HFq$AIDHHT!R%Z( ( Aw{"Wd1!CC#  34 s    E E43E4r$   r_   r   )r`   ra   rb   rc   rd   classmethodru   rN   r|   r5   r   r   re   rf   __classcell__r   rh   s   @@rI   r3   r3      sA     CJ $) $)L!#

D DrP   r3   c                   ~   a a ] tR tRt oRt]RR l4       tRR ltRR ltRR lt	R t
R tRR	 ltV 3R
 ltRtVtV ;t# )r'   i  a	  
Hurwitz zeta function (or Riemann zeta function).

Explanation
===========

For $\operatorname{Re}(a) > 0$ and $\operatorname{Re}(s) > 1$, this
function is defined as

.. math:: \zeta(s, a) = \sum_{n=0}^\infty \frac{1}{(n + a)^s},

where the standard choice of argument for $n + a$ is used. For fixed
$a$ not a nonpositive integer the Hurwitz zeta function admits a
meromorphic continuation to all of $\mathbb{C}$; it is an unbranched
function with a simple pole at $s = 1$.

The Hurwitz zeta function is a special case of the Lerch transcendent:

.. math:: \zeta(s, a) = \Phi(1, s, a).

This formula defines an analytic continuation for all possible values of
$s$ and $a$ (also $\operatorname{Re}(a) < 0$), see the documentation of
:class:`lerchphi` for a description of the branching behavior.

If no value is passed for $a$ a default value of $a = 1$ is assumed,
yielding the Riemann zeta function.

Examples
========

For $a = 1$ the Hurwitz zeta function reduces to the famous Riemann
zeta function:

.. math:: \zeta(s, 1) = \zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}.

>>> from sympy import zeta
>>> from sympy.abc import s
>>> zeta(s, 1)
zeta(s)
>>> zeta(s)
zeta(s)

The Riemann zeta function can also be expressed using the Dirichlet eta
function:

>>> from sympy import dirichlet_eta
>>> zeta(s).rewrite(dirichlet_eta)
dirichlet_eta(s)/(1 - 2**(1 - s))

The Riemann zeta function at nonnegative even and negative integer
values is related to the Bernoulli numbers and polynomials:

>>> zeta(2)
pi**2/6
>>> zeta(4)
pi**4/90
>>> zeta(0)
-1/2
>>> zeta(-1)
-1/12
>>> zeta(-4)
0

The specific formulae are:

.. math:: \zeta(2n) = -\frac{(2\pi i)^{2n} B_{2n}}{2(2n)!}
.. math:: \zeta(-n,a) = -\frac{B_{n+1}(a)}{n+1}

No closed-form expressions are known at positive odd integers, but
numerical evaluation is possible:

>>> zeta(3).n()
1.20205690315959

The derivative of $\zeta(s, a)$ with respect to $a$ can be computed:

>>> from sympy.abc import a
>>> zeta(s, a).diff(a)
-s*zeta(s + 1, a)

However the derivative with respect to $s$ has no useful closed form
expression:

>>> zeta(s, a).diff(s)
Derivative(zeta(s, a), s)

The Hurwitz zeta function can be expressed in terms of the Lerch
transcendent, :class:`~.lerchphi`:

>>> from sympy import lerchphi
>>> zeta(s, a).rewrite(lerchphi)
lerchphi(1, s, a)

See Also
========

dirichlet_eta, lerchphi, polylog

References
==========

.. [1] https://dlmf.nist.gov/25.11
.. [2] https://en.wikipedia.org/wiki/Hurwitz_zeta_function

c                v   V\         P                  J d	   V ! V4      # V\         P                  J g   V\         P                  J d   \         P                  # V\         P                  J d   \         P                  # V\         P                  J d   \         P                  # V\         P                  J d   \         P
                  # VP                  pVf   \         P                  pV'       d4   VP                  '       d"   \        ^V,
          V4      V^,
          ,          # V\         P                  J df   V'       d\   VP                  '       dH   ^\        ,          \        ,          V,          ) \        V4      ,          ^\        V4      ,          ,          # R # R # V'       dE   VP                  '       d3   VP                  '       d!   V ! V4      \        V^,
          V4      ,
          # VP                  '       dG   VP                  '       d3   VP                  RJ g   VP                  RJ d   \         P                  # R # R # R # )NF)r   r/   r   ComplexInfinityInfinityr)   r(   is_nonpositiver   is_evenr   r	   r   r   r   
is_integer)rr   r:   r;   sints   &&& rI   ru   	zeta.eval  si   :q6M!%%Z1:55L!%%Z$$$!**_55L!**_66M||9AA$$$QqS!$!,,!%%Z			2a!|il2a	!nEE "talllq}}}q6HQqS!,,,\\\a...&!*:*:e*C55L +D /\rP   c                L   V^8X  d~   VP                   '       dl   VP                  '       dZ   VP                  '       dH   ^\        ,          \        ,          V,          ) \        V4      ,          ^\        V4      ,          ,          # \        ^V,
          V4      V^,
          ,          # r_   )r   is_nonnegativer   r   r	   r   r   r7   r:   r;   rY   s   &&&,rI   _eval_rewrite_as_bernoullizeta._eval_rewrite_as_bernoulli  sh    6alllq'7'7'7AIIIrT!VaK<)A,.!IaL.AA1a AaC((rP   c                    V^8w  d   V # V P                   ^ ,          p\        V4      ^^^V,
          ,          ,
          ,          # r_   )r&   rn   r   s   &&&,rI   _eval_rewrite_as_dirichlet_eta#zeta._eval_rewrite_as_dirichlet_eta  s7    6KIIaLQQQZ00rP   c                    \        ^W4      # r_   r{   r   s   &&&,rI   r|   zeta._eval_rewrite_as_lerchphi  s    1  rP   c                \    \        V P                  ^ ,          ^,
          P                  4      # r   )r   r&   rp   )r7   s   &rI   _eval_is_finitezeta._eval_is_finite  s     $))A,*3344rP   c                   V P                   ^ ,          p\        V P                   4      ^8  d   V P                   ^,          M\        P                  pVP                  '       dx   VP
                  '       d$   \        V4      \        V^,
          V4      ,
          # VP                  '       d1   VP                  RJ g   VP                  RJ d   \        P                  # V # )r   F)
r&   lenr   r/   r   r   r'   r   r   r   )r7   r8   r:   r;   s   &,  rI   r5   zeta._eval_expand_func"  s    IIaL		NQ.DIIaLAEE<<<}}}Aw!A#q!111Q\\U%:$$-uurP   c                    \        V P                  4      ^8X  d   V P                  w  r#MV P                  R,           w  r#V^8X  d   V) \        V^,           V4      ,          # \        h)rk   r_   )r   r&   r'   r   )r7   rM   r:   r;   s   &&  rI   rN   
zeta.fdiff-  sS    tyy>Q99DAq99t#DAq=2d1q5!n$$$$rP   c                j  < \        V P                  4      ^8X  d   V P                  w  rEM$V P                  \        P                  3,           w  rE VP	                  V4      w  rgTP                  '       d   TP                  '       g   \
        h\        \        T `+  YTR7      #   \
         d    T u # i ; i)rk   )r   r   )r   r&   r   r/   r   r   r   r   r   r'   _eval_as_leading_term)	r7   r   r   r   r:   r;   r>   er   s	   &&&&    rI   r   zeta._eval_as_leading_term7  s    tyy>Q99DAq99x'DA	::a=DA ===%%T46q$6OO # 	K	s   B" "B21B2r$   rR   r_   )r`   ra   rb   rc   rd   r   ru   r   r   r|   r   r5   rN   r   re   rf   r   r   s   @@rI   r'   r'     sJ     hT  4)
1!5	%P PrP   r'   c                   h   a  ] tR tRt o Rt]R	R l4       tR
R lt]P                  3R lt
R tRtV tR# )rn   iH  aE  
Dirichlet eta function.

Explanation
===========

For $\operatorname{Re}(s) > 0$ and $0 < x \le 1$, this function is defined as

.. math:: \eta(s, a) = \sum_{n=0}^\infty \frac{(-1)^n}{(n+a)^s}.

It admits a unique analytic continuation to all of $\mathbb{C}$ for any
fixed $a$ not a nonpositive integer. It is an entire, unbranched function.

It can be expressed using the Hurwitz zeta function as

.. math:: \eta(s, a) = \zeta(s,a) - 2^{1-s} \zeta\left(s, \frac{a+1}{2}\right)

and using the generalized Genocchi function as

.. math:: \eta(s, a) = \frac{G(1-s, a)}{2(s-1)}.

In both cases the limiting value of $\log2 - \psi(a) + \psi\left(\frac{a+1}{2}\right)$
is used when $s = 1$.

Examples
========

>>> from sympy import dirichlet_eta, zeta
>>> from sympy.abc import s
>>> dirichlet_eta(s).rewrite(zeta)
Piecewise((log(2), Eq(s, 1)), ((1 - 2**(1 - s))*zeta(s), True))

See Also
========

zeta

References
==========

.. [1] https://en.wikipedia.org/wiki/Dirichlet_eta_function
.. [2] Peter Luschny, "An introduction to the Bernoulli function",
       https://arxiv.org/abs/2009.06743

Nc                j   V\         P                  J d	   V ! V4      # VfY   V^8X  d   \        ^4      # \        V4      pVP	                  \        4      '       g   ^^^V,
          ,          ,
          V,          # R # V^8X  d:   ^ RIHp \        ^4      V! V4      ,
          V! V^,           ^,          4      ,           # \        W4      p\        W^,           ^,          4      pVP	                  \        4      '       g<   VP	                  \        4      '       g   V^^V,
          ,          V,          ,
          # R # R # )Ndigamma)r   r/   r   r'   rS   'sympy.functions.special.gamma_functionsr   )rr   r:   r;   r9   r   z1z2s   &&&    rI   ru   dirichlet_eta.evalw  s    :q6M9Av1vQA55;;A!H))!VGq6GAJ&!A#q)999!Z!c1Wvvd||BFF4LLAaC2%% %1|rP   c           
        ^ RI Hp V^8X  dI   \        \        ^4      \	        V^4      3^^^V,
          ,          ,
          \        V4      ,          R34      # \        \        ^4      V! V4      ,
          V! V^,           ^,          4      ,           \	        V^4      3\        W4      ^^V,
          ,          \        W^,           ^,          4      ,          ,
          R34      # r   r   T)r   r   r   r   r   r'   r7   r:   r;   rY   r   s   &&&, rI   rZ   #dirichlet_eta._eval_rewrite_as_zeta  s    C6c!fbAh/1q1Q3x<472JD1QRR#a&71:-1a0@@"Q(Kaa!A#haA#q)9994@B 	BrP   c                    ^ RI Hp \        \        ^4      V! V4      ,
          V! V^,           ^,          4      ,           \	        V^4      3\        ^V,
          V4      ^V^,
          ,          ,          R34      # r   )r   r   r   r   r   r   r   s   &&&, rI   _eval_rewrite_as_genocchi'dirichlet_eta._eval_rewrite_as_genocchi  s^    C#a&71:-1a0@@"Q(K!A#q!Q!A#Y/68 	8rP   c                    \         ;QJ d&    R  V P                   4       F  '       d   K   RM	  RM! R  V P                   4       4      '       d%   V P                  \        4      P	                  V4      # R# )c              3   8   "   T F  qP                   x  K  	  R # 5irR   )rl   ).0is   & rI   	<genexpr>,dirichlet_eta._eval_evalf.<locals>.<genexpr>  s     .Iq{{Is   FTN)allr&   rewriter'   _eval_evalf)r7   precs   &&rI   r   dirichlet_eta._eval_evalf  sJ    3.DII.333.DII...<<%11$77 /rP   r$   rR   r_   )r`   ra   rb   rc   rd   r   ru   rZ   r   r/   r   r   re   rf   rg   s   @rI   rn   rn   H  s=     ,\ & &$B ./UU 8
8 8rP   rn   c                   :   a  ] tR tRt o Rt]R 4       tR tRtV t	R# )
riemann_xii  a  
Riemann Xi function.

Examples
========

The Riemann Xi function is closely related to the Riemann zeta function.
The zeros of Riemann Xi function are precisely the non-trivial zeros
of the zeta function.

>>> from sympy import riemann_xi, zeta
>>> from sympy.abc import s
>>> riemann_xi(s).rewrite(zeta)
s*(s - 1)*gamma(s/2)*zeta(s)/(2*pi**(s/2))

References
==========

.. [1] https://en.wikipedia.org/wiki/Riemann_Xi_function

c                R   ^ RI Hp \        V4      pV\        P                  \        P
                  39   d   \        P                  # \        V\        4      '       gK   W^,
          ,          V! V^,          4      ,          V,          ^\        V^,          ,          ,          ,          # R# )r   gammaN)	r   r   r'   r   r)   r/   Halfr4   r   )rr   r:   r   r9   s   &&  rI   ru   riemann_xi.eval  sl    AG66M!T""!e9U1Q3Z')1R!A#Y;77 #rP   c                    ^ RI Hp W^,
          ,          V! V^,          4      ,          \        V4      ,          ^\        V^,          ,          ,          ,          # )r   r   )r   r   r'   r   )r7   r:   rY   r   s   &&, rI   rZ    riemann_xi._eval_rewrite_as_zeta  s8    Aa%yqs#DG+QrAaCy[99rP   r$   N)
r`   ra   rb   rc   rd   r   ru   rZ   re   rf   rg   s   @rI   r   r     s(     . 8 8: :rP   r   c                   8   a  ] tR tRt o Rt]RR l4       tRtV tR# )	stieltjesi  a$  
Represents Stieltjes constants, $\gamma_{k}$ that occur in
Laurent Series expansion of the Riemann zeta function.

Examples
========

>>> from sympy import stieltjes
>>> from sympy.abc import n, m
>>> stieltjes(n)
stieltjes(n)

The zero'th stieltjes constant:

>>> stieltjes(0)
EulerGamma
>>> stieltjes(0, 1)
EulerGamma

For generalized stieltjes constants:

>>> stieltjes(n, m)
stieltjes(n, m)

Constants are only defined for integers >= 0:

>>> stieltjes(-1)
zoo

References
==========

.. [1] https://en.wikipedia.org/wiki/Stieltjes_constants

Nc                   Ved   \        V4      pV\        P                  J d   \        P                  # VP                  '       d#   VP                  '       d   \        P
                  # VP                  '       d   V\        P                  J d   \        P                  # V^ 8  d   \        P
                  # VP                  '       g   \        P
                  # V\        P                  J d   VR9   d   \        P                  # VP                  '       d   \        P
                  # VP                  '       d   VR9   d   \        P                  # VP                  R8X  d   \        P
                  # R # )NF)Nr"   )r   r   r   r(   r   r   	is_Numberr)   
EulerGammais_extended_negativerp   r   )rr   rA   r;   s   &&&rI   ru   stieltjes.eval  s    =
AAEEzuu||| 0 0 0(((;;;AEEzuuQ(((\\\(((affi||#!!!$$$999i<<<<5 $$$ !rP   r$   rR   )	r`   ra   rb   rc   rd   r   ru   re   rf   rg   s   @rI   r   r     s     "H % %rP   r   c                     \         P                  \        ^,          ^,          \        ^4      ^,          ^,          ,
          \	        ^4      \        ^,          ^,          \
        \        ,          \        ^4      ,          ,
          \        ^4      ^,
          ) ^,          \        ^,          ) ^,          \        \        ^4      ^,
          ^,          4      ^,          ^,          ,           \        ^4      ^,           ) ^,          \        ^,          ) ^
,          \        \        ^4      ^,           ^,          4      ^,          ,
          ^\        ^4      ,
          ^,          \        ^,          ^,          \        \        ^4      ^,
          ^,          4      ^,          ,
          \        ^4      ^,
          ^,          \        ^,          ^
,          \        \        ^4      ^,
          ^,          4      ^,          ,
          \
        \
        \         P                  ,          \        ^,          ^0,          ,
          \
        ) \
        ) \         P                  ,          \        ^,          ^0,          ,
          ^\
        ,
          \        ^,          ^,          \
        \         P                  ,          ,
          \        \
        ,          ^,          \        ^4      ,          ,
          ^\
        ,           \        ^,          ^,          \
        \         P                  ,          ,           \        \
        ,          ^,          \        ^4      ,          ,           ^\
        ,
          ^,          \        ^4      ^,          ) ^,          \        \
        ,          \        ^4      ,          ^,          ,           ^\        ^,          ,          ^`,          ,           \
        \         P                  ,          ,
          /# rx   )r   r   r   r   r
   r	   r   Catalanr$   rP   rI   ro   ro     s    	
Ab3q619Q;&
RU1WqtCF{*
q'A+qBE6"9sDGAIq='91'<Q'>>
q'A+qBE6"9sDGAIq='91'<<	
T!Wa"a%(S$q'!)Q%7%::	a1a"a%(S$q'!)Q%7%::	AaiiK"a%("	
aR		\BE"H$	AAb1QYY;&AaA6	AAb1QYY;&AaA6	
Q	SVQYJqL2a4A;q=01RU72:=!))K rP   N)5rd   sympy.core.addr   sympy.core.cacher   sympy.core.functionr   r   r   sympy.core.logicr   sympy.core.numbersr   r	   r
   sympy.core.relationalr   sympy.core.singletonr   sympy.core.symbolr   sympy.core.sympifyr   %sympy.functions.combinatorial.numbersr   r   r   r   $sympy.functions.elementary.complexesr   r   r   r   &sympy.functions.elementary.exponentialr   r   r   #sympy.functions.elementary.integersr   r   (sympy.functions.elementary.miscellaneousr   $sympy.functions.elementary.piecewiser   sympy.polys.polytoolsr   r    r3   r'   rn   r   r   ro   r$   rP   rI   <module>r      s    *  $ O O & - - $ " # & Z Z P P F F > 9 : &2 2LeDo eDXzP? zPzP8O P8f$: $:N?% ?%D 	 	rP   