+
    åûj^  ã                   ó’  € 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	W‰V,          ,          pWWP                  V4      ,          pK+  	  VP                  WR4      # VP                  '       Ed$   \
        P                  p
\
        P                  pV^8”  dp   \        V4      pWÄ8X  d
   V^,          pWL,          pW,) ,          p\        \        V4       Uu. uF&  qÒWÜ,
          ,          ) WM,           V,          ,          NK(  	  up!  p
M{V^ 8:  du   \        V) 4      ^,           pWL,          pW,,          p\        \        V4       Uu. uF4  qÒV^,
          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  	  W«WÃ^,
          ,          ,          \        V!  ,          ,           # \/        V\4        4      '       d:   VP                   ^ ,          \&        \(        ,          ,          P                  '       g   VR\(        \(        ) 39   Ed(   VR8X  d   \        ^^.4      w  ppM�V\(        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   &,                   ÚbC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\functions\special\zeta_functions.pyr5   Úlerchphi._eval_expand_funcƒ   s|  € Ø—)‘)‰ˆˆaØ�Œ6Ü˜“:ÐØ�<�<ˆ<˜A œFÜ�c“
ˆAÜ�a•e ˜r•] AÓ&ˆAØ�q˜1•u•IˆEÜ—&‘&ˆCÜ˜aŸl™l›nÖ-�Ø˜•w•�ØŸ*™* Q›-�’ñ .ð —8‘8˜A“>Ð!à�=�=‰=ô —&‘&ˆCÜ—%‘%ˆCà�1ŒuÜ˜!“H�Ø”6Ø˜•F�AØ•�Ø˜"•g�Ü¼EÀ!¼HÓE¹H°q ¥�Z˜K¨­°­
×2Ð2¹HÑEÑF‘Ø�a”Ü˜1˜"“I •M�Ø•�Ø•d�ÜÄ5ÈÄ8ÓLÁ8¸a  A¥¨¥	�N¨A­E°A­I¸­>×9Ð9Á8ÑLÑM�ä�a—c‘c˜1Ÿ3™3�Z“=‰DˆAÜ˜Aœb�D¤�F 1�HÓ%ˆCØ�q˜•s•8ˆDÜ “_ˆFØˆGÜ˜1–X�Ü˜A A�v d�{Ó+�Ü˜a¤×)Ò)Ø×+Ò+Ñ4¨eÑ4�AØ—‘˜q &¨!¥)¨D¥.°1Õ!4Õ4Ö5ñ	 ð
 ˜Q Q¥�Z�¬¨W©Õ5Õ5Ð5ô �aœ×Ò 1§6¡6¨!¥9¬b´­dÕ#3×"@×"@Ð"@ÀAÈ"ÌaÔRSÐQSÈÕDTà�BŒwÜ˜!˜Q˜“y‘�‘1Ø”a”Ü˜!˜Q˜“y‘�‘1Ø”q�b”Ü˜"˜a˜“z‘�‘1à—f‘f˜Q•i ¤2¥¤a¥Õ(�Ü˜#Ÿ%™% §¡˜Ó(‘��1ÜÜ"'¨¤(ó,Ù"*˜Qô ˜Qœr�T¤!�V A�X a�Z¨�\Ó*¨1¨a­4Õ/´°Q¸Q½À½	Ó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Œ=Ø�2”h˜q a¥%¨Ó+Õ+Ð+Ø˜Œ]Ü˜Q A¥ qÓ)¨A¬h°q¸QÓ.?Õ,?Õ?ÀÕ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'   € Ø×$Ñ$Ó&ˆØ�7‰7�6�?Š?Øˆ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  € à�;�;ˆ;Ø”A—E‘E‹zÜ˜A“w�Ø”a—m‘mÓ#Ü% aÓ(Ð(Ð(Ø”a—f‘f“Ü—v‘v�Ø�a”Ü(›]�
Ø”?Ø%�=Ð(à�9�9ˆ9Ü—6‘6ˆMð �x‰xœŸ™‹ˆçÜ˜“7ˆNØ�U‹]ð
 ”A—F‘F‹{Ø˜!˜a�%•yÐ Ø”a—m‘mÓ#Ø˜!˜a�% !�•|Ð#Ø�y�yˆyØ˜!˜a�%•yÐ ð �5‰5”œJ×'Ò'¯T´c¸!³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   € Ø�y‰y‰ˆØ�qŒ=Ü˜1˜q�5 !Ó$ 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ˆ   € Ø�y‰y‰ˆØ�Œ6Ü˜˜A�“J�;ÐØ�<�<ˆ<˜A œFÜ�c“
ˆAØ�q˜1•u•IˆEÜ˜A˜2–Y�ØŸ*™* 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    € Ø�I‰I�a�LˆØ�9�9ˆ9Ùñ 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  ršT
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  ø€ Ý,Ø—	‘	‰ˆà�V‰V�A�q‹\ˆØ”—‘‹;Ø—‘˜˜A¬"¨T«(×*>×*>Ð*>¡3ÀC�ÓHˆBà�:�:ˆ:ðØŸ™ A›‘�ð ��ˆÜ˜q�u“~�Ù˜!�$ “N�Ø—O‘O A¨$Ó5×=Ñ=Ó?�ØœŸ™“;Ø�Hà�Ø�F�Ü˜q $ž�AØ•I�DØ—H‘H˜T ! R¥%�ZÖ(ñ (ô ˜A‘w •{Ð"ä”W˜dÑ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  € à”—‘‹:Ù�q“6ˆMØ”!—%‘%‹Z˜1¤§¡›:Ü—5‘5ˆLØ”!—%‘%‹ZÜ×$Ñ$Ð$Ø”!—*‘*‹_Ü—5‘5ˆLØ”!—*‘*‹_Ü—6‘6ˆMà�|‰|ˆØŠ9Ü—‘ˆAß�A×$×$Ð$Ü˜Q˜q�S !Ó$¨¨!­Õ,Ð,Ø”!—%‘%‹Zß˜Ÿ	Ÿ	˜	Øœ2�œa� !��|¤i°£lÕ2°a¼	À!»µnÕEÐEñ "‰tç�a—l—l�l q§}§} }Ù�q“6œH Q q¥S¨!Ó,Õ,Ð,Ø�\�\ˆ\˜a×.×.Ð.Ø—‘ Ó&¨!×*:Ñ*:¸eÓ*CÜ—5‘5ˆLñ +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   € Ø�Œ6�a—l—l�l q×'7×'7Ð'7¸A¿I¿I¸IØ”r•Tœ!•V˜a•K�<¤)¨A£,Õ.°!´I¸a³Lµ.ÕAÐAÜ˜˜1�˜aÓ  A a¥CÕ(Ð(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Ø�I‰I�a�LˆÜ˜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�   € Ø�I‰I�a�LˆÜ §	¡	›N¨QÔ.ˆD�I‰I�aŽL´A·E±EˆØ�<�<ˆ<Ø�}�}ˆ}Ü˜A“w¤¨!¨A­#¨qÓ!1Õ1Ð1Ø××Ð Q§\¡\°UÓ%:Ø×$Ñ$¨Ó-Ü—u‘u�Øˆ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   € Üˆt�y‰y‹>˜QÔØ—9‘9‰DˆAˆqà—9‘9˜tÕ#‰DˆAØ�qŒ=Ø�2”d˜1˜q�5 !“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�   ø€ Üˆt�y‰y‹>˜QÔØ—9‘9‰DˆAˆqà—9‘9¤§¡˜xÕ'‰DˆAð	Ø—:‘:˜a“=‰DˆAð �=�=ˆ= §§ Ü%Ð%ä”T˜4Ñ6°qÈ$Ð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Ü   € à”—‘‹:Ù�q“6ˆMØŠ9Ø�AŒvÜ˜1“v�Ü�Q“ˆAØ—5‘5œ—;’;Ø˜A  !¥�H�¨Õ)Ð)ÙØ�!ŒVÝGÜ�q“6™G A›JÕ&©°!°Aµ#°qµÓ)9Õ9Ð9Ü�!‹ZˆÜ�!˜•c˜1•WÓˆØ�v‰v”d�|Š| B§F¡F¬4§L¢LØ˜˜A˜a�C� 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 !›f¤b¨¨A£hÐ/°1°q¸1¸Q½3µxµ<Ä4ÈÃ7Õ2JÈDÐ1QÓRÐRÜœ#˜a›&¡7¨1£:Õ-±¸¸1½¸a½Ó0@Õ@Ä"ÀQÈÃ(ÐKÜ�a“˜a ! A¥#�h¬¨a°Aµ#°qµÓ)9Õ9Õ9¸4Ð@ó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›&¡7¨1£:Õ-±¸¸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   é € Ð.¡I˜q�{Ž{£Iùs   ‚FTN)Úallr&   Úrewriter'   Ú_eval_evalf)r7   Úprecs   &&rI   rÛ   Údirichlet_eta._eval_evalf–  sJ   € ß‹3Ñ. D§I¢IÓ.�3�3Š3Ñ. D§I¢IÓ.×.Ò.Ø—<‘<¤Ó%×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ð ./¯U©Uô 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ˆØ”—‘œŸ™�ÔÜ—6‘6ˆMä˜!œT×"Ò"Ø˜!•e•9™U 1 Q¥3›ZÕ'¨Õ)¨1¬R°!°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Õ+¨Q¬r°A°aµC­y­[Õ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Ø”A—E‘E‹zÜ—u‘u�Ø�|�|ˆ| × 0× 0Ð 0Ü×(Ñ(Ð(à�;�;ˆ;Ø”A—E‘E‹zÜ—u‘u�Ø�Q”Ü×(Ñ(Ð(Ø—\—\�\Ü×(Ñ(Ð(Ø”a—f‘f“  i¤Ü—|‘|Ð#à×!×!Ð!Ü×$Ñ$Ð$à�9�9ˆ9˜˜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•œ3˜q›6 1�9 Q�;Õ&Ü�‹
”R˜•U˜1•Wœq¤�t¤C¨£F�{Õ*Ü
ˆq‹'�A�+ˆ�qÕœB �E˜6 "�9¤s¬D°«G°A­I°q­=Ó'9¸1Õ'<¸QÕ'>Õ>Ü
ˆq‹'�A�+ˆ�qÕœB �E˜6 "�9¤s¬D°«G°A­I°q­=Ó'9¸1Õ'<Õ<Ø	
ŒT�!‹W��a�œ"˜a�% �(¤S¬$¨q«'°!­)°Q­Ó%7¸Õ%:Õ:Ü	ˆa‹�1��a�œ"˜a�% �(¤S¬$¨q«'°!­)°Q­Ó%7¸Õ%:Õ:Ü	ŒAŒa�i‰i�Kœ"˜a�% �(Õ"Ü	
ˆŒaˆR”—	‘	�\œB �E "�HÕ$Ø	ŒA�”�A•�b•œ1œQŸY™Y�;Õ&¬¬A­¨a­´°A³­Õ6Ø	ŒA�”�A•�b•œ1œQŸY™Y�;Õ&¬¬A­¨a­´°A³­Õ6Ø	
ŒQ���	”S˜“V˜Q•Y�J˜q•L¤2¤a¥4¬¨A«¥;¨q¥=Õ0°1´R¸µUµ7¸2µ:Õ=ÄÄ!Ç)Á)ÅÕ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ˆô 2ôLeDˆoô eDôXzPˆ?ô zPôzP8�Oô P8ôf$:�ô $:ôN?%�ô ?%ðD 	ñó 	òrP   