+
    åûjÄ6 ã                   ó  € R t ^ RIH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Ht ^ RIHt ^ RIHt ^ R	IHt ^ R
IHtHt ^ RIHt ^ RIHtHtH t  ^ RI!H"t"H#t#H$t$ ^ RI%H&t&H't' ^ RI(H)t)H*t* ^ RI+H,t,H-t-H.t. ^ RI/H0t0H1t1 ^ RI2H3t3H4t4H5t5 ^ RI6H7t7H8t8 RAR lt9 ! R R]4      t: ! R R]4      t; ! R R]4      t< ! R R]4      t= ! R R]4      t> ! R R ]4      t? ! R! R"]4      t@ ! R# R$]4      tA ! R% R&]4      tBR' tC ! R( R)]4      tD ! R* R+]4      tE ! R, R-]4      tF ! R. R/]F4      tG ! R0 R1]F4      tH ! R2 R3]F4      tI ! R4 R5]F4      tJ ! R6 R7]4      tK ! R8 R9]K4      tL ! R: R;]K4      tM ! R< R=]4      tN ! R> R?]4      tOR@# )Bz|This module contains various functions that are special cases
of incomplete gamma functions. It should probably be renamed. )Ú
EulerGamma)ÚAdd)Úcacheit)ÚDefinedFunctionÚArgumentIndexErrorÚ
expand_mul)Úfuzzy_or)ÚIÚpiÚRationalÚInteger)Úis_eq)ÚPow)ÚS)ÚDummyÚuniquely_named_symbol)Úsympify)Ú	factorialÚ
factorial2ÚRisingFactorial)Ú
polar_liftÚreÚ
unpolarify)ÚceilingÚfloor)ÚsqrtÚroot)ÚexpÚlogÚ	exp_polar)ÚcoshÚsinh)ÚcosÚsinÚsinc)ÚhyperÚmeijergc                 óð  € V P                   ^ ,          P                  '       dC   V'       d)   RVR&   V P                  ! V3/ VB \        P                  3# V \        P                  3# V'       d6   V P                   ^ ,          P                  ! V3/ VB P                  4       w  r4M#V P                   ^ ,          P                  4       w  r4V P                  V\        V,          ,           4      V P                  V\        V,          ,
          4      ,           ^,          pV P                  V\        V,          ,           4      V P                  V\        V,          ,
          4      ,
          ^\        ,          ,          pWV3# )é    FÚcomplex)ÚargsÚis_extended_realÚexpandr   ÚZeroÚas_real_imagÚfuncr	   )ÚselfÚdeepÚhintsÚxÚyr   Úims   &&,    ÚcC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\functions\special\error_functions.pyÚreal_to_real_as_real_imagr7      s   € Ø‡y�y�…|×$×$Ð$ßØ$ˆE�)ÑØ—K’K Ñ.¨Ñ.´·±Ð7Ð7àœ!Ÿ&™&�>Ð!ßØ�y‰y˜�|×"Ò" 4Ñ1¨5Ñ1×>Ñ>Ó@‰ˆˆ1à�y‰y˜�|×(Ñ(Ó*‰ˆØ
�)‰)�Aœ˜!�•GÓ
˜tŸy™y¨¬Q¨q­S­Ó1Õ
1°1Õ	4€BØ
�)‰)�Aœ˜!�•GÓ
˜tŸy™y¨¬Q¨q­S­Ó1Õ
1°A´aµCÕ	8€BØˆ8€Oó    c                   óæ   a a€ ] tR t^1t oRtRtRR ltRR lt]R 4       t	]
]R 4       4       tR tR tR	 tR
 tR tR tR tR tR tR tR tR tR tRR ltR tR tR tV 3R lt]t Rt!Vt"V ;t## )ÚerfaZ  
The Gauss error function.

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

This function is defined as:

.. math ::
    \mathrm{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} \mathrm{d}t.

Examples
========

>>> from sympy import I, oo, erf
>>> from sympy.abc import z

Several special values are known:

>>> erf(0)
0
>>> erf(oo)
1
>>> erf(-oo)
-1
>>> erf(I*oo)
oo*I
>>> erf(-I*oo)
-oo*I

In general one can pull out factors of -1 and $I$ from the argument:

>>> erf(-z)
-erf(z)

The error function obeys the mirror symmetry:

>>> from sympy import conjugate
>>> conjugate(erf(z))
erf(conjugate(z))

Differentiation with respect to $z$ is supported:

>>> from sympy import diff
>>> diff(erf(z), z)
2*exp(-z**2)/sqrt(pi)

We can numerically evaluate the error function to arbitrary precision
on the whole complex plane:

>>> erf(4).evalf(30)
0.999999984582742099719981147840

>>> erf(-4*I).evalf(30)
-1296959.73071763923152794095062*I

See Also
========

erfc: Complementary error function.
erfi: Imaginary error function.
erf2: Two-argument error function.
erfinv: Inverse error function.
erfcinv: Inverse Complementary error function.
erf2inv: Inverse two-argument error function.

References
==========

.. [1] https://en.wikipedia.org/wiki/Error_function
.. [2] https://dlmf.nist.gov/7
.. [3] https://mathworld.wolfram.com/Erf.html
.. [4] https://functions.wolfram.com/GammaBetaErf/Erf

Tc                ó¤   € V^8X  d@   ^\        V P                  ^ ,          ^,          ) 4      ,          \        \        4      ,          # \	        W4      h©é   ©r   r*   r   r
   r   ©r0   Úargindexs   &&r6   ÚfdiffÚ	erf.fdiff€   s<   € Ø�qŒ=Ø”S˜$Ÿ)™) A�,¨�/Ð)Ó*Õ*¬4´«8Õ3Ð3ä$ TÓ4Ð4r8   c                ó   € \         # ©z(
Returns the inverse of this function.

©Úerfinvr?   s   &&r6   ÚinverseÚerf.inverse‡   s	   € ô
 ˆr8   c                ó¨  € VP                   '       d�   V\        P                  J d   \        P                  # V\        P                  J d   \        P                  # V\        P
                  J d   \        P                  # VP                  '       d   \        P                  # \        V\        4      '       d   VP                  ^ ,          # \        V\        4      '       d)   \        P                  VP                  ^ ,          ,
          # VP                  '       d   \        P                  # \        V\        4      '       d7   VP                  ^ ,          P                  '       d   VP                  ^,          # VP                  \        4      pV\        P                  \        P
                  39   d   V# VP!                  4       '       d   V ! V) 4      ) # R# ©r(   N)Ú	is_Numberr   ÚNaNÚInfinityÚOneÚNegativeInfinityÚNegativeOneÚis_zeror-   Ú
isinstancerF   r*   ÚerfcinvÚerf2invÚextract_multiplicativelyr	   Úcould_extract_minus_sign©ÚclsÚargÚts   && r6   ÚevalÚerf.evalŽ   s1  € à�=�=ˆ=Ø”a—e‘e‹|Ü—u‘u�ØœŸ
™
Ó"Ü—u‘u�Øœ×*Ñ*Ó*Ü—}‘}Ð$Ø——�Ü—v‘v�ä�cœ6×"Ò"Ø—8‘8˜A•;Ðä�cœ7×#Ò#Ü—5‘5˜3Ÿ8™8 A�;Õ&Ð&à�;�;ˆ;Ü—6‘6ˆMô �cœ7×#Ò#¨¯©°­×(;×(;Ð(;Ø—8‘8˜A•;Ðð ×(Ñ(¬Ó+ˆØ”—‘œQ×/Ñ/Ð0Ô0ØˆJð ×'Ñ'×)Ò)Ù˜˜“I�:Ðñ *r8   c                óØ  € V ^ 8  g   V ^,          ^ 8X  d   \         P                  # \        V4      p\        V ^,
          \        ^4      ,          4      p\	        V4      ^8”  d4   VR,          ) V^,          ,          V ^,
          ,          W,          ,          # ^\         P
                  V,          ,          W,          ,          V \        V4      ,          \        \        4      ,          ,          # ©r(   éþÿÿÿ)	r   r-   r   r   ÚlenrP   r   r   r
   ©Únr3   Úprevious_termsÚks   &&* r6   Útaylor_termÚerf.taylor_term°   s¢   € ð ˆqŒ5�A˜•E˜Q”JÜ—6‘6ˆMä˜“
ˆAÜ�q˜1•uœa ›d•lÓ#ˆAÜ�>Ó" QÔ&Ø& rÕ*Ð*¨Q°­TÕ1°Q¸µUÕ;¸Q½SÕAÐAàœŸ™¨Õ)Õ)¨A­DÕ0°!´I¸a³Lµ.ÄÄbÃÕ2IÕJÐJr8   c                ób   € V P                  V P                  ^ ,          P                  4       4      # ©r(   ©r/   r*   Ú	conjugate©r0   s   &r6   Ú_eval_conjugateÚerf._eval_conjugate½   ó"   € Ø�y‰y˜Ÿ™ 1�×/Ñ/Ó1Ó2Ð2r8   c                óL   € V P                   ^ ,          P                  RJ d   R# R# ©r(   TN©r*   r+   rk   s   &r6   Ú_eval_is_realÚerf._eval_is_realÀ   s    € Ø�9‰9�Q�<×(Ñ(¨DÓ0Ùñ 1r8   c                óL   € V P                   ^ ,          P                  RJ d   R# R# rp   )r*   Úis_imaginaryrk   s   &r6   Ú_eval_is_imaginaryÚerf._eval_is_imaginaryÆ   s    € Ø�9‰9�Q�<×$Ñ$¨Ó,Ùñ -r8   c                ój   € V P                   ^ ,          p\        VP                  VP                  .4      # rh   )r*   r   Ú	is_finiter+   ©r0   Úzs   & r6   Ú_eval_is_finiteÚerf._eval_is_finiteÊ   s)   € Ø�I‰I�a�LˆÜ˜Ÿ™ a×&8Ñ&8Ð9Ó:Ð:r8   c                ó‚   € V P                   ^ ,          P                  RJ d   V P                   ^ ,          P                  # R# rp   )r*   r+   rQ   rk   s   &r6   Ú_eval_is_zeroÚerf._eval_is_zeroÎ   s1   € Ø�9‰9�Q�<×(Ñ(¨DÓ0Ø—9‘9˜Q•<×'Ñ'Ð'ñ 1r8   c                ó‚   € V P                   ^ ,          P                  RJ d   V P                   ^ ,          P                  # R# rp   )r*   r+   Úis_extended_positiverk   s   &r6   Ú_eval_is_positiveÚerf._eval_is_positiveÒ   ó1   € Ø�9‰9�Q�<×(Ñ(¨DÓ0Ø—9‘9˜Q•<×4Ñ4Ð4ñ 1r8   c                ó‚   € V P                   ^ ,          P                  RJ d   V P                   ^ ,          P                  # R# rp   )r*   r+   Úis_extended_negativerk   s   &r6   Ú_eval_is_negativeÚerf._eval_is_negativeÖ   r…   r8   c                óØ   € ^ RI Hp \        V^,          4      V,          \        P                  V! \        P
                  V^,          4      \        \        4      ,          ,
          ,          # ©r(   ©Ú
uppergamma©Ú'sympy.functions.special.gamma_functionsr�   r   r   rN   ÚHalfr
   ©r0   r{   Úkwargsr�   s   &&, r6   Ú_eval_rewrite_as_uppergammaÚerf._eval_rewrite_as_uppergammaÚ   s=   € ÝFÜ�A�q•D‹z˜!�|œQŸU™U¡Z´·±¸¸1½Ó%=¼dÄ2»hÕ%FÕFÕGÐGr8   c                óú   € \         P                  \        ,
          V,          \        \        4      ,          p\         P                  \        ,           \        V4      \        \        V4      ,          ,
          ,          # ©N©r   rN   r	   r   r
   ÚfresnelcÚfresnels©r0   r{   r’   rY   s   &&, r6   Ú_eval_rewrite_as_fresnelsÚerf._eval_rewrite_as_fresnelsÞ   ó@   € Ü�u‰u”q�y˜!�mœD¤›HÕ$ˆÜ—‘œ•	œH S›M¬A¬h°s«m­OÕ;Õ<Ð<r8   c                óú   € \         P                  \        ,
          V,          \        \        4      ,          p\         P                  \        ,           \        V4      \        \        V4      ,          ,
          ,          # r–   r—   rš   s   &&, r6   Ú_eval_rewrite_as_fresnelcÚerf._eval_rewrite_as_fresnelcâ   r�   r8   c           
     óš   € V\        \        4      ,          \        \        P                  .. ^ .\        R^4      .V^,          4      ,          # ©r(   éÿÿÿÿ©r   r
   r&   r   r�   r   ©r0   r{   r’   s   &&,r6   Ú_eval_rewrite_as_meijergÚerf._eval_rewrite_as_meijergæ   s7   € Ø””b“�zœ'¤1§6¡6 (¨B°°´h¸rÀ1³oÐ5FÈÈ1ÍÓMÕMÐMr8   c                óº   € ^V,          \        \        4      ,          \        \        P                  .^\        P                  ,          .V^,          ) 4      ,          # ©é   ©r   r
   r%   r   r�   r¥   s   &&,r6   Ú_eval_rewrite_as_hyperÚerf._eval_rewrite_as_hyperé   s8   € Ø��s”4œ“8�|œE¤1§6¡6 (¨Q¬q¯v©v­X¨J¸¸A½¸Ó>Õ>Ð>r8   c                ó¶   € \        V^,          4      V,          V\        \        P                  V^,          4      ,          \        \        4      ,          ,
          # r©   ©r   Úexpintr   r�   r
   r¥   s   &&,r6   Ú_eval_rewrite_as_expintÚerf._eval_rewrite_as_expintì   s6   € Ü�A�q•D‹z˜!�|˜a¤¤q§v¡v¨q°!­tÓ 4Õ4´T¼"³XÕ=Õ=Ð=r8   c                óV  € ^ RI Hp V'       de   V! W\        P                  4      pV\        P                  J d:   \        P
                  \        V) 4      \        V^,          ) 4      ,          ,           # \        P                  \        V4      \        V^,          ) 4      ,          ,
          # )r(   )Úlimit)	Úsympy.series.limitsr´   r   rM   rO   rP   Ú_erfsr   rN   )r0   r{   Úlimitvarr’   r´   Úlims   &&&,  r6   Ú_eval_rewrite_as_tractableÚerf._eval_rewrite_as_tractableï   sl   € Ý-ßÙ˜¤Q§Z¡ZÓ0ˆCØ”a×(Ñ(Ó(Ü—}‘}¤u¨a¨R£y´°a¸µd°U³Õ';Õ;Ð;Ü�u‰u”u˜Q“x¤ Q¨¥T E£
Õ*Õ*Ð*r8   c                óB   € \         P                  \        V4      ,
          # r–   )r   rN   Úerfcr¥   s   &&,r6   Ú_eval_rewrite_as_erfcÚerf._eval_rewrite_as_erfc÷   s   € Ü�u‰u”t˜A“w�Ðr8   c                óF   € \         ) \        \         V,          4      ,          # r–   ©r	   Úerfir¥   s   &&,r6   Ú_eval_rewrite_as_erfiÚerf._eval_rewrite_as_erfiú   s   € Üˆr”$”q˜•s“)�|Ðr8   c                óp  € V P                   ^ ,          P                  WVR7      pVP                  V^ 4      pV\        P                  J d   TP                  T^ VR8X  d   RMRR7      pWP                  9   d0   VP                  '       d   ^V,          \        \        4      ,          # V P                  V4      # ©r(   ©ÚlogxÚcdirÚ-Ú+©Údirr£   )r*   Úas_leading_termÚsubsr   ÚComplexInfinityr´   Úfree_symbolsrQ   r   r
   r/   ©r0   r3   rÇ   rÈ   rY   Úarg0s   &&&&  r6   Ú_eval_as_leading_termÚerf._eval_as_leading_termý   sŒ   € Ø�i‰i˜�l×*Ñ*¨1¸dÐ*ÓCˆØ�x‰x˜˜1‹~ˆà”1×$Ñ$Ó$Ø—9‘9˜Q ¨d°b¬j¡s¸c�9ÓBˆDØ× Ñ Ô  T§\§\ \Ø�S•5œœb›•>Ð!à—9‘9˜T“?Ð"r8   c                ó(  <€ ^ RI Hp V^ ,          pV\        P                  \        P                  39   Ed,   V P
                  ^ ,          p VP                  V4      w  r‰T	) p	T	P                  '       dð   \        Y,          4      p
\        T
4       Uu. uFb  p\        P                  T,          \        ^T,          ^,
          4      ,          T^T,          ^,           ,          ^T,          ,          ,          NKd  	  upT! ^Yz,          ,          T4      .,           p\        P                  \        T^,          ) 4      \!        \"        4      ,          \%        T!  ,          ,
          # \&        \(        V `W  WW44      #   \        \        3 d    T u # i ; iu upi ©r(   ©ÚOrder)Úsympy.series.orderrØ   r   rM   rO   r*   ÚleadtermÚ
ValueErrorÚNotImplementedErrorÚis_positiver   ÚrangerP   r   rN   r   r   r
   r   Úsuperr:   Ú_eval_aseries)r0   rb   Úargs0r3   rÇ   rØ   Úpointr{   Ú_ÚexÚnewnrd   ÚsÚ	__class__s   &&&&&        €r6   rà   Úerf._eval_aseries  s6  ø€ Ý,Ø�a•ˆà”Q—Z‘Z¤×!3Ñ!3Ð4Õ4Ø—	‘	˜!•ˆAðØŸ
™
 1›‘�ð �ˆBØ�~�~ˆ~Ü˜q�t“}�ä# Dœkó+Ù)˜ô —]‘] AÕ%¬
°1°Qµ3¸µ7Ó(;Õ;¸qÀ1ÀQÅ3ÈÅ7½|ÈaÐQRÍdÕ?R×SÐSÙ)ñ+Ù.3°A°aµgµI¸qÓ.AÐ-BõC�ä—u‘u¤ Q¨¥T E£
¬4´«8Õ 3´s¸A±wÕ>Õ>Ð>ä”S˜$Ñ-¨a¸Ó@Ð@øô Ô 3Ð4ô Ø’ðüò+s   ÁE6 ÂA(FÅ6FÆF© r<   r–   )$Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
unbranchedrA   rG   Úclassmethodr[   Ústaticmethodr   re   rl   rr   rv   r|   r   rƒ   rˆ   r“   r›   rŸ   r¦   r¬   r±   r¹   r½   rÂ   rÓ   rà   r7   r.   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©rç   Ú__classdict__s   @@r6   r:   r:   1   s¶   ù‡ € ñJðX €Jô5ôð ñó ððB Øñ	Kó ó ð	Kò3òòò;ò(ò5ò5òHò=ò=òNò?ò>ô+òòò	#õAð* -‡L€Lr8   r:   c                   óÂ   a € ] tR tRt o RtRtRR ltRR lt]R 4       t	]
]R 4       4       tR tR	 tRR ltR tR tR tR tR tR tR tR tR tR t]tR tRtV tR
# )r¼   i   aR  
Complementary Error Function.

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

The function is defined as:

.. math ::
    \mathrm{erfc}(x) = \frac{2}{\sqrt{\pi}} \int_x^\infty e^{-t^2} \mathrm{d}t

Examples
========

>>> from sympy import I, oo, erfc
>>> from sympy.abc import z

Several special values are known:

>>> erfc(0)
1
>>> erfc(oo)
0
>>> erfc(-oo)
2
>>> erfc(I*oo)
-oo*I
>>> erfc(-I*oo)
oo*I

The error function obeys the mirror symmetry:

>>> from sympy import conjugate
>>> conjugate(erfc(z))
erfc(conjugate(z))

Differentiation with respect to $z$ is supported:

>>> from sympy import diff
>>> diff(erfc(z), z)
-2*exp(-z**2)/sqrt(pi)

It also follows

>>> erfc(-z)
2 - erfc(z)

We can numerically evaluate the complementary error function to arbitrary
precision on the whole complex plane:

>>> erfc(4).evalf(30)
0.0000000154172579002800188521596734869

>>> erfc(4*I).evalf(30)
1.0 - 1296959.73071763923152794095062*I

See Also
========

erf: Gaussian error function.
erfi: Imaginary error function.
erf2: Two-argument error function.
erfinv: Inverse error function.
erfcinv: Inverse Complementary error function.
erf2inv: Inverse two-argument error function.

References
==========

.. [1] https://en.wikipedia.org/wiki/Error_function
.. [2] https://dlmf.nist.gov/7
.. [3] https://mathworld.wolfram.com/Erfc.html
.. [4] https://functions.wolfram.com/GammaBetaErf/Erfc

Tc                ó¤   € V^8X  d@   R\        V P                  ^ ,          ^,          ) 4      ,          \        \        4      ,          # \	        W4      h©r=   r_   r>   r?   s   &&r6   rA   Ú
erfc.fdiffo  s<   € Ø�qŒ=Ø”c˜4Ÿ9™9 Q�<¨�?Ð*Ó+Õ+¬D´«HÕ4Ð4ä$ TÓ4Ð4r8   c                ó   € \         # rD   ©rS   r?   s   &&r6   rG   Úerfc.inverseu  s	   € ô
 ˆr8   c                óÖ  € VP                   '       dk   V\        P                  J d   \        P                  # V\        P                  J d   \        P                  # VP
                  '       d   \        P                  # \        V\        4      '       d)   \        P                  VP                  ^ ,          ,
          # \        V\        4      '       d   VP                  ^ ,          # VP
                  '       d   \        P                  # VP                  \        4      pV\        P                  \        P                  39   d   V) # VP                  4       '       d   ^V ! V) 4      ,
          # R# rJ   )rK   r   rL   rM   r-   rQ   rN   rR   rF   r*   rS   rU   r	   rO   rV   rW   s   && r6   r[   Ú	erfc.eval|  sí   € à�=�=ˆ=Ø”a—e‘e‹|Ü—u‘u�ØœŸ
™
Ó"Ü—v‘v�Ø——�Ü—u‘u�ä�cœ6×"Ò"Ü—5‘5˜3Ÿ8™8 A�;Õ&Ð&ä�cœ7×#Ò#Ø—8‘8˜A•;Ðà�;�;ˆ;Ü—5‘5ˆLð ×(Ñ(¬Ó+ˆØ”—‘œQ×/Ñ/Ð0Ô0Ø�4ˆKð ×'Ñ'×)Ò)Ø‘s˜C˜4“y•=Ð ñ *r8   c                ó  € V ^ 8X  d   \         P                  # V ^ 8  g   V ^,          ^ 8X  d   \         P                  # \        V4      p\	        V ^,
          \        ^4      ,          4      p\        V4      ^8”  d4   VR,          ) V^,          ,          V ^,
          ,          W,          ,          # R\         P                  V,          ,          W,          ,          V \        V4      ,          \        \        4      ,          ,          # r^   )
r   rN   r-   r   r   r`   rP   r   r   r
   ra   s   &&* r6   re   Úerfc.taylor_term˜  s²   € ð �Œ6Ü—5‘5ˆLØ�ŒU�a˜!•e˜q”jÜ—6‘6ˆMä˜“
ˆAÜ�q˜1•uœa ›d•lÓ#ˆAÜ�>Ó" QÔ&Ø& rÕ*Ð*¨Q°­TÕ1°Q¸µUÕ;¸Q½SÕAÐAàœ!Ÿ-™-¨Õ*Õ*¨Q­TÕ1°1´Y¸q³\µ>Ä$ÄrÃ(Õ3JÕKÐKr8   c                ób   € V P                  V P                  ^ ,          P                  4       4      # rh   ri   rk   s   &r6   rl   Úerfc._eval_conjugate§  rn   r8   c                ó’   € V P                   ^ ,          P                  RJ d   R# V P                   ^ ,          P                  RJ d   R# R# )r(   TFN)r*   r+   ru   rk   s   &r6   rr   Úerfc._eval_is_realª  s9   € Ø�9‰9�Q�<×(Ñ(¨DÓ0ÙØ�9‰9�Q�<×$Ñ$¨Ó,Ùñ -r8   Nc                óP   € V P                  \        4      P                  R RVR7      # ©Ú	tractableT)r1   r·   ©Úrewriter:   ©r0   r{   r·   r’   s   &&&,r6   r¹   Úerfc._eval_rewrite_as_tractable°  ó#   € Ø�|‰|œCÓ ×(Ñ(¨¸4È(Ð(ÓSÐSr8   c                óB   € \         P                  \        V4      ,
          # r–   )r   rN   r:   r¥   s   &&,r6   Ú_eval_rewrite_as_erfÚerfc._eval_rewrite_as_erf³  s   € Ü�u‰u”s˜1“v�~Ðr8   c                ón   € \         P                  \        \        \        V,          4      ,          ,           # r–   )r   rN   r	   rÁ   r¥   s   &&,r6   rÂ   Úerfc._eval_rewrite_as_erfi¶  s   € Ü�u‰u”qœœa �c›•{Õ"Ð"r8   c                ó$  € \         P                  \        ,
          V,          \        \        4      ,          p\         P                  \         P                  \        ,           \        V4      \        \        V4      ,          ,
          ,          ,
          # r–   r—   rš   s   &&, r6   r›   Úerfc._eval_rewrite_as_fresnels¹  sI   € Ü�u‰u”q�y˜!�mœD¤›HÕ$ˆÜ�u‰uœŸ™¤�	¤H¨S£M´A´h¸s³mµOÕ$CÕDÕDÐDr8   c                ó$  € \         P                  \        ,
          V,          \        \        4      ,          p\         P                  \         P                  \        ,           \        V4      \        \        V4      ,          ,
          ,          ,
          # r–   r—   rš   s   &&, r6   rŸ   Úerfc._eval_rewrite_as_fresnelc½  sI   € Ü�u‰u”Q�w˜�kœ$œr›(Õ"ˆÜ�u‰uœŸ™¤�	¤H¨S£M´A´h¸s³mµOÕ$CÕDÕDÐDr8   c                óÄ   € \         P                  V\        \        4      ,          \	        \         P
                  .. ^ .\        R^4      .V^,          4      ,          ,
          # r¢   )r   rN   r   r
   r&   r�   r   r¥   s   &&,r6   r¦   Úerfc._eval_rewrite_as_meijergÁ  sC   € Ü�u‰u�qœœb›•z¤'¬1¯6©6¨(°B¸¸¼hÀrÈ1»oÐ=NÐPQÐSTÕPTÓ"UÕUÕUÐUr8   c                óä   € \         P                  ^V,          \        \        4      ,          \	        \         P
                  .^\         P
                  ,          .V^,          ) 4      ,          ,
          # r©   )r   rN   r   r
   r%   r�   r¥   s   &&,r6   r¬   Úerfc._eval_rewrite_as_hyperÄ  sA   € Ü�u‰u�q˜•sœ4¤›8•|¤E¬1¯6©6¨(°Q´q·v±vµX°JÀÀAÅÀÓ$FÕFÕFÐFr8   c                ó  € ^ RI Hp \        P                  \	        V^,          4      V,          \        P                  V! \        P
                  V^,          4      \	        \        4      ,          ,
          ,          ,
          # r‹   )r�   r�   r   rN   r   r�   r
   r‘   s   &&, r6   r“   Ú erfc._eval_rewrite_as_uppergammaÇ  sF   € ÝFÜ�u‰u”t˜A˜q�D“z !•|¤Q§U¡U©Z¼¿¹ÀÀ1ÅÓ-EÄdÌ2ÃhÕ-NÕ%NÕOÕOÐOr8   c                óà   € \         P                  \        V^,          4      V,          ,
          V\        \         P                  V^,          4      ,          \        \
        4      ,          ,           # r©   )r   rN   r   r°   r�   r
   r¥   s   &&,r6   r±   Úerfc._eval_rewrite_as_expintË  s?   € Ü�u‰u”t˜A˜q�D“z !•|Õ# a¬¬q¯v©v°q¸!µtÓ(<Õ&<¼TÄ"»XÕ&EÕEÐEr8   c                ó,   € V P                  \        4      # r–   r	  ©r0   r2   s   &,r6   Ú_eval_expand_funcÚerfc._eval_expand_funcÎ  ó   € Ø�|‰|œCÓ Ð r8   c                ó6  € V P                   ^ ,          P                  WVR7      pVP                  V^ 4      pV\        P                  J d   TP                  T^ VR8X  d   RMRR7      pVP                  '       d   \        P                  # V P                  V4      # rÅ   )	r*   rÍ   rÎ   r   rÏ   r´   rQ   rN   r/   rÑ   s   &&&&  r6   rÓ   Úerfc._eval_as_leading_termÑ  sx   € Ø�i‰i˜�l×*Ñ*¨1¸dÐ*ÓCˆØ�x‰x˜˜1‹~ˆà”1×$Ñ$Ó$Ø—9‘9˜Q ¨d°b¬j¡s¸c�9ÓBˆDØ�<�<ˆ<Ü—5‘5ˆLà—9‘9˜T“?Ð"r8   c                ór   € \         P                  \        V P                  !  P	                  WW44      ,
          # r–   )r   rN   r:   r*   rà   )r0   rb   rá   r3   rÇ   s   &&&&&r6   rà   Úerfc._eval_aseriesÞ  s&   € Ü�u‰u”s˜DŸI™I‘×4Ñ4°Q¸qÓGÕGÐGr8   ré   r<   r–   )rê   rë   rì   rí   rî   rï   rA   rG   rð   r[   rñ   r   re   rl   rr   r¹   r  rÂ   r›   rŸ   r¦   r¬   r“   r±   r!  rÓ   r7   r.   rà   rò   ró   ©rö   s   @r6   r¼   r¼      sª   ø‡ € ñJðX €Jô5ôð ñ!ó ð!ð6 ØñLó ó ðLò3òôTòò#òEòEòVòGòPòFò!ò	#ð -€L÷Hð Hr8   r¼   c                   óÊ   a a€ ] tR tRt oRtRtRR lt]R 4       t]	]
R 4       4       tR tR tR	 tRR
 ltR tR tR tR tR tR tR tR tR t]tR tV 3R ltRtVtV ;t# )rÁ   iâ  a!  
Imaginary error function.

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

The function erfi is defined as:

.. math ::
    \mathrm{erfi}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{t^2} \mathrm{d}t

Examples
========

>>> from sympy import I, oo, erfi
>>> from sympy.abc import z

Several special values are known:

>>> erfi(0)
0
>>> erfi(oo)
oo
>>> erfi(-oo)
-oo
>>> erfi(I*oo)
I
>>> erfi(-I*oo)
-I

In general one can pull out factors of -1 and $I$ from the argument:

>>> erfi(-z)
-erfi(z)

>>> from sympy import conjugate
>>> conjugate(erfi(z))
erfi(conjugate(z))

Differentiation with respect to $z$ is supported:

>>> from sympy import diff
>>> diff(erfi(z), z)
2*exp(z**2)/sqrt(pi)

We can numerically evaluate the imaginary error function to arbitrary
precision on the whole complex plane:

>>> erfi(2).evalf(30)
18.5648024145755525987042919132

>>> erfi(-2*I).evalf(30)
-0.995322265018952734162069256367*I

See Also
========

erf: Gaussian error function.
erfc: Complementary error function.
erf2: Two-argument error function.
erfinv: Inverse error function.
erfcinv: Inverse Complementary error function.
erf2inv: Inverse two-argument error function.

References
==========

.. [1] https://en.wikipedia.org/wiki/Error_function
.. [2] https://mathworld.wolfram.com/Erfi.html
.. [3] https://functions.wolfram.com/GammaBetaErf/Erfi

Tc                ó¢   € V^8X  d?   ^\        V P                  ^ ,          ^,          4      ,          \        \        4      ,          # \	        W4      hr<   r>   r?   s   &&r6   rA   Ú
erfi.fdiff.  s9   € Ø�qŒ=Ø”S˜Ÿ™ 1� q�Ó)Õ)¬$¬r«(Õ2Ð2ä$ TÓ4Ð4r8   c                ó˜  € VP                   '       dk   V\        P                  J d   \        P                  # VP                  '       d   \        P                  # V\        P
                  J d   \        P
                  # VP                  '       d   \        P                  # VP                  4       '       d   V ! V) 4      ) # VP                  \        4      pVeó   V\        P
                  J d   \        # \        V\        4      '       d   \        VP                  ^ ,          ,          # \        V\        4      '       d4   \        \        P                  VP                  ^ ,          ,
          ,          # \        V\        4      '       dD   VP                  ^ ,          P                  '       d   \        VP                  ^,          ,          # R # R # R # r–   )rK   r   rL   rQ   r-   rM   rV   rU   r	   rR   rF   r*   rS   rN   rT   ©rX   r{   Únzs   && r6   r[   Ú	erfi.eval4  s%  € à�;�;ˆ;Ø”A—E‘E‹zÜ—u‘u�Ø——�Ü—v‘v�Ø”a—j‘j“Ü—z‘zÐ!à�9�9ˆ9Ü—6‘6ˆMð ×%Ñ%×'Ò'Ù˜˜“G�8ˆOð ×'Ñ'¬Ó*ˆØŠ>Ø”Q—Z‘ZÓÜ�Ü˜"œf×%Ò%Ü˜Ÿ™ �•|Ð#Ü˜"œg×&Ò&Üœ!Ÿ%™% "§'¡'¨!¥*Õ,Õ-Ð-ä˜"œg×&Ò&¨2¯7©7°1­:×+=×+=Ð+=Ü˜Ÿ™ �•|Ð#ñ ,>Ñ&ñ r8   c                óž  € V ^ 8  g   V ^,          ^ 8X  d   \         P                  # \        V4      p\        V ^,
          \        ^4      ,          4      p\	        V4      ^8”  d3   VR,          V^,          ,          V ^,
          ,          W,          ,          # ^W,          ,          V \        V4      ,          \        \        4      ,          ,          # r^   )r   r-   r   r   r`   r   r   r
   ra   s   &&* r6   re   Úerfi.taylor_termR  s�   € ð ˆqŒ5�A˜•E˜Q”JÜ—6‘6ˆMä˜“
ˆAÜ�q˜1•uœa ›d•lÓ#ˆAÜ�>Ó" QÔ&Ø% bÕ)¨A¨q­DÕ0°A¸µEÕ:¸A½CÕ@Ð@à˜1�4•x ¤9¨Q£<¥´´R³Õ!8Õ9Ð9r8   c                ób   € V P                  V P                  ^ ,          P                  4       4      # rh   ri   rk   s   &r6   rl   Úerfi._eval_conjugate_  rn   r8   c                ó<   € V P                   ^ ,          P                  # rh   rq   rk   s   &r6   Ú_eval_is_extended_realÚerfi._eval_is_extended_realb  ó   € Ø�y‰y˜�|×,Ñ,Ð,r8   c                ó<   € V P                   ^ ,          P                  # rh   ©r*   rQ   rk   s   &r6   r   Úerfi._eval_is_zeroe  ó   € Ø�y‰y˜�|×#Ñ#Ð#r8   c                óP   € V P                  \        4      P                  R RVR7      # r  r	  r  s   &&&,r6   r¹   Úerfi._eval_rewrite_as_tractableh  r  r8   c                óF   € \         ) \        \         V,          4      ,          # r–   )r	   r:   r¥   s   &&,r6   r  Úerfi._eval_rewrite_as_erfk  s   € Üˆr”#”a˜•c“(�{Ðr8   c                óZ   € \         \        \         V,          4      ,          \         ,
          # r–   )r	   r¼   r¥   s   &&,r6   r½   Úerfi._eval_rewrite_as_erfcn  s   € Ü””a˜•c“�{œQ�Ðr8   c                óú   € \         P                  \        ,           V,          \        \        4      ,          p\         P                  \        ,
          \        V4      \        \        V4      ,          ,
          ,          # r–   r—   rš   s   &&, r6   r›   Úerfi._eval_rewrite_as_fresnelsq  r�   r8   c                óú   € \         P                  \        ,           V,          \        \        4      ,          p\         P                  \        ,
          \        V4      \        \        V4      ,          ,
          ,          # r–   r—   rš   s   &&, r6   rŸ   Úerfi._eval_rewrite_as_fresnelcu  r�   r8   c           
     óœ   € V\        \        4      ,          \        \        P                  .. ^ .\        R^4      .V^,          ) 4      ,          # r¢   r¤   r¥   s   &&,r6   r¦   Úerfi._eval_rewrite_as_meijergy  s9   € Ø””b“�zœ'¤1§6¡6 (¨B°°´h¸rÀ1³oÐ5FÈÈAÍÈÓNÕNÐNr8   c                ó¸   € ^V,          \        \        4      ,          \        \        P                  .^\        P                  ,          .V^,          4      ,          # r©   r«   r¥   s   &&,r6   r¬   Úerfi._eval_rewrite_as_hyper|  s6   € Ø��s”4œ“8�|œE¤1§6¡6 (¨Q¬q¯v©v­X¨J¸¸1½Ó=Õ=Ð=r8   c                óÜ   € ^ RI Hp \        V^,          ) 4      V,          V! \        P                  V^,          ) 4      \        \
        4      ,          \        P                  ,
          ,          # r‹   )r�   r�   r   r   r�   r
   rN   r‘   s   &&, r6   r“   Ú erfi._eval_rewrite_as_uppergamma  sA   € ÝFÜ�Q˜•T�E‹{˜1�}™j¬¯©°!°Qµ$°Ó7¼¼R»Õ@Ä1Ç5Á5ÕHÕIÐIr8   c                óº   € \        V^,          ) 4      V,          V\        \        P                  V^,          ) 4      ,          \        \        4      ,          ,
          # r©   r¯   r¥   s   &&,r6   r±   Úerfi._eval_rewrite_as_expintƒ  s:   € Ü�Q˜•T�E‹{˜1�}˜q¤¬¯©°°Aµ°Ó!6Õ6´t¼B³xÕ?Õ?Ð?r8   c                ó,   € V P                  \        4      # r–   r	  r   s   &,r6   r!  Úerfi._eval_expand_func†  r#  r8   c                óT  € V P                   ^ ,          P                  WVR7      pVP                  V^ 4      pWP                  9   d0   VP                  '       d   ^V,          \        \        4      ,          # VP                  '       d   V P                  V4      # V P                  V4      # ©r(   rÆ   )	r*   rÍ   rÎ   rÐ   rQ   r   r
   ry   r/   rÑ   s   &&&&  r6   rÓ   Úerfi._eval_as_leading_term‹  sy   € Ø�i‰i˜�l×*Ñ*¨1¸dÐ*ÓCˆØ�x‰x˜˜1‹~ˆà× Ñ Ô  T§\§\ \Ø�S•5œœb›•>Ð!Ø�^�^ˆ^Ø—9‘9˜T“?Ð"Ø�y‰y˜‹~Ðr8   c                ó  <€ ^ RI Hp V^ ,          pV\        P                  J dÌ   V P                  ^ ,          p\        V4       Uu. uFF  p\        ^V,          ^,
          4      ^V,          V^V,          ^,           ,          ,          ,          NKH  	  upV! ^Wq,          ,          V4      .,           p	\        ) \        V^,          4      \        \        4      ,          \        V	!  ,          ,           # \        \        V `;  WW44      # u upi rÖ   )rÙ   rØ   r   rM   r*   rÞ   r   r	   r   r   r
   r   rß   rÁ   rà   ©r0   rb   rá   r3   rÇ   rØ   râ   r{   rd   ræ   rç   s   &&&&&     €r6   rà   Úerfi._eval_aseries•  sË   ø€ Ý,Ø�a•ˆà”A—J‘JÓØ—	‘	˜!•ˆAä" 1œXó'Ù%˜ô ˜A˜a�C !�GÓ$¨¨1­¨q°1°Qµ3¸µ7­|Õ(;×<Ð<Ù%ñ'Ù*/°°!µ$µ¸Ó*:Ð);õ<ˆAä�2œ˜Q �T›¤4¬£8Õ+¬s°A©wÕ6Õ6Ð6ä”T˜4Ñ.¨q¸ÓAÐAùò	's   ÁADré   r<   r–   ) rê   rë   rì   rí   rî   rï   rA   rð   r[   rñ   r   re   rl   r5  r   r¹   r  r½   r›   rŸ   r¦   r¬   r“   r±   r!  r7   r.   rÓ   rà   rò   ró   rô   rõ   s   @@r6   rÁ   rÁ   â  s¥   ù‡ € ñGðR €Jô5ð ñ$ó ð$ð: Øñ	:ó ó ð	:ò3ò-ò$ôTòòò=ò=òOò>òJò@ò!ð -€Lò÷
Bõ 
Br8   rÁ   c                   óˆ   a € ] tR tRt o RtR t]R 4       tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tRtV tR# )Úerf2i¢  a  
Two-argument error function.

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

This function is defined as:

.. math ::
    \mathrm{erf2}(x, y) = \frac{2}{\sqrt{\pi}} \int_x^y e^{-t^2} \mathrm{d}t

Examples
========

>>> from sympy import oo, erf2
>>> from sympy.abc import x, y

Several special values are known:

>>> erf2(0, 0)
0
>>> erf2(x, x)
0
>>> erf2(x, oo)
1 - erf(x)
>>> erf2(x, -oo)
-erf(x) - 1
>>> erf2(oo, y)
erf(y) - 1
>>> erf2(-oo, y)
erf(y) + 1

In general one can pull out factors of -1:

>>> erf2(-x, -y)
-erf2(x, y)

The error function obeys the mirror symmetry:

>>> from sympy import conjugate
>>> conjugate(erf2(x, y))
erf2(conjugate(x), conjugate(y))

Differentiation with respect to $x$, $y$ is supported:

>>> from sympy import diff
>>> diff(erf2(x, y), x)
-2*exp(-x**2)/sqrt(pi)
>>> diff(erf2(x, y), y)
2*exp(-y**2)/sqrt(pi)

See Also
========

erf: Gaussian error function.
erfc: Complementary error function.
erfi: Imaginary error function.
erfinv: Inverse error function.
erfcinv: Inverse Complementary error function.
erf2inv: Inverse two-argument error function.

References
==========

.. [1] https://functions.wolfram.com/GammaBetaErf/Erf2/

c                ó  € V P                   w  r#V^8X  d/   R\        V^,          ) 4      ,          \        \        4      ,          # V^8X  d/   ^\        V^,          ) 4      ,          \        \        4      ,          # \	        W4      hrù   )r*   r   r   r
   r   ©r0   r@   r3   r4   s   &&  r6   rA   Ú
erf2.fdiffè  s`   € Ø�y‰y‰ˆØ�qŒ=Ø”c˜1˜a�4˜%“j•=¤¤b£Õ)Ð)Ø˜Œ]Ø”S˜!˜Q�$˜“Z•<¤¤R£Õ(Ð(ä$ TÓ4Ð4r8   c                ó¬  € \         P                  \         P                  \         P                  3pV\         P                  J g   V\         P                  J d   \         P                  # W8X  d   \         P                  # W9   g   W#9   d   \        V4      \        V4      ,
          # \        V\        4      '       d,   VP                  ^ ,          V8X  d   VP                  ^,          # VP                  '       g[   VP                  '       gI   VP                  '       d   VP                  '       g%   VP                  '       d.   VP                  '       d   \        V4      \        V4      ,
          # VP                  4       pVP                  4       pV'       d   V'       d   V ! V) V) 4      ) # V'       g	   V'       d   \        V4      \        V4      ,
          # R# rJ   )r   rM   rO   r-   rL   r:   rR   rT   r*   rQ   r+   Úis_infiniterV   )rX   r3   r4   ÚchkÚsign_xÚsign_ys   &&&   r6   r[   Ú	erf2.evalñ  s'  € ä�z‰zœ1×-Ñ-¬q¯v©vÐ6ˆØ”—‘‹:˜œaŸe™e›Ü—5‘5ˆLØŒVÜ—6‘6ˆMØŒX˜œÜ�q“6œC ›F•?Ð"ä�aœ×!Ò! a§f¡f¨Q¥i°1¤nØ—6‘6˜!•9Ðà�9�9ˆ9˜Ÿ	Ÿ	˜	 Q×%7×%7Ð%7¸A¿M¿M¸MØ×"×"Ð" q§}§} }Ü�q“6œC ›F•?Ð"ð ×+Ñ+Ó-ˆØ×+Ñ+Ó-ˆß—vÙ˜˜˜Q˜B“K�<ÐßŸÜ�q“6œ#˜a›&•=Ð ñ r8   c                ó¢   € V P                  V P                  ^ ,          P                  4       V P                  ^,          P                  4       4      # rh   ri   rk   s   &r6   rl   Úerf2._eval_conjugate
  s5   € Ø�y‰y˜Ÿ™ 1�×/Ñ/Ó1°4·9±9¸Qµ<×3IÑ3IÓ3KÓLÐLr8   c                ó†   € V P                   ^ ,          P                  ;'       d    V P                   ^,          P                  # rh   rq   rk   s   &r6   r5  Úerf2._eval_is_extended_real  s,   € Ø�y‰y˜�|×,Ñ,×NÐN°·±¸1µ×1NÑ1NÐNr8   c                ó8   € \        V4      \        V4      ,
          # r–   ©r:   ©r0   r3   r4   r’   s   &&&,r6   r  Úerf2._eval_rewrite_as_erf  s   € Ü�1‹vœ˜A›�Ðr8   c                ó8   € \        V4      \        V4      ,
          # r–   ©r¼   rg  s   &&&,r6   r½   Úerf2._eval_rewrite_as_erfc  s   € Ü�A‹wœ˜a›Õ Ð r8   c                óz   € \         \        \         V,          4      \        \         V,          4      ,
          ,          # r–   rÀ   rg  s   &&&,r6   rÂ   Úerf2._eval_rewrite_as_erfi  s"   € Ü”$”q˜•s“)œD¤ 1¥›IÕ%Õ&Ð&r8   c                ó„   € \        V4      P                  \        4      \        V4      P                  \        4      ,
          # r–   )r:   r
  r™   rg  s   &&&,r6   r›   Úerf2._eval_rewrite_as_fresnels  ó'   € Ü�1‹v�~‰~œhÓ'¬#¨a«&¯.©.¼Ó*BÕBÐBr8   c                ó„   € \        V4      P                  \        4      \        V4      P                  \        4      ,
          # r–   )r:   r
  r˜   rg  s   &&&,r6   rŸ   Úerf2._eval_rewrite_as_fresnelc  rp  r8   c                ó„   € \        V4      P                  \        4      \        V4      P                  \        4      ,
          # r–   )r:   r
  r&   rg  s   &&&,r6   r¦   Úerf2._eval_rewrite_as_meijerg  s'   € Ü�1‹v�~‰~œgÓ&¬¨Q«¯©¼Ó)@Õ@Ð@r8   c                ó„   € \        V4      P                  \        4      \        V4      P                  \        4      ,
          # r–   )r:   r
  r%   rg  s   &&&,r6   r¬   Úerf2._eval_rewrite_as_hyper"  s'   € Ü�1‹v�~‰~œeÓ$¤s¨1£v§~¡~´eÓ'<Õ<Ð<r8   c                ó¬  € ^ RI Hp \        V^,          4      V,          \        P                  V! \        P
                  V^,          4      \        \        4      ,          ,
          ,          \        V^,          4      V,          \        P                  V! \        P
                  V^,          4      \        \        4      ,          ,
          ,          ,
          # r‹   rŽ   )r0   r3   r4   r’   r�   s   &&&, r6   r“   Ú erf2._eval_rewrite_as_uppergamma%  s{   € ÝFÜ�Q˜•T“
˜1•œaŸe™e¡j´·±¸¸A½Ó&>¼tÄB»xÕ&GÕGÕHÜ��A•‹J�q�Lœ!Ÿ%™%¡*¬Q¯V©V°Q¸µTÓ":¼4Ä»8Õ"CÕCÕDõEð 	Fr8   c                ó„   € \        V4      P                  \        4      \        V4      P                  \        4      ,
          # r–   )r:   r
  r°   rg  s   &&&,r6   r±   Úerf2._eval_rewrite_as_expint*  s'   € Ü�1‹v�~‰~œfÓ%¬¨A«¯©´vÓ(>Õ>Ð>r8   c                ó,   € V P                  \        4      # r–   r	  r   s   &,r6   r!  Úerf2._eval_expand_func-  r#  r8   c                ó(   € \        V P                  !  # r–   )r   r*   rk   s   &r6   r   Úerf2._eval_is_zero0  s   € Ü�d—i‘iÑ Ð r8   ré   N)rê   rë   rì   rí   rî   rA   rð   r[   rl   r5  r  r½   rÂ   r›   rŸ   r¦   r¬   r“   r±   r!  r   rò   ró   r(  s   @r6   rW  rW  ¢  sq   ø‡ € ñBòJ5ð ñ!ó ð!ò0MòOòò!ò'òCòCòAò=òFò
?ò!÷!ð !r8   rW  c                   óT   a € ] tR tRt o RtR
R ltR
R lt]R 4       tR t	R t
RtV tR	# )rF   i3  aÎ  
Inverse Error Function. The erfinv function is defined as:

.. math ::
    \mathrm{erf}(x) = y \quad \Rightarrow \quad \mathrm{erfinv}(y) = x

Examples
========

>>> from sympy import erfinv
>>> from sympy.abc import x

Several special values are known:

>>> erfinv(0)
0
>>> erfinv(1)
oo

Differentiation with respect to $x$ is supported:

>>> from sympy import diff
>>> diff(erfinv(x), x)
sqrt(pi)*exp(erfinv(x)**2)/2

We can numerically evaluate the inverse error function to arbitrary
precision on [-1, 1]:

>>> erfinv(0.2).evalf(30)
0.179143454621291692285822705344

See Also
========

erf: Gaussian error function.
erfc: Complementary error function.
erfi: Imaginary error function.
erf2: Two-argument error function.
erfcinv: Inverse Complementary error function.
erf2inv: Inverse two-argument error function.

References
==========

.. [1] https://en.wikipedia.org/wiki/Error_function#Inverse_functions
.. [2] https://functions.wolfram.com/GammaBetaErf/InverseErf/

c                óÜ   € V^8X  d\   \        \        4      \        V P                  V P                  ^ ,          4      ^,          4      ,          \
        P                  ,          # \        W4      hr<   ©r   r
   r   r/   r*   r   r�   r   r?   s   &&r6   rA   Úerfinv.fdifff  sG   € Ø�qŒ=Üœ“8œC §	¡	¨$¯)©)°A­,Ó 7¸Õ :Ó;Õ;¼A¿F¹FÕBÐBä$ TÓ4Ð4r8   c                ó   € \         # rD   rf  r?   s   &&r6   rG   Úerfinv.inversel  s	   € ô
 ˆ
r8   c                óÊ  € V\         P                  J d   \         P                  # V\         P                  J d   \         P                  # VP                  '       d   \         P
                  # V\         P                  J d   \         P                  # \        V\        4      '       d7   VP                  ^ ,          P                  '       d   VP                  ^ ,          # VP                  '       d   \         P
                  # VP                  R4      pVeR   \        V\        4      '       d:   VP                  ^ ,          P                  '       d   VP                  ^ ,          ) # R# R# R# )r(   Nr£   )r   rL   rP   rO   rQ   r-   rN   rM   rR   r:   r*   r+   rU   r-  s   && r6   r[   Úerfinv.evals  sæ   € à”—‘‹:Ü—5‘5ˆLØ”!—-‘-ÓÜ×%Ñ%Ð%Ø�Y�YˆYÜ—6‘6ˆMØ”!—%‘%‹ZÜ—:‘:Ðä�aœ×Ò !§&¡&¨¥)×"<×"<Ð"<Ø—6‘6˜!•9Ðà�9�9ˆ9Ü—6‘6ˆMð ×'Ñ'¨Ó+ˆØŠ>œz¨"¬c×2Ò2¸¿¹À½
×7T×7TÐ7TØ—G‘G˜A•J�;Ðñ 8UÑ2‰>r8   c                ó&   € \        ^V,
          4      # r<   rü   r¥   s   &&,r6   Ú_eval_rewrite_as_erfcinvÚerfinv._eval_rewrite_as_erfcinv‰  s   € Ü�q˜•s‹|Ðr8   c                ó<   € V P                   ^ ,          P                  # rh   r9  rk   s   &r6   r   Úerfinv._eval_is_zeroŒ  r;  r8   ré   Nr<   )rê   rë   rì   rí   rî   rA   rG   rð   r[   rˆ  r   rò   ró   r(  s   @r6   rF   rF   3  s8   ø‡ € ñ/ôd5ôð ñó ðò*÷$ð $r8   rF   c                   óZ   a € ] tR tRt o RtRR ltRR lt]R 4       tR t	R t
R tR	tV tR
# )rS   i�  a@  
Inverse Complementary Error Function. The erfcinv function is defined as:

.. math ::
    \mathrm{erfc}(x) = y \quad \Rightarrow \quad \mathrm{erfcinv}(y) = x

Examples
========

>>> from sympy import erfcinv
>>> from sympy.abc import x

Several special values are known:

>>> erfcinv(1)
0
>>> erfcinv(0)
oo

Differentiation with respect to $x$ is supported:

>>> from sympy import diff
>>> diff(erfcinv(x), x)
-sqrt(pi)*exp(erfcinv(x)**2)/2

See Also
========

erf: Gaussian error function.
erfc: Complementary error function.
erfi: Imaginary error function.
erf2: Two-argument error function.
erfinv: Inverse error function.
erf2inv: Inverse two-argument error function.

References
==========

.. [1] https://en.wikipedia.org/wiki/Error_function#Inverse_functions
.. [2] https://functions.wolfram.com/GammaBetaErf/InverseErfc/

c                óÞ   € V^8X  d]   \        \        4      ) \        V P                  V P                  ^ ,          4      ^,          4      ,          \
        P                  ,          # \        W4      hr<   r�  r?   s   &&r6   rA   Úerfcinv.fdiff½  sI   € Ø�qŒ=Üœ“H�9œS §¡¨4¯9©9°Q­<Ó!8¸!Õ!;Ó<Õ<¼Q¿V¹VÕCÐCä$ TÓ4Ð4r8   c                ó   € \         # rD   rj  r?   s   &&r6   rG   Úerfcinv.inverseÃ  s	   € ô
 ˆr8   c                óL  € V\         P                  J d   \         P                  # VP                  '       d   \         P                  # V\         P                  J d   \         P
                  # V^8X  d   \         P                  # VP                  '       d   \         P                  # R# ©rª   N)r   rL   rQ   rM   rN   r-   rO   ©rX   r{   s   &&r6   r[   Úerfcinv.evalÊ  sh   € à”—‘‹:Ü—5‘5ˆLØ�Y�YˆYÜ—:‘:ÐØ”!—%‘%‹ZÜ—6‘6ˆMØ�!ŒVÜ×%Ñ%Ð%à�9�9ˆ9Ü—:‘:Ðñ r8   c                ó&   € \        ^V,
          4      # r<   rE   r¥   s   &&,r6   Ú_eval_rewrite_as_erfinvÚerfcinv._eval_rewrite_as_erfinvØ  s   € Ü�a˜•c‹{Ðr8   c                óJ   € V P                   ^ ,          ^,
          P                  # rh   r9  rk   s   &r6   r   Úerfcinv._eval_is_zeroÛ  s   € Ø—	‘	˜!•˜qÕ ×)Ñ)Ð)r8   c           	     ó|   € V P                   ^ ,          p\        VP                  \        V\	        ^4      4      .4      # rh   )r*   r   rQ   r   r   rz   s   & r6   Ú_eval_is_infiniteÚerfcinv._eval_is_infiniteÞ  s.   € Ø�I‰I�a�LˆÜ˜Ÿ™¤E¨!¬W°Q«ZÓ$8Ð9Ó:Ð:r8   ré   Nr<   )rê   rë   rì   rí   rî   rA   rG   rð   r[   r–  r   r›  rò   ró   r(  s   @r6   rS   rS   �  s=   ø‡ € ñ)ôX5ôð ñó ðòò*÷;ð ;r8   rS   c                   ó@   a € ] tR tRt o RtR t]R 4       tR tRt	V t
R# )rT   iã  a¢  
Two-argument Inverse error function. The erf2inv function is defined as:

.. math ::
    \mathrm{erf2}(x, w) = y \quad \Rightarrow \quad \mathrm{erf2inv}(x, y) = w

Examples
========

>>> from sympy import erf2inv, oo
>>> from sympy.abc import x, y

Several special values are known:

>>> erf2inv(0, 0)
0
>>> erf2inv(1, 0)
1
>>> erf2inv(0, 1)
oo
>>> erf2inv(0, y)
erfinv(y)
>>> erf2inv(oo, y)
erfcinv(-y)

Differentiation with respect to $x$ and $y$ is supported:

>>> from sympy import diff
>>> diff(erf2inv(x, y), x)
exp(-x**2 + erf2inv(x, y)**2)
>>> diff(erf2inv(x, y), y)
sqrt(pi)*exp(erf2inv(x, y)**2)/2

See Also
========

erf: Gaussian error function.
erfc: Complementary error function.
erfi: Imaginary error function.
erf2: Two-argument error function.
erfinv: Inverse error function.
erfcinv: Inverse complementary error function.

References
==========

.. [1] https://functions.wolfram.com/GammaBetaErf/InverseErf2/

c                óB  € V P                   w  r#V^8X  d0   \        V P                  W#4      ^,          V^,          ,
          4      # V^8X  dK   \        \        4      \
        P                  ,          \        V P                  W#4      ^,          4      ,          # \        W4      hr<   )r*   r   r/   r   r
   r   r�   r   rY  s   &&  r6   rA   Úerf2inv.fdiff  sp   € Ø�y‰y‰ˆØ�qŒ=Ü�t—y‘y “~ qÕ(¨¨A­Õ-Ó.Ð.Ø˜Œ]Üœ“8œAŸF™F•?¤3 t§y¡y°£~°qÕ'8Ó#9Õ9Ð9ä$ TÓ4Ð4r8   c                ó<  € V\         P                  J g   V\         P                  J d   \         P                  # VP                  '       d#   VP                  '       d   \         P                  # VP                  '       d%   V\         P                  J d   \         P
                  # V\         P                  J d#   VP                  '       d   \         P                  # VP                  '       d   \        V4      # V\         P
                  J d   \        V) 4      # VP                  '       d   V# V\         P
                  J d   \        V4      # VP                  '       d.   VP                  '       d   \         P                  # \        V4      # VP                  '       d   V# R # r–   )r   rL   rQ   r-   rN   rM   rF   rS   )rX   r3   r4   s   &&&r6   r[   Úerf2inv.eval   sø   € à”—‘‹:˜œaŸe™e›Ü—5‘5ˆLØ�Y�YˆY˜1Ÿ9Ÿ9˜9Ü—6‘6ˆMØ�Y�YˆY˜1¤§¡›:Ü—:‘:ÐØ”!—%‘%‹Z˜AŸIŸI˜IÜ—5‘5ˆLØ�Y�YˆYÜ˜!“9ÐØ”!—*‘*‹_Ü˜A˜2“;ÐØ�Y�YˆYØˆHØ”!—*‘*‹_Ü˜!“9Ðà�9�9ˆ9Ø�y�yˆyÜ—v‘v�ä˜a“yÐ Ø�9�9ˆ9ØˆHñ r8   c                ór   € V P                   w  rVP                  '       d   VP                  '       d   R # R# R# )TNr9  )r0   r3   r4   s   &  r6   r   Úerf2inv._eval_is_zero;  s(   € Ø�y‰y‰ˆØ�9�9ˆ9˜ŸŸ˜Ùñ #‰9r8   ré   N)rê   rë   rì   rí   rî   rA   rð   r[   r   rò   ró   r(  s   @r6   rT   rT   ã  s.   ø‡ € ñ0òf5ð ñó ð÷4ð r8   rT   c                   ó¬   a a€ ] tR tRt oRt]R 4       tRR ltV 3R ltR t	R t
R tR	 t]t]t]tRR
 ltR tV 3R ltRV 3R lltV 3R ltRtVtV ;t# )ÚEiiD  a   
The classical exponential integral.

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

For use in SymPy, this function is defined as

.. math:: \operatorname{Ei}(x) = \sum_{n=1}^\infty \frac{x^n}{n\, n!}
                                 + \log(x) + \gamma,

where $\gamma$ is the Euler-Mascheroni constant.

If $x$ is a polar number, this defines an analytic function on the
Riemann surface of the logarithm. Otherwise this defines an analytic
function in the cut plane $\mathbb{C} \setminus (-\infty, 0]$.

**Background**

The name exponential integral comes from the following statement:

.. math:: \operatorname{Ei}(x) = \int_{-\infty}^x \frac{e^t}{t} \mathrm{d}t

If the integral is interpreted as a Cauchy principal value, this statement
holds for $x > 0$ and $\operatorname{Ei}(x)$ as defined above.

Examples
========

>>> from sympy import Ei, polar_lift, exp_polar, I, pi
>>> from sympy.abc import x

>>> Ei(-1)
Ei(-1)

This yields a real value:

>>> Ei(-1).n(chop=True)
-0.219383934395520

On the other hand the analytic continuation is not real:

>>> Ei(polar_lift(-1)).n(chop=True)
-0.21938393439552 + 3.14159265358979*I

The exponential integral has a logarithmic branch point at the origin:

>>> Ei(x*exp_polar(2*I*pi))
Ei(x) + 2*I*pi

Differentiation is supported:

>>> Ei(x).diff(x)
exp(x)/x

The exponential integral is related to many other special functions.
For example:

>>> from sympy import expint, Shi
>>> Ei(x).rewrite(expint)
-expint(1, x*exp_polar(I*pi)) - I*pi
>>> Ei(x).rewrite(Shi)
Chi(x) + Shi(x)

See Also
========

expint: Generalised exponential integral.
E1: Special case of the generalised exponential integral.
li: Logarithmic integral.
Li: Offset logarithmic integral.
Si: Sine integral.
Ci: Cosine integral.
Shi: Hyperbolic sine integral.
Chi: Hyperbolic cosine integral.
uppergamma: Upper incomplete gamma function.

References
==========

.. [1] https://dlmf.nist.gov/6.6
.. [2] https://en.wikipedia.org/wiki/Exponential_integral
.. [3] Abramowitz & Stegun, section 5: https://web.archive.org/web/20201128173312/http://people.math.sfu.ca/~cbm/aands/page_228.htm

c                ó°  € VP                   '       d   \        P                  # V\        P                  J d   \        P                  # V\        P                  J d   \        P                  # VP                   '       d   \        P                  # VP                  4       w  r#V'       d0   \        V4      ^\        ,          \        ,          V,          ,           # R# r’  )	rQ   r   rO   rM   r-   Úextract_branch_factorr¥  r	   r
   ©rX   r{   r.  rb   s   &&  r6   r[   ÚEi.evalœ  s‹   € à�9�9ˆ9Ü×%Ñ%Ð%Ø”!—*‘*‹_Ü—:‘:ÐØ”!×$Ñ$Ó$Ü—6‘6ˆMà�9�9ˆ9Ü×%Ñ%Ð%à×'Ñ'Ó)‰ˆßÜ�b“6˜Aœa�C¤�F 1�HÕ$Ð$ñ r8   c                ó‚   € \        V P                  ^ ,          4      pV^8X  d   \        V4      V,          # \        W4      hrh   )r   r*   r   r   ©r0   r@   rY   s   && r6   rA   ÚEi.fdiff¬  s4   € Ü˜Ÿ™ 1�Ó&ˆØ�qŒ=Ü�s“8˜C•<Ðä$ TÓ4Ð4r8   c                óð   <€ V P                   ^ ,          \        R4      ,          P                  '       d5   \        SV `  V4      \
        \        ,          P	                  V4      ,           # \        SV `  V4      # r¢   )r*   r   rÝ   rß   Ú_eval_evalfr	   r
   )r0   Úprecrç   s   &&€r6   r®  ÚEi._eval_evalf³  sT   ø€ Ø�I‰I�a�Lœ B›Õ'×4×4Ð4Ü‘7Ñ& tÓ,´´"µ×/AÑ/AÀ$Ó/GÕGÐGÜ‰wÑ" 4Ó(Ð(r8   c                ón   € ^ RI Hp V! ^ \        R4      V,          4      ) \        \        ,          ,
          # )r(   rŒ   r£   )r�   r�   r   r	   r
   r‘   s   &&, r6   r“   ÚEi._eval_rewrite_as_uppergamma¸  s)   € ÝFñ ˜1œj¨›n¨QÕ.Ó/Ð/´!´Bµ$Õ6Ð6r8   c                óh   € \        ^\        R4      V,          4      ) \        \        ,          ,
          # )r=   r£   )r°   r   r	   r
   r¥   s   &&,r6   r±   ÚEi._eval_rewrite_as_expint¾  s$   € Ü�qœ* R›.¨Õ*Ó+Ð+¬a´­dÕ2Ð2r8   c                óŽ   € \        V\        4      '       d   \        VP                  ^ ,          4      # \        \	        V4      4      # rh   )rR   r   Úlir*   r   r¥   s   &&,r6   Ú_eval_rewrite_as_liÚEi._eval_rewrite_as_liÁ  s1   € Ü�aœ×ÒÜ�a—f‘f˜Q•i“=Ð ô
 ”#�a“&‹zÐr8   c                ó¾   € VP                   '       d2   \        V4      \        V4      ,           \        \        ,          ,
          # \        V4      \        V4      ,           # r–   )Úis_negativeÚShiÚChir	   r
   r¥   s   &&,r6   Ú_eval_rewrite_as_SiÚEi._eval_rewrite_as_SiÊ  s8   € Ø�=�=ˆ=Ü�q“6œC ›F•?¤Q¤r¥TÕ)Ð)ä�q“6œC ›F•?Ð"r8   c                ó8   € \        V4      \        V4      ,          # r–   )r   Ú_eisr  s   &&&,r6   r¹   ÚEi._eval_rewrite_as_tractableÓ  s   € Ü�1‹vœ˜Q›ÕÐr8   c                óº   € ^ RI Hp \        \        RV.4      P                  4      pV! \
        P                  V,          V,          V\
        P                  V34      # ©r(   )ÚIntegralrZ   )Úsympy.integrals.integralsrÄ  r   r   Únamer   ÚExp1rO   ©r0   r{   r’   rÄ  rZ   s   &&,  r6   Ú_eval_rewrite_as_IntegralÚEi._eval_rewrite_as_IntegralÖ  sE   € Ý6ÜÔ'¨¨a¨SÓ1×6Ñ6Ó7ˆÙœŸ™ �	 !� a¬×);Ñ);¸QÐ%?Ó@Ð@r8   c                ó  <€ ^ RI Hp V P                  ^ ,          P                  V^ 4      pV P                  ^ ,          P	                  WR7      pVP                  W4      pVP                  '       dŒ   VP                  V4      w  rxVf   \        V4      MTp\        V4      W‚,          ,           \        ,           V! V4      P                  '       d   \        \        ,          ,
          # \        P                  ,
          # \        S	V `A  WVR7      # )r(   )r   )rÈ   rÆ   )Úsympyr   r*   r´   rÍ   rÌ   rQ   Úas_coeff_exponentr   r   rº  r	   r
   r   r-   rß   rÓ   )
r0   r3   rÇ   rÈ   r   Úx0rY   ÚcÚerç   s
   &&&&     €r6   rÓ   ÚEi._eval_as_leading_termÛ  sË   ø€ ÝØ�Y‰Y�q�\×Ñ  1Ó%ˆØ�i‰i˜�l×*Ñ*¨1Ð*Ó8ˆØ�w‰w�qÓˆØ�:�:ˆ:Ø×(Ñ(¨Ó+‰DˆAØ!š\”3�q”6¨tˆDÜ�q“6˜A�F•?¤ZÕ/Ù˜4›×,×,Ð,””"•õ:ð :Ü23·&±&õ:ð :ä‰wÑ,¨QÀÐ,ÓEÐEr8   c                óæ   <€ V P                   ^ ,          P                  V^ 4      pVP                  '       d-   V P                  ! V P                   !  pVP	                  WV4      # \
        SV `  WV4      # rh   )r*   r´   rQ   r½  Ú_eval_nseriesrß   ©r0   r3   rb   rÇ   rÈ   rÎ  Úfrç   s   &&&&&  €r6   rÓ  ÚEi._eval_nseriesç  s]   ø€ Ø�Y‰Y�q�\×Ñ  1Ó%ˆØ�:�:ˆ:Ø×(Ò(¨$¯)©)Ñ4ˆAØ—?‘? 1¨Ó.Ð.Ü‰wÑ$ Q¨4Ó0Ð0r8   c                óž  <€ ^ RI Hp V^ ,          pV\        P                  \        P                  39   d�   V P
                  ^ ,          p\        V4       Uu. uF  p\        V4      Wx,          ,          NK  	  upV! ^Wq,          ,          V4      .,           p	\        V4      V,          \        V	!  ,          # \        \        V `3  WW44      # u upi rÖ   )rÙ   rØ   r   rM   rO   r*   rÞ   r   r   r   rß   r¥  rà   rT  s   &&&&&     €r6   rà   ÚEi._eval_aseriesî  s¡   ø€ Ý,Ø�a•ˆà”Q—Z‘Z¤×!3Ñ!3Ð4Ô4Ø—	‘	˜!•ˆAÜ05°a´Ó9±¨1”˜1“ ¥×&Ð&±Ñ9Ù˜1˜Q�T�6 1Ó%Ð&õ'ˆAä˜“F˜1•H¤ Q¡Õ'Ð'ä”R˜Ñ,¨Q°qÓ?Ð?ùò	 :s   Á!C
ré   r<   r–   rh   )rê   rë   rì   rí   rî   rð   r[   rA   r®  r“   r±   r·  r½  Ú_eval_rewrite_as_CiÚ_eval_rewrite_as_ChiÚ_eval_rewrite_as_Shir¹   rÉ  rÓ   rÓ  rà   rò   ró   rô   rõ   s   @@r6   r¥  r¥  D  st   ù‡ € ñTðn ñ%ó ð%ô5õ)ò
7ò3òò#ð
 .ÐØ.ÐØ.Ðô òAõ

F÷1÷
@õ 
@r8   r¥  c                   ó†   a a€ ] tR tRt oRt]R 4       tR tR tR t	R t
R t]t]t]tRV 3R	 lltV 3R
 ltR tRtVtV ;t# )r°   iû  a‡
  
Generalized exponential integral.

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

This function is defined as

.. math:: \operatorname{E}_\nu(z) = z^{\nu - 1} \Gamma(1 - \nu, z),

where $\Gamma(1 - \nu, z)$ is the upper incomplete gamma function
(``uppergamma``).

Hence for $z$ with positive real part we have

.. math:: \operatorname{E}_\nu(z)
          =   \int_1^\infty \frac{e^{-zt}}{t^\nu} \mathrm{d}t,

which explains the name.

The representation as an incomplete gamma function provides an analytic
continuation for $\operatorname{E}_\nu(z)$. If $\nu$ is a
non-positive integer, the exponential integral is thus an unbranched
function of $z$, otherwise there is a branch point at the origin.
Refer to the incomplete gamma function documentation for details of the
branching behavior.

Examples
========

>>> from sympy import expint, S
>>> from sympy.abc import nu, z

Differentiation is supported. Differentiation with respect to $z$ further
explains the name: for integral orders, the exponential integral is an
iterated integral of the exponential function.

>>> expint(nu, z).diff(z)
-expint(nu - 1, z)

Differentiation with respect to $\nu$ has no classical expression:

>>> expint(nu, z).diff(nu)
-z**(nu - 1)*meijerg(((), (1, 1)), ((0, 0, 1 - nu), ()), z)

At non-postive integer orders, the exponential integral reduces to the
exponential function:

>>> expint(0, z)
exp(-z)/z
>>> expint(-1, z)
exp(-z)/z + exp(-z)/z**2

At half-integers it reduces to error functions:

>>> expint(S(1)/2, z)
sqrt(pi)*erfc(sqrt(z))/sqrt(z)

At positive integer orders it can be rewritten in terms of exponentials
and ``expint(1, z)``. Use ``expand_func()`` to do this:

>>> from sympy import expand_func
>>> expand_func(expint(5, z))
z**4*expint(1, z)/24 + (-z**3 + z**2 - 2*z + 6)*exp(-z)/24

The generalised exponential integral is essentially equivalent to the
incomplete gamma function:

>>> from sympy import uppergamma
>>> expint(nu, z).rewrite(uppergamma)
z**(nu - 1)*uppergamma(1 - nu, z)

As such it is branched at the origin:

>>> from sympy import exp_polar, pi, I
>>> expint(4, z*exp_polar(2*pi*I))
I*pi*z**3/3 + expint(4, z)
>>> expint(nu, z*exp_polar(2*pi*I))
z**(nu - 1)*(exp(2*I*pi*nu) - 1)*gamma(1 - nu) + expint(nu, z)

See Also
========

Ei: Another related function called exponential integral.
E1: The classical case, returns expint(1, z).
li: Logarithmic integral.
Li: Offset logarithmic integral.
Si: Sine integral.
Ci: Cosine integral.
Shi: Hyperbolic sine integral.
Chi: Hyperbolic cosine integral.
uppergamma

References
==========

.. [1] https://dlmf.nist.gov/8.19
.. [2] https://functions.wolfram.com/GammaBetaErf/ExpIntegralE/
.. [3] https://en.wikipedia.org/wiki/Exponential_integral

c           	     ó®  € ^ RI HpHp \        V4      pW8w  d   \	        WR4      # VP
                  '       d   V^ 8:  g,   VP
                  '       gP   ^V,          P
                  '       d7   \        \        W!^,
          ,          V! ^V,
          V4      ,          4      4      # VP                  4       w  r&V\        P                  J d   R# VP                  '       d‘   V^ 8”  g   R# \	        W4      ^\        ,          \        ,          V,          \        P                  V^,
          ,          ,          \        V^,
          4      ,          \        V4      V^,
          ,          ,          ,
          # \        ^\        ,          \        ,          V,          V,          4      ^,
          W!^,
          ,          ,          V! ^V,
          4      ,          \	        W4      ,           # )r(   )Úgammar�   N)r�   rÞ  r�   r   r°   Ú
is_Integerr   r§  r   r-   Ú
is_integerr
   r	   rP   r   r   )rX   Únur{   rÞ  r�   Únu2rb   s   &&&    r6   r[   Úexpint.evalc  s7  € çOÜ˜‹nˆØŒ9Ü˜#“>Ð!Ø�=�=ˆ=˜R 1œW¨R¯]¯]¨]ÀÀ"Å×?P×?PÐ?PÜœj¨°!­V­±ZÀÀBÅÈÓ5JÕ)JÓKÓLÐLð ×&Ñ&Ó(‰ˆØ”—‘‹;ÙØ�=�=ˆ=Ø˜”6ÙÜ˜"“=Ø”B•$”q•&˜•(œ1Ÿ=™=¨2°­6Õ2Õ2´9¸RÀ!½VÓ3DÕDÄZÐPQÃ]ÐUWÐZ[ÕU[ÕE\Õ\õ]ð ]ô ˜œ!�œB�˜r�	 !�Ó$ qÕ(¨!°1­f­+Õ5±e¸AÀ½F³mÕCÄfÈRÃmÕSÐSr8   c           	     óØ   € V P                   w  r#V^8X  d1   W2^,
          ,          ) \        . ^^.^ ^ ^V,
          .. V4      ,          # V^8X  d   \        V^,
          V4      ) # \        W4      hr<   )r*   r&   r°   r   )r0   r@   rá  r{   s   &&  r6   rA   Úexpint.fdiffy  sh   € Ø—	‘	‰ˆØ�qŒ=Ø˜Q�•K�<¤¨¨Q°¨F°Q¸¸1¸r½6°NÀBÈÓ JÕJÐJØ˜Œ]Ü˜2 �6 1Ó%Ð%Ð%ä$ TÓ4Ð4r8   c                óV   € ^ RI Hp W!^,
          ,          V! ^V,
          V4      ,          # r‹   )r�   r�   )r0   rá  r{   r’   r�   s   &&&, r6   r“   Ú"expint._eval_rewrite_as_uppergamma‚  s!   € ÝFØ˜•6�{™: a¨"¥f¨aÓ0Õ0Ð0r8   c                ón  € V^8X  dC   \        V\        \        ) \        ,          4      ,          4      ) \        \        ,          ,
          # VP                  '       dÕ   V^8”  dÎ   \        V4      ) pWA^,
          ,          \        V^,
          4      ,          \        V4      P                  \         4      ,          \        V4      \        V^,
          4      ,          \        \        V^,
          4       Uu. uF(  p\        W,
          ^,
          4      WE,          ,          NK*  	  up!  ,          ,           # V # u upi r<   )r¥  r   r	   r
   rß  r   r   ÚE1r
  r   r   rÞ   )r0   rá  r{   r’   r3   rd   s   &&&,  r6   Ú_eval_rewrite_as_EiÚexpint._eval_rewrite_as_Ei†  sÛ   € Ø�Œ7Ü�qœ¤A 2¤b¥5Ó)Õ)Ó*Ð*¬Q¬r­TÕ1Ð1Ø�]�]ˆ]˜r Aœvä˜A“�ˆAØ˜A•v•;œy¨¨a­Ó0Õ0´°A³·±¼rÓ1BÕBÜ�A“”y  a¥Ó(Õ(Ü¼%ÀÀQÅ¼-ÓH¹-°Q”i ¥¨¥
Ó+¨A­D×0Ð0¹-ÑHÑIõJõJð Jð ˆKùò Is   Ã1.D2c                óV   € V P                  \        4      P                   ! \        3/ VB # r–   )r
  r¥  r°   r   s   &,r6   r!  Úexpint._eval_expand_func’  s!   € Ø�|‰|œBÓ×'Ò'¬Ñ8°%Ñ8Ð8r8   c                óJ   € V^8w  d   V # \        V4      \        V4      ,
          # r<   )r»  r¼  )r0   rá  r{   r’   s   &&&,r6   r½  Úexpint._eval_rewrite_as_Si•  s    € Ø�Œ7ØˆKÜ�1‹vœ˜A›�Ðr8   c                óŠ  <€ V P                   ^ ,          P                  V4      '       gŒ   V P                   ^ ,          pV^8X  d-   V P                  ! V P                   !  pVP                  WV4      # VP                  '       d4   V^8”  d-   V P
                  ! V P                   !  pVP                  WV4      # \        SV `  WV4      # rh   )r*   Úhasr½  rÓ  rß  rê  rß   )r0   r3   rb   rÇ   rÈ   rá  rÕ  rç   s   &&&&&  €r6   rÓ  Úexpint._eval_nseries�  s›   ø€ Ø�y‰y˜�|×Ñ ×"Ò"Ø—‘˜1•ˆBØ�QŒwØ×,Ò,¨d¯i©iÑ8�Ø—‘ q¨TÓ2Ð2Ø——� 2¨¤6Ø×,Ò,¨d¯i©iÑ8�Ø—‘ q¨TÓ2Ð2Ü‰wÑ$ Q¨4Ó0Ð0r8   c                óÜ  <€ ^ RI Hp V^,          pV P                  ^ ,          pV\        P                  J dž   V P                  ^,          p\        V4       U	u. uF7  p	\        P                  V	,          \        Wy4      ,          W‰,          ,          NK9  	  up	V! ^W�,          ,          V4      .,           p
\        V) 4      V,          \        V
!  ,          # \        \        V `3  WW44      # u up	i rÖ   )rÙ   rØ   r*   r   rM   rÞ   rP   r   r   r   rß   r°   rà   )r0   rb   rá   r3   rÇ   rØ   râ   rá  r{   rd   ræ   rç   s   &&&&&      €r6   rà   Úexpint._eval_aseries¨  s¹   ø€ Ý,Ø�a•ˆØ�Y‰Y�q�\ˆà”A—J‘JÓØ—	‘	˜!•ˆAÜKPÐQRÌ8ÓTÉ8Àa”—‘ Õ!¤O°BÓ$:Õ:¸Q½T×AÐAÉ8ÑTÑX]Ð^_Ð`aÕ`dÕ^dÐfgÓXhÐWiÕiˆAÜ˜˜“G˜A•I¤ a¡Õ(Ð(ä”V˜TÑ0°¸1ÓCÐCùò Us   Á=C)c                óÚ   € ^ RI Hp V P                  w  rE\        \	        RV4      P
                  4      pV! Wd) ,          \        V) V,          4      ,          V^\        P                  34      # rÃ  )	rÅ  rÄ  r*   r   r   rÆ  r   r   rM   )r0   r*   r’   rÄ  rb   r3   rZ   s   &*,    r6   rÉ  Ú expint._eval_rewrite_as_Integral´  sS   € Ý6Ø�y‰y‰ˆÜÔ'¨¨TÓ2×7Ñ7Ó8ˆÙ˜˜2�¤ Q B q¥D£	Õ)¨A¨q´!·*±*Ð+=Ó>Ð>r8   ré   rh   )rê   rë   rì   rí   rî   rð   r[   rA   r“   rê  r!  r½  rÙ  rÚ  rÛ  rÓ  rà   rÉ  rò   ró   rô   rõ   s   @@r6   r°   r°   û  sd   ù‡ € ñdðN ñTó ðTò*5ò1ò
ò9òð .ÐØ.ÐØ.Ð÷	1õ
D÷?ò ?r8   r°   c                ó   € \        ^V 4      # )aÓ  
Classical case of the generalized exponential integral.

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

This is equivalent to ``expint(1, z)``.

Examples
========

>>> from sympy import E1
>>> E1(0)
expint(1, 0)

>>> E1(5)
expint(1, 5)

See Also
========

Ei: Exponential integral.
expint: Generalised exponential integral.
li: Logarithmic integral.
Li: Offset logarithmic integral.
Si: Sine integral.
Ci: Cosine integral.
Shi: Hyperbolic sine integral.
Chi: Hyperbolic cosine integral.

)r°   )r{   s   &r6   ré  ré  »  s   € ô@ �!�Q‹<Ðr8   c                   ó�   a € ] tR tRt o Rt]R 4       tRR ltR tR t	R t
R tR	 t]tR
 t]tR tR tRR ltRR ltR tRtV tR# )r¶  iÞ  aÈ  
The classical logarithmic integral.

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

For use in SymPy, this function is defined as

.. math:: \operatorname{li}(x) = \int_0^x \frac{1}{\log(t)} \mathrm{d}t \,.

Examples
========

>>> from sympy import I, oo, li
>>> from sympy.abc import z

Several special values are known:

>>> li(0)
0
>>> li(1)
-oo
>>> li(oo)
oo

Differentiation with respect to $z$ is supported:

>>> from sympy import diff
>>> diff(li(z), z)
1/log(z)

Defining the ``li`` function via an integral:
>>> from sympy import integrate
>>> integrate(li(z))
z*li(z) - Ei(2*log(z))

>>> integrate(li(z),z)
z*li(z) - Ei(2*log(z))


The logarithmic integral can also be defined in terms of ``Ei``:

>>> from sympy import Ei
>>> li(z).rewrite(Ei)
Ei(log(z))
>>> diff(li(z).rewrite(Ei), z)
1/log(z)

We can numerically evaluate the logarithmic integral to arbitrary precision
on the whole complex plane (except the singular points):

>>> li(2).evalf(30)
1.04516378011749278484458888919

>>> li(2*I).evalf(30)
1.0652795784357498247001125598 + 3.08346052231061726610939702133*I

We can even compute Soldner's constant by the help of mpmath:

>>> from mpmath import findroot
>>> findroot(li, 2)
1.45136923488338

Further transformations include rewriting ``li`` in terms of
the trigonometric integrals ``Si``, ``Ci``, ``Shi`` and ``Chi``:

>>> from sympy import Si, Ci, Shi, Chi
>>> li(z).rewrite(Si)
-log(I*log(z)) - log(1/log(z))/2 + log(log(z))/2 + Ci(I*log(z)) + Shi(log(z))
>>> li(z).rewrite(Ci)
-log(I*log(z)) - log(1/log(z))/2 + log(log(z))/2 + Ci(I*log(z)) + Shi(log(z))
>>> li(z).rewrite(Shi)
-log(1/log(z))/2 + log(log(z))/2 + Chi(log(z)) - Shi(log(z))
>>> li(z).rewrite(Chi)
-log(1/log(z))/2 + log(log(z))/2 + Chi(log(z)) - Shi(log(z))

See Also
========

Li: Offset logarithmic integral.
Ei: Exponential integral.
expint: Generalised exponential integral.
E1: Special case of the generalised exponential integral.
Si: Sine integral.
Ci: Cosine integral.
Shi: Hyperbolic sine integral.
Chi: Hyperbolic cosine integral.

References
==========

.. [1] https://en.wikipedia.org/wiki/Logarithmic_integral
.. [2] https://mathworld.wolfram.com/LogarithmicIntegral.html
.. [3] https://dlmf.nist.gov/6
.. [4] https://mathworld.wolfram.com/SoldnersConstant.html

c                ó  € VP                   '       d   \        P                  # V\        P                  J d   \        P                  # V\        P
                  J d   \        P
                  # VP                   '       d   \        P                  # R # r–   )rQ   r   r-   rN   rO   rM   r“  s   &&r6   r[   Úli.evalB  sW   € à�9�9ˆ9Ü—6‘6ˆMØ”!—%‘%‹ZÜ×%Ñ%Ð%Ø”!—*‘*‹_Ü—:‘:ÐØ�9�9ˆ9Ü—6‘6ˆMñ r8   c                óŒ   € V P                   ^ ,          pV^8X  d!   \        P                  \        V4      ,          # \	        W4      hrh   ©r*   r   rN   r   r   r«  s   && r6   rA   Úli.fdiffM  ó4   € Ø�i‰i˜�lˆØ�qŒ=Ü—5‘5œ3˜s›8Õ#Ð#ä$ TÓ4Ð4r8   c                óŽ   € V P                   ^ ,          pVP                  '       g    V P                  VP                  4       4      # R# rJ   )r*   r‡   r/   rj   rz   s   & r6   rl   Úli._eval_conjugateT  s5   € Ø�I‰I�a�Lˆà×%×%Ð%Ø—9‘9˜QŸ[™[›]Ó+Ð+ñ &r8   c                ó8   € \        V4      \        ^4      ,           # r©   )ÚLir¶  r¥   s   &&,r6   Ú_eval_rewrite_as_LiÚli._eval_rewrite_as_LiZ  ó   € Ü�!‹u”r˜!“u�}Ðr8   c                ó*   € \        \        V4      4      # r–   )r¥  r   r¥   s   &&,r6   rê  Úli._eval_rewrite_as_Ei]  s   € Ü”#�a“&‹zÐr8   c           	     ó"  € ^ RI Hp V! ^ \        V4      ) 4      ) \        P                  \        \        V4      4      \        \        P
                  \        V4      ,          4      ,
          ,          ,           \        \        V4      ) 4      ,
          # r‹   )r�   r�   r   r   r�   rN   r‘   s   &&, r6   r“   Úli._eval_rewrite_as_uppergamma`  s`   € ÝFÙ˜A¤ A£˜wÓ'Ð'Ü—‘œœC ›F›¤c¬!¯%©%´°A³­,Ó&7Õ7Õ8õ9Ü;>ÄÀAÃ¸w»<õHð 	Ir8   c                óž  € \        \        \        V4      ,          4      \        \        \        \        V4      ,          4      ,          ,
          \        P
                  \        \        P                  \        V4      ,          4      \        \        V4      4      ,
          ,          ,
          \        \        \        V4      ,          4      ,
          # r–   )ÚCir	   r   ÚSir   r�   rN   r¥   s   &&,r6   r½  Úli._eval_rewrite_as_Sie  sp   € Ü”1”S˜“V•8“œq¤¤A¤c¨!£f¥H£�~Õ-Ü—‘œœAŸE™E¤# a£&�LÓ)¬C´°A³«KÕ7Õ8õ9Ü;>¼qÄÀQÃ½x»=õIð 	Jr8   c                ó  € \        \        V4      4      \        \        V4      4      ,
          \        P                  \        \        P
                  \        V4      ,          4      \        \        V4      4      ,
          ,          ,
          # r–   )r¼  r   r»  r   r�   rN   r¥   s   &&,r6   rÛ  Úli._eval_rewrite_as_Shik  sJ   € Ü”C˜“F“œc¤# a£&›kÕ)¬A¯F©F´C¼¿¹¼cÀ!»f½Ó4EÌÌCÐPQËFËÕ4SÕ,TÕTÐUr8   c           	     ó  € \        V4      \        RR\        V4      4      ,          \        P                  \        \        V4      4      \        \        P                  \        V4      ,          4      ,
          ,          ,           \
        ,           # )r=   )r=   r=   )rª   rª   )r   r%   r   r�   rN   r   r¥   s   &&,r6   r¬   Úli._eval_rewrite_as_hyperp  sY   € Ü�A“”u˜V V¬S°«VÓ4Õ4Ü—‘œœC ›F›¤c¬!¯%©%´°A³­,Ó&7Õ7Õ8õ9Ü;EõFð 	Gr8   c                ó  € \        \        V4      ) 4      ) \        P                  \        \        P                  \        V4      ,          4      \        \        V4      4      ,
          ,          ,
          \	        RR\        V4      ) 4      ,
          # )r=   )ré   r<   ))r(   r(   ré   )r   r   r�   rN   r&   r¥   s   &&,r6   r¦   Úli._eval_rewrite_as_meijergt  sY   € Ü”c˜!“f�W“�¤§¡¬¬A¯E©E´#°a³&­LÓ(9¼CÄÀAÃ»KÕ(GÕ HÕHÜ˜* l´S¸³V°GÓ<õ=ð 	>r8   Nc                ó8   € V\        \        V4      4      ,          # r–   )rÀ  r   r  s   &&&,r6   r¹   Úli._eval_rewrite_as_tractablex  s   € Ø”4œ˜A›“<ÕÐr8   c                ó  € V P                   ^ ,          p\        ^V4       Uu. uF,  p\        V4      V,          \        V4      V,          ,          NK.  	  pp\        \        \        V4      4      ,           \        V!  ,           # u upi rh   )r*   rÞ   r   r   r   r   )r0   r3   rb   rÇ   rÈ   r{   rd   ræ   s   &&&&&   r6   rÓ  Úli._eval_nseries{  sd   € Ø�I‰I�a�LˆÜ7<¸QÀ´{ÓC±{°!Œc�!‹f�q�[œI a›L¨1Õ,×-Ð-±{ˆÐCÜœC¤ A£›KÕ'¬#¨q©'Õ1Ð1ùò Ds   ¢2Bc                óT   € V P                   ^ ,          pVP                  '       d   R# R# rp   r9  rz   s   & r6   r   Úli._eval_is_zero€  ó    € Ø�I‰I�a�LˆØ�9�9ˆ9Ùñ r8   ré   r<   r–   rh   )rê   rë   rì   rí   rî   rð   r[   rA   rl   r  rê  r“   r½  rÙ  rÛ  rÚ  r¬   r¦   r¹   rÓ  r   rò   ró   r(  s   @r6   r¶  r¶  Þ  su   ø‡ € ñ`ðF ñó ðô5ò,òòòIò
Jð .ÐòVð 0ÐòGò>ô ô2÷
ð r8   r¶  c                   ó^   a € ] tR tRt o Rt]R 4       tRR ltR tR t	RR lt
RR	 ltR
tV tR# )r  i…  aº  
The offset logarithmic integral.

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

For use in SymPy, this function is defined as

.. math:: \operatorname{Li}(x) = \operatorname{li}(x) - \operatorname{li}(2)

Examples
========

>>> from sympy import Li
>>> from sympy.abc import z

The following special value is known:

>>> Li(2)
0

Differentiation with respect to $z$ is supported:

>>> from sympy import diff
>>> diff(Li(z), z)
1/log(z)

The shifted logarithmic integral can be written in terms of $li(z)$:

>>> from sympy import li
>>> Li(z).rewrite(li)
li(z) - li(2)

We can numerically evaluate the logarithmic integral to arbitrary precision
on the whole complex plane (except the singular points):

>>> Li(2).evalf(30)
0

>>> Li(4).evalf(30)
1.92242131492155809316615998938

See Also
========

li: Logarithmic integral.
Ei: Exponential integral.
expint: Generalised exponential integral.
E1: Special case of the generalised exponential integral.
Si: Sine integral.
Ci: Cosine integral.
Shi: Hyperbolic sine integral.
Chi: Hyperbolic cosine integral.

References
==========

.. [1] https://en.wikipedia.org/wiki/Logarithmic_integral
.. [2] https://mathworld.wolfram.com/LogarithmicIntegral.html
.. [3] https://dlmf.nist.gov/6

c                óŽ   € V\         P                  J d   \         P                  # V\        ^4      8X  d   \         P                  # R# r’  )r   rM   r-   r“  s   &&r6   r[   ÚLi.evalÆ  s0   € à”—
‘
‹?Ü—:‘:ÐØ”!�A“$ŒYÜ—6‘6ˆMñ r8   c                óŒ   € V P                   ^ ,          pV^8X  d!   \        P                  \        V4      ,          # \	        W4      hrh   rü  r«  s   && r6   rA   ÚLi.fdiffÍ  rþ  r8   c                óJ   € V P                  \        4      P                  V4      # r–   )r
  r¶  Úevalf)r0   r¯  s   &&r6   r®  ÚLi._eval_evalfÔ  s   € Ø�|‰|œBÓ×%Ñ% dÓ+Ð+r8   c                ó8   € \        V4      \        ^4      ,
          # r©   )r¶  r¥   s   &&,r6   r·  ÚLi._eval_rewrite_as_li×  r  r8   Nc                óN   € V P                  \        4      P                  R RR7      # )r  T)r1   )r
  r¶  r  s   &&&,r6   r¹   ÚLi._eval_rewrite_as_tractableÚ  s!   € Ø�|‰|œBÓ×'Ñ'¨¸$Ð'Ó?Ð?r8   c                óZ   € V P                   ! V P                  !  pVP                  WV4      # r–   )r·  r*   rÓ  )r0   r3   rb   rÇ   rÈ   rÕ  s   &&&&& r6   rÓ  ÚLi._eval_nseriesÝ  s'   € Ø×$Ò$ d§i¡iÑ0ˆØ�‰˜q TÓ*Ð*r8   ré   r<   r–   rh   )rê   rë   rì   rí   rî   rð   r[   rA   r®  r·  r¹   rÓ  rò   ró   r(  s   @r6   r  r  …  s>   ø‡ € ñ=ð@ ñó ðô5ò,òô@÷+ò +r8   r  c                   ó`   a a€ ] tR tRt oRt]R 4       tR	R ltR tR t	R
V 3R llt
RtVtV ;t# )ÚTrigonometricIntegraliå  z(Base class for trigonometric integrals. c                ó¸  € V\         P                  J d   V P                  # V\         P                  J d   V P	                  4       # V\         P
                  J d   V P                  4       # VP                  '       d   V P                  # VP                  \        \        4      4      pVf,   V P                  ^ 4      ^ 8X  d   VP                  \        4      pVe   V P                  V^4      # VP                  \        \        ) 4      4      pVe   V P                  VR4      # VP                  \        R4      4      pVf(   V P                  ^ 4      ^ 8X  d   VP                  R4      pVe   V P                  V4      # VP                  4       w  r#V^ 8X  d	   W!8X  d   R # ^\        ,          \        ,          V,          V P                  ^ 4      ,          V ! V4      ,           # )Nr£   )r   r-   Ú_atzerorM   Ú_atinfrO   Ú	_atneginfrQ   rU   r   r	   Ú	_trigfuncÚ_IfactorÚ_minusfactorr§  r
   r¨  s   &&  r6   r[   ÚTrigonometricIntegral.evalé  sl  € à”—‘‹;Ø—;‘;ÐØ”!—*‘*‹_Ø—:‘:“<ÐØ”!×$Ñ$Ó$Ø—=‘=“?Ð"à�9�9ˆ9Ø—;‘;Ðà×'Ñ'¬
´1«Ó6ˆØŠ:˜#Ÿ-™-¨Ó*¨aÔ/Ø×+Ñ+¬AÓ.ˆBØŠ>Ø—<‘<  AÓ&Ð&Ø×'Ñ'¬
´A°2«Ó7ˆØŠ>Ø—<‘<  BÓ'Ð'à×'Ñ'¬
°2«Ó7ˆØŠ:˜#Ÿ-™-¨Ó*¨aÔ/Ø×+Ñ+¨BÓ/ˆBØŠ>Ø×#Ñ# BÓ'Ð'à×'Ñ'Ó)‰ˆØ�Œ6�b”gÙØ”�t”A�v�a�x˜Ÿ™ aÓ(Õ(©3¨r«7Õ2Ð2r8   c                óŽ   € \        V P                  ^ ,          4      pV^8X  d   V P                  V4      V,          # \        W4      hrh   )r   r*   r/  r   r«  s   && r6   rA   ÚTrigonometricIntegral.fdiff	  s:   € Ü˜Ÿ™ 1�Ó&ˆØ�qŒ=Ø—>‘> #Ó& sÕ*Ð*ä$ TÓ4Ð4r8   c                óJ   € V P                  V4      P                  \        4      # r–   )r±   r
  r¥  r¥   s   &&,r6   rê  Ú)TrigonometricIntegral._eval_rewrite_as_Ei  s   € Ø×+Ñ+¨AÓ.×6Ñ6´rÓ:Ð:r8   c                óN   € ^ RI Hp V P                  V4      P                  V4      # r‹   )r�   r�   r±   r
  r‘   s   &&, r6   r“   Ú1TrigonometricIntegral._eval_rewrite_as_uppergamma  s!   € ÝFØ×+Ñ+¨AÓ.×6Ñ6°zÓBÐBr8   c                óð  <€ V P                   ^ ,          P                  V^ 4      ^ 8w  d   \        SV `  WV4      # V P	                  V4      P                  WV4      pV P	                  ^ 4      ^ 8w  d
   V^,          pVP                  \        R RR7      pV P	                  ^ 4      ^ 8w  d   V\        \        V4      ,           ,          pVP                  WP                   ^ ,          4      P                  WV4      # )r(   c                 ó    € W,          V,          # r–   ré   )rZ   rb   s   &&r6   Ú<lambda>Ú5TrigonometricIntegral._eval_nseries.<locals>.<lambda>  s
   € ¸!½$¸q¾&r8   F)Úsimultaneous)	r*   rÎ   rß   rÓ  r/  Úreplacer   r   r   )r0   r3   rb   rÇ   rÈ   Ú
baseseriesrç   s   &&&&& €r6   rÓ  Ú#TrigonometricIntegral._eval_nseries  sÇ   ø€ à�9‰9�Q�<×Ñ˜Q Ó" aÔ'Ü‘7Ñ(¨¨tÓ4Ð4Ø—^‘^ AÓ&×4Ñ4°Q¸4Ó@ˆ
Ø�>‰>˜!Ó Ô!Ø˜!�OˆJØ×'Ñ'¬Ñ-@ÈuÐ'ÓUˆ
Ø�>‰>˜!Ó Ô!Øœ*¤s¨1£vÕ-Õ-ˆJØ�‰˜q§)¡)¨A¥,Ó/×=Ñ=¸aÀDÓIÐIr8   ré   r<   rh   )rê   rë   rì   rí   rî   rð   r[   rA   rê  r“   rÓ  rò   ró   rô   rõ   s   @@r6   r*  r*  å  s8   ù‡ € Ù3ð ñ3ó ð3ô>5ò;òC÷
J÷ 
Jr8   r*  c                   ó®   a a€ ] tR tRt oRt]t]P                  t	]
R 4       t]
R 4       t]
R 4       t]
R 4       tR tR t]tR	 tV 3R
 ltR tRtVtV ;t# )r  i$  a<  
Sine integral.

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

This function is defined by

.. math:: \operatorname{Si}(z) = \int_0^z \frac{\sin{t}}{t} \mathrm{d}t.

It is an entire function.

Examples
========

>>> from sympy import Si
>>> from sympy.abc import z

The sine integral is an antiderivative of $sin(z)/z$:

>>> Si(z).diff(z)
sin(z)/z

It is unbranched:

>>> from sympy import exp_polar, I, pi
>>> Si(z*exp_polar(2*I*pi))
Si(z)

Sine integral behaves much like ordinary sine under multiplication by ``I``:

>>> Si(I*z)
I*Shi(z)
>>> Si(-z)
-Si(z)

It can also be expressed in terms of exponential integrals, but beware
that the latter is branched:

>>> from sympy import expint
>>> Si(z).rewrite(expint)
-I*(-expint(1, z*exp_polar(-I*pi/2))/2 +
     expint(1, z*exp_polar(I*pi/2))/2) + pi/2

It can be rewritten in the form of sinc function (by definition):

>>> from sympy import sinc
>>> Si(z).rewrite(sinc)
Integral(sinc(_t), (_t, 0, z))

See Also
========

Ci: Cosine integral.
Shi: Hyperbolic sine integral.
Chi: Hyperbolic cosine integral.
Ei: Exponential integral.
expint: Generalised exponential integral.
sinc: unnormalized sinc function
E1: Special case of the generalised exponential integral.
li: Logarithmic integral.
Li: Offset logarithmic integral.

References
==========

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

c                ó8   € \         \        P                  ,          # r–   ©r
   r   r�   ©rX   s   &r6   r-  Ú	Si._atinfn  s   € ä”!—&‘&�yÐr8   c                ó:   € \         ) \        P                  ,          # r–   rC  rD  s   &r6   r.  ÚSi._atneginfr  s   € äˆs”1—6‘6�zÐr8   c                ó   € \        V4      ) # r–   )r  r“  s   &&r6   r1  ÚSi._minusfactorv  s   € ä�1“ˆvˆr8   c                ó<   € \         \        V4      ,          V,          # r–   )r	   r»  ©rX   r{   Úsigns   &&&r6   r0  ÚSi._Ifactorz  s   € ä”�Q“�x˜�}Ðr8   c                óÒ   € \         ^,          \        \        \        4      V,          4      \        \        \        ) 4      V,          4      ,
          ^,          \        ,          ,           # r©   )r
   ré  r   r	   r¥   s   &&,r6   r±   ÚSi._eval_rewrite_as_expint~  s=   € ä�!�t”rœ*¤Q›-¨�/Ó*¬R´
¼A¸2³¸qÕ0@Ó-AÕAÀ1ÕDÄQÕFÕFÐFr8   c                óx   € ^ RI Hp \        \        RV.4      P                  4      pV! \        V4      V^ V34      # rÃ  )rÅ  rÄ  r   r   rÆ  r$   rÈ  s   &&,  r6   rÉ  ÚSi._eval_rewrite_as_Integral‚  s6   € Ý6ÜÔ'¨¨a¨SÓ1×6Ñ6Ó7ˆÙœ˜Q› ! Q¨ Ó+Ð+r8   c                ój  € V P                   ^ ,          P                  WVR7      pV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# VP                  '       g   V P                  V4      # V # ©r(   rÆ   rÉ   rÊ   rË   ©r*   rÍ   rÎ   r   rL   r´   r   rº  rQ   r\  r/   rÑ   s   &&&&  r6   rÓ   ÚSi._eval_as_leading_term‰  s‹   € Ø�i‰i˜�l×*Ñ*¨1¸dÐ*ÓCˆØ�x‰x˜˜1‹~ˆà”1—5‘5‹=Ø—9‘9˜Q ¬b°«h×.B×.BÐ.B¡sÈ�9ÓLˆDØ�<�<ˆ<ØˆJØ×!×!Ð!Ø—9‘9˜T“?Ð"àˆKr8   c                ót  <€ ^ RI Hp V^ ,          pV\        P                  J Edw   V P                  ^ ,          p\        V^,          ^,           4       Uu. uFM  p\        P                  V,          \        ^V,          4      ,          V^V,          ^,           ,          ,          NKO  	  upV! ^Wq,          ,          V4      .,           p	\        V^,          4       Uu. uFT  p\        P                  V,          \        ^V,          ^,           4      ,          V^V^,           ,          ,          ,          NKV  	  upV! ^Wq,          ,          V4      .,           p
\        ^,          \        V4      \        V	!  ,          ,
          \        V4      \        V
!  ,          ,
          # \        \        V `;  WW44      # u upi u upi rÖ   )rÙ   rØ   r   rM   r*   rÞ   rP   r   r
   r"   r   r#   rß   r  rà   )r0   rb   rá   r3   rÇ   rØ   râ   r{   rd   ÚpÚqrç   s   &&&&&      €r6   rà   ÚSi._eval_aseries–  sP  ø€ Ý,Ø�a•ˆð ”A—J‘JÔØ—	‘	˜!•ˆAä" 1 a¥4¨!¥8œ_ó.Ù,˜ô —‘ Õ!¤I¨a°­c£NÕ2°Q¸¸1½¸q½µ\×AÐAÙ,ñ.Ù16°q¸½µv¸qÓ1AÐ0BõCˆAô # 1 a¥4œ[ó*Ù(˜ô —‘ Õ!¤I¨a°­c°A­gÓ$6Õ6¸¸QÀÀAÅ½Y½×GÐGÙ(ñ*Ù-2°1°QµTµ6¸1Ó-=Ð,>õ?ˆAä�a•4œ#˜a›&¤ a¡�.Õ(¬3¨q«6´#°q±'­>Õ9Ð9ô ”R˜Ñ,¨Q°qÓ?Ð?ùò.ùò*s   ÁAF0ÃAF5c                óT   € V P                   ^ ,          pVP                  '       d   R# R# rp   r9  rz   s   & r6   r   ÚSi._eval_is_zero¦  r  r8   ré   )rê   rë   rì   rí   rî   r#   r/  r   r-   r,  rð   r-  r.  r1  r0  r±   rÉ  Ú_eval_rewrite_as_sincrÓ   rà   r   rò   ró   rô   rõ   s   @@r6   r  r  $  s’   ù‡ € ñDðL €IØ�f‰f€Gàñó ðð ñó ðð ñó ðð ñó ðòGò,ð
 7Ðòõ@÷ ò r8   r  c                   ó¤   a a€ ] tR tRt oRt]t]P                  t	]
R 4       t]
R 4       t]
R 4       t]
R 4       tR tR tR	 tV 3R
 ltRtVtV ;t# )r  i¬  a
  
Cosine integral.

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

This function is defined for positive $x$ by

.. math:: \operatorname{Ci}(x) = \gamma + \log{x}
                     + \int_0^x \frac{\cos{t} - 1}{t} \mathrm{d}t
       = -\int_x^\infty \frac{\cos{t}}{t} \mathrm{d}t,

where $\gamma$ is the Euler-Mascheroni constant.

We have

.. math:: \operatorname{Ci}(z) =
    -\frac{\operatorname{E}_1\left(e^{i\pi/2} z\right)
           + \operatorname{E}_1\left(e^{-i \pi/2} z\right)}{2}

which holds for all polar $z$ and thus provides an analytic
continuation to the Riemann surface of the logarithm.

The formula also holds as stated
for $z \in \mathbb{C}$ with $\Re(z) > 0$.
By lifting to the principal branch, we obtain an analytic function on the
cut complex plane.

Examples
========

>>> from sympy import Ci
>>> from sympy.abc import z

The cosine integral is a primitive of $\cos(z)/z$:

>>> Ci(z).diff(z)
cos(z)/z

It has a logarithmic branch point at the origin:

>>> from sympy import exp_polar, I, pi
>>> Ci(z*exp_polar(2*I*pi))
Ci(z) + 2*I*pi

The cosine integral behaves somewhat like ordinary $\cos$ under
multiplication by $i$:

>>> from sympy import polar_lift
>>> Ci(polar_lift(I)*z)
Chi(z) + I*pi/2
>>> Ci(polar_lift(-1)*z)
Ci(z) + I*pi

It can also be expressed in terms of exponential integrals:

>>> from sympy import expint
>>> Ci(z).rewrite(expint)
-expint(1, z*exp_polar(-I*pi/2))/2 - expint(1, z*exp_polar(I*pi/2))/2

See Also
========

Si: Sine integral.
Shi: Hyperbolic sine integral.
Chi: Hyperbolic cosine integral.
Ei: Exponential integral.
expint: Generalised exponential integral.
E1: Special case of the generalised exponential integral.
li: Logarithmic integral.
Li: Offset logarithmic integral.

References
==========

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

c                ó"   € \         P                  # r–   )r   r-   rD  s   &r6   r-  Ú	Ci._atinfÿ  s   € ä�v‰vˆr8   c                ó$   € \         \        ,          # r–   )r	   r
   rD  s   &r6   r.  ÚCi._atneginf  s   € ä”�tˆr8   c                óD   € \        V4      \        \        ,          ,           # r–   ©r  r	   r
   r“  s   &&r6   r1  ÚCi._minusfactor  s   € ä�!‹u”qœ•t�|Ðr8   c                ó`   € \        V4      \        \        ,          ^,          V,          ,           # r©   ©r¼  r	   r
   rK  s   &&&r6   r0  ÚCi._Ifactor  s   € ä�1‹vœœ"�˜Q�˜t�Õ#Ð#r8   c                óš   € \        \        \        4      V,          4      \        \        \        ) 4      V,          4      ,           ) ^,          # r©   )ré  r   r	   r¥   s   &&,r6   r±   ÚCi._eval_rewrite_as_expint  s2   € Ü”Jœq“M !•OÓ$¤r¬*´a°R«.¸Õ*:Ó';Õ;Ð<¸QÕ>Ð>r8   c                óÞ   € ^ RI Hp \        \        RV.4      P                  4      p\
        P                  \        V4      ,           V! ^\        V4      ,
          V,          V^ V34      ,
          # rÃ  )	rÅ  rÄ  r   r   rÆ  r   r   r   r"   rÈ  s   &&,  r6   rÉ  ÚCi._eval_rewrite_as_Integral  sP   € Ý6ÜÔ'¨¨a¨SÓ1×6Ñ6Ó7ˆÜ�|‰|œc !›fÕ$¡x°´3°q³6µ¸1µ¸qÀ!ÀQ¸iÓ'HÕHÐHr8   c                óô  € V P                   ^ ,          P                  WVR7      pVP                  V^ 4      pV\        P                  J d2   TP                  T^ \        V4      P                  '       d   RMRR7      pVP                  '       dH   VP                  V4      w  rgVf   \        V4      MTp\        V4      Wr,          ,           \        ,           # VP                  '       d   V P                  V4      # V # rS  ©r*   rÍ   rÎ   r   rL   r´   r   rº  rQ   rÍ  r   r   ry   r/   ©r0   r3   rÇ   rÈ   rY   rÒ   rÏ  rÐ  s   &&&&    r6   rÓ   ÚCi._eval_as_leading_term  ó¹   € Ø�i‰i˜�l×*Ñ*¨1¸dÐ*ÓCˆØ�x‰x˜˜1‹~ˆà”1—5‘5‹=Ø—9‘9˜Q ¬b°«h×.B×.BÐ.B¡sÈ�9ÓLˆDØ�<�<ˆ<Ø×(Ñ(¨Ó+‰DˆAØ!š\”3�q”6¨tˆDÜ�q“6˜A�F•?¤ZÕ/Ð/Ø�^�^ˆ^Ø—9‘9˜T“?Ð"àˆKr8   c                óÎ  <€ ^ RI Hp V^ ,          pV\        P                  \        P                  39   Ed“   V P
                  ^ ,          p\        V^,          ^,           4       Uu. uFM  p\        P                  V,          \        ^V,          4      ,          V^V,          ^,           ,          ,          NKO  	  upV! ^Wq,          ,          V4      .,           p	\        V^,          4       Uu. uFT  p\        P                  V,          \        ^V,          ^,           4      ,          V^V^,           ,          ,          ,          NKV  	  upV! ^Wq,          ,          V4      .,           p
\        V4      \        V	!  ,          \        V4      \        V
!  ,          ,
          pV\        P                  J d   V\        \        ,          ,          pV# \        \        V `C  WW44      # u upi u upi rÖ   )rÙ   rØ   r   rM   rO   r*   rÞ   rP   r   r#   r   r"   r	   r
   rß   r  rà   )r0   rb   rá   r3   rÇ   rØ   râ   r{   rd   rW  rX  Úresultrç   s   &&&&&       €r6   rà   ÚCi._eval_aseries&  so  ø€ Ý,Ø�a•ˆà”Q—Z‘Z¤×!3Ñ!3Ð4Õ4Ø—	‘	˜!•ˆAä" 1 a¥4¨!¥8œ_ó.Ù,˜ô —‘ Õ!¤I¨a°­c£NÕ2°Q¸¸1½¸q½µ\×AÐAÙ,ñ.Ù16°q¸½µv¸qÓ1AÐ0BõCˆAô # 1 a¥4œ[ó*Ù(˜ô —‘ Õ!¤I¨a°­c°A­gÓ$6Õ6¸¸QÀÀAÅ½Y½×GÐGÙ(ñ*Ù-2°1°QµTµ6¸1Ó-=Ð,>õ?ˆAä˜“VœS !™WÕ%¬¨A«´°Q±Õ(8Õ8ˆFàœ×*Ñ*Ó*Øœ!œB�$•�ØˆMä”R˜Ñ,¨Q°qÓ?Ð?ùò.ùò*s   Á%AGÃ+AG"ré   )rê   rë   rì   rí   rî   r"   r/  r   rÏ   r,  rð   r-  r.  r1  r0  r±   rÉ  rÓ   rà   rò   ró   rô   rõ   s   @@r6   r  r  ¬  sˆ   ù‡ € ñMð^ €IØ×Ñ€Gàñó ðð ñó ðð ñó ðð ñ$ó ð$ò?òIò
÷@õ @r8   r  c                   ó’   a € ] tR tRt o Rt]t]P                  t	]
R 4       t]
R 4       t]
R 4       t]
R 4       tR tR tR	 tR
tV tR# )r»  i8  ai  
Sinh integral.

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

This function is defined by

.. math:: \operatorname{Shi}(z) = \int_0^z \frac{\sinh{t}}{t} \mathrm{d}t.

It is an entire function.

Examples
========

>>> from sympy import Shi
>>> from sympy.abc import z

The Sinh integral is a primitive of $\sinh(z)/z$:

>>> Shi(z).diff(z)
sinh(z)/z

It is unbranched:

>>> from sympy import exp_polar, I, pi
>>> Shi(z*exp_polar(2*I*pi))
Shi(z)

The $\sinh$ integral behaves much like ordinary $\sinh$ under
multiplication by $i$:

>>> Shi(I*z)
I*Si(z)
>>> Shi(-z)
-Shi(z)

It can also be expressed in terms of exponential integrals, but beware
that the latter is branched:

>>> from sympy import expint
>>> Shi(z).rewrite(expint)
expint(1, z)/2 - expint(1, z*exp_polar(I*pi))/2 - I*pi/2

See Also
========

Si: Sine integral.
Ci: Cosine integral.
Chi: Hyperbolic cosine integral.
Ei: Exponential integral.
expint: Generalised exponential integral.
E1: Special case of the generalised exponential integral.
li: Logarithmic integral.
Li: Offset logarithmic integral.

References
==========

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

c                ó"   € \         P                  # r–   ©r   rM   rD  s   &r6   r-  Ú
Shi._atinf{  ó   € ä�z‰zÐr8   c                ó"   € \         P                  # r–   )r   rO   rD  s   &r6   r.  ÚShi._atneginf  s   € ä×!Ñ!Ð!r8   c                ó   € \        V4      ) # r–   )r»  r“  s   &&r6   r1  ÚShi._minusfactorƒ  s   € ä�A“ˆwˆr8   c                ó<   € \         \        V4      ,          V,          # r–   )r	   r  rK  s   &&&r6   r0  ÚShi._Ifactor‡  s   € ä”�A“�w�t�|Ðr8   c                ó¾   € \        V4      \        \        \        \        ,          4      V,          4      ,
          ^,          \        \        ,          ^,          ,
          # r©   )ré  r   r	   r
   r¥   s   &&,r6   r±   ÚShi._eval_rewrite_as_expint‹  s5   € ä�1“œœ9¤Q¤r¥T›?¨1Õ,Ó-Õ-¨qÕ0´1´Rµ4¸µ6Õ9Ð9r8   c                óT   € V P                   ^ ,          pVP                  '       d   R# R# rp   r9  rz   s   & r6   r   ÚShi._eval_is_zero�  r  r8   c                óf  € V P                   ^ ,          P                  V4      pV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# VP                  '       g   V P                  V4      # V # )r(   rÉ   rÊ   rË   rT  rÑ   s   &&&&  r6   rÓ   ÚShi._eval_as_leading_term”  s†   € Ø�i‰i˜�l×*Ñ*¨1Ó-ˆØ�x‰x˜˜1‹~ˆà”1—5‘5‹=Ø—9‘9˜Q ¬b°«h×.B×.BÐ.B¡sÈ�9ÓLˆDØ�<�<ˆ<ØˆJØ×!×!Ð!Ø—9‘9˜T“?Ð"àˆKr8   ré   N)rê   rë   rì   rí   rî   r!   r/  r   r-   r,  rð   r-  r.  r1  r0  r±   r   rÓ   rò   ró   r(  s   @r6   r»  r»  8  s}   ø‡ € ñ=ð~ €IØ�f‰f€Gàñó ðð ñ"ó ð"ð ñó ðð ñó ðò:ò÷
ð r8   r»  c                   óŒ   a € ] tR tRt o Rt]t]P                  t	]
R 4       t]
R 4       t]
R 4       t]
R 4       tR tR tR	tV tR
# )r¼  i¢  aX  
Cosh integral.

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

This function is defined for positive $x$ by

.. math:: \operatorname{Chi}(x) = \gamma + \log{x}
                     + \int_0^x \frac{\cosh{t} - 1}{t} \mathrm{d}t,

where $\gamma$ is the Euler-Mascheroni constant.

We have

.. math:: \operatorname{Chi}(z) = \operatorname{Ci}\left(e^{i \pi/2}z\right)
                     - i\frac{\pi}{2},

which holds for all polar $z$ and thus provides an analytic
continuation to the Riemann surface of the logarithm.
By lifting to the principal branch we obtain an analytic function on the
cut complex plane.

Examples
========

>>> from sympy import Chi
>>> from sympy.abc import z

The $\cosh$ integral is a primitive of $\cosh(z)/z$:

>>> Chi(z).diff(z)
cosh(z)/z

It has a logarithmic branch point at the origin:

>>> from sympy import exp_polar, I, pi
>>> Chi(z*exp_polar(2*I*pi))
Chi(z) + 2*I*pi

The $\cosh$ integral behaves somewhat like ordinary $\cosh$ under
multiplication by $i$:

>>> from sympy import polar_lift
>>> Chi(polar_lift(I)*z)
Ci(z) + I*pi/2
>>> Chi(polar_lift(-1)*z)
Chi(z) + I*pi

It can also be expressed in terms of exponential integrals:

>>> from sympy import expint
>>> Chi(z).rewrite(expint)
-expint(1, z)/2 - expint(1, z*exp_polar(I*pi))/2 - I*pi/2

See Also
========

Si: Sine integral.
Ci: Cosine integral.
Shi: Hyperbolic sine integral.
Ei: Exponential integral.
expint: Generalised exponential integral.
E1: Special case of the generalised exponential integral.
li: Logarithmic integral.
Li: Offset logarithmic integral.

References
==========

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

c                ó"   € \         P                  # r–   rv  rD  s   &r6   r-  Ú
Chi._atinfð  rx  r8   c                ó"   € \         P                  # r–   rv  rD  s   &r6   r.  ÚChi._atneginfô  rx  r8   c                óD   € \        V4      \        \        ,          ,           # r–   rf  r“  s   &&r6   r1  ÚChi._minusfactorø  s   € ä�1‹vœœ"��}Ðr8   c                ó`   € \        V4      \        \        ,          ^,          V,          ,           # r©   rc  rK  s   &&&r6   r0  ÚChi._Ifactorü  s   € ä�!‹u”qœ•t˜A•v˜d•{Õ"Ð"r8   c                óÀ   € \         ) \        ,          ^,          \        V4      \        \        \         \        ,          4      V,          4      ,           ^,          ,
          # r©   )r	   r
   ré  r   r¥   s   &&,r6   r±   ÚChi._eval_rewrite_as_expint 	  s7   € Üˆr”"�u�Q�wœ"˜Q›%¤"¤Y¬q´­t£_°QÕ%6Ó"7Õ7¸Õ:Õ:Ð:r8   c                óô  € V P                   ^ ,          P                  WVR7      pVP                  V^ 4      pV\        P                  J d2   TP                  T^ \        V4      P                  '       d   RMRR7      pVP                  '       dH   VP                  V4      w  rgVf   \        V4      MTp\        V4      Wr,          ,           \        ,           # VP                  '       d   V P                  V4      # V # rS  rm  rn  s   &&&&    r6   rÓ   ÚChi._eval_as_leading_term	  rp  r8   ré   N)rê   rë   rì   rí   rî   r    r/  r   rÏ   r,  rð   r-  r.  r1  r0  r±   rÓ   rò   ró   r(  s   @r6   r¼  r¼  ¢  s{   ø‡ € ñHðT €IØ×Ñ€Gàñó ðð ñó ðð ñó ðð ñ#ó ð#ò;÷ð r8   r¼  c                   ó\   a € ] tR tRt o RtRt]R 4       tRR ltR t	]	t
R tR t]tR	tV tR
# )ÚFresnelIntegrali	  z%Base class for the Fresnel integrals.Tc                ó”  € V\         P                  J d   \         P                  # VP                  '       d   \         P                  # \         P
                  pTpR pVP                  R4      pVe   V) pTpRpVP                  \        4      pVe#   V P                  \        ,          V,          pTpRpV'       d   W ! V4      ,          # R# )FNTr£   )	r   rM   r�   rQ   r-   rN   rU   r	   Ú_sign)rX   r{   ÚprefactÚnewargÚchangedr.  s   &&    r6   r[   ÚFresnelIntegral.eval	  s¯   € ð ”—
‘
‹?Ü—6‘6ˆMð �9�9ˆ9Ü—6‘6ˆMô —%‘%ˆØˆØˆà×,Ñ,¨RÓ0ˆØŠ>Ø�hˆGØˆFØˆGà×,Ñ,¬QÓ/ˆØŠ>Ø—i‘i¤•k 'Õ)ˆGØˆFØˆGçØ˜3˜v›;Õ&Ð&ñ r8   c                ó¸   € V^8X  dJ   V P                  \        P                  \        ,          V P                  ^ ,          ^,          ,          4      # \        W4      hr<   )r/  r   r�   r
   r*   r   r?   s   &&r6   rA   ÚFresnelIntegral.fdiff;	  s<   € Ø�qŒ=Ø—>‘>¤!§&¡&¬¥)¨D¯I©I°a­L¸!­OÕ";Ó<Ð<ä$ TÓ4Ð4r8   c                ó<   € V P                   ^ ,          P                  # rh   rq   rk   s   &r6   r5  Ú&FresnelIntegral._eval_is_extended_realA	  r7  r8   c                ó<   € V P                   ^ ,          P                  # rh   r9  rk   s   &r6   r   ÚFresnelIntegral._eval_is_zeroF	  r;  r8   c                ób   € V P                  V P                  ^ ,          P                  4       4      # rh   ri   rk   s   &r6   rl   ÚFresnelIntegral._eval_conjugateI	  rn   r8   ré   Nr<   )rê   rë   rì   rí   rî   rï   rð   r[   rA   r5  r|   r   rl   r7   r.   rò   ró   r(  s   @r6   r“  r“  	  sA   ø‡ € Ù0à€Jàñ'ó ð'ô<5ò-ð -€Oò$ò3ð -†Lr8   r“  c                   óŒ   a a€ ] tR tRt oRt]t]P                  ) t	]
]R 4       4       tR tR tR tR tR tV 3R	 ltR
tVtV ;t# )r™   iO	  a�  
Fresnel integral S.

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

This function is defined by

.. math:: \operatorname{S}(z) = \int_0^z \sin{\frac{\pi}{2} t^2} \mathrm{d}t.

It is an entire function.

Examples
========

>>> from sympy import I, oo, fresnels
>>> from sympy.abc import z

Several special values are known:

>>> fresnels(0)
0
>>> fresnels(oo)
1/2
>>> fresnels(-oo)
-1/2
>>> fresnels(I*oo)
-I/2
>>> fresnels(-I*oo)
I/2

In general one can pull out factors of -1 and $i$ from the argument:

>>> fresnels(-z)
-fresnels(z)
>>> fresnels(I*z)
-I*fresnels(z)

The Fresnel S integral obeys the mirror symmetry
$\overline{S(z)} = S(\bar{z})$:

>>> from sympy import conjugate
>>> conjugate(fresnels(z))
fresnels(conjugate(z))

Differentiation with respect to $z$ is supported:

>>> from sympy import diff
>>> diff(fresnels(z), z)
sin(pi*z**2/2)

Defining the Fresnel functions via an integral:

>>> from sympy import integrate, pi, sin, expand_func
>>> integrate(sin(pi*z**2/2), z)
3*fresnels(z)*gamma(3/4)/(4*gamma(7/4))
>>> expand_func(integrate(sin(pi*z**2/2), z))
fresnels(z)

We can numerically evaluate the Fresnel integral to arbitrary precision
on the whole complex plane:

>>> fresnels(2).evalf(30)
0.343415678363698242195300815958

>>> fresnels(-2*I).evalf(30)
0.343415678363698242195300815958*I

See Also
========

fresnelc: Fresnel cosine integral.

References
==========

.. [1] https://en.wikipedia.org/wiki/Fresnel_integral
.. [2] https://dlmf.nist.gov/7
.. [3] https://mathworld.wolfram.com/FresnelIntegrals.html
.. [4] https://functions.wolfram.com/GammaBetaErf/FresnelS
.. [5] The converging factors for the fresnel integrals
        by John W. Wrench Jr. and Vicki Alley

c                ó†  € V ^ 8  d   \         P                  # \        V4      p\        V4      ^8”  dz   VR,          p\        ^,          ) V^,          ,          ^V ,          ^,
          ,          ^V ,          ^V ,          ^,           ,          ^V ,          ^,           ,          ,          V,          # V^,          V^,          ) V ,          ,          \        ^4      RV ,          ^,
          ,          \        ^V ,          ^,           ,          ,          ,          ^V ,          ^,           \        ^V ,          ^,           4      ,          ,          # ©r(   r£   r_   ©r   r-   r   r`   r
   r   ©rb   r3   rc   rW  s   &&* r6   re   Úfresnels.taylor_term§	  sæ   € ð ˆqŒ5Ü—6‘6ˆMä˜“
ˆAÜ�>Ó" QÔ&Ø" 2Õ&�Ü˜Q�˜˜q !�t� Q q¥S¨1¥WÕ-¨q°­s°A°aµC¸!µG­}¸aÀ½cÀA½gÕ/FÕGÈ1ÕLÐLà˜!•t  1¥˜u q�jÕ(¬A¨a«D°2°aµ4¸!µ8Õ,<¼RÀ!ÀAÅ#ÈÅ'½]Õ,JÕKÐPQÐRSÕPSÐVWÕPWÔYbÐcdÐefÕcfÐijÕcjÓYkÕOkÕlÐlr8   c           	     óˆ  € \         P                  \        ,           ^,          \        \         P                  \        ,           ^,          \	        \
        4      ,          V,          4      \        \        \         P                  \        ,
          ^,          \	        \
        4      ,          V,          4      ,          ,
          ,          # ©é   ©r   rN   r	   r:   r   r
   r¥   s   &&,r6   r  Úfresnels._eval_rewrite_as_erf´	  óf   € Ü—‘œ•	˜1�}¤¤Q§U¡U¬Q¥Y°¥M´$´r³(Õ$:¸1Õ$<Ó =ÄÄ#ÄqÇuÁuÌqÅyÐRSÅmÔTXÔY[ÓT\ÕF\Ð]^ÕF^ÓB_Õ@_Õ _Õ`Ð`r8   c           	     óà   € \         V^,          ,          ^,          \        \        ^^4      .\        ^^4      \        ^^4      .\         ^,          ) V^,          ,          ^,          4      ,          # ©é   )r
   r%   r   r¥   s   &&,r6   r¬   Úfresnels._eval_rewrite_as_hyper·	  sY   € Ü�!�Q•$�w�q�yœ5¤(¨1¨a£.Ð!1´H¸QÀ³NÄHÈQÐPQÃNÐ3SÔVXÐZ[ÕV[ÐU[Ð\]Ð_`Õ\`ÕU`ÐacÕUcÓdÕdÐdr8   c           
     óh  € \         V\        ^	^4      ,          ,          \        ^4      V^,          \        ^^4      ,          ,          V) \        ^^4      ,          ,          ,          \        . ^.\        ^^4      .\        ^^4      ^ .\         ^,          ) V^,          ,          ^,          4      ,          # )é	   )r
   r   r   r&   r¥   s   &&,r6   r¦   Ú!fresnels._eval_rewrite_as_meijergº	  sŽ   € Ü�1”h˜q !“nÕ$Õ$¬¨Q«°°Aµ¼ÀÀA»Õ0FÕ(FÈÈÌXÐVWÐYZË^ÕG[Õ([Õ\Ü˜"˜q˜c¤H¨Q°£NÐ#3´h¸qÀ!³nÀaÐ5HÌ2ÈqÍ5È&ÐQRÐTUÕQUÍ+ÐVXÍ.ÓYõZð 	[r8   c                óª   € ^ RI Hp \        \        RV.4      P                  4      pV! \        \        V^,          ,          ^,          4      V^ V34      # rÃ  )rÅ  rÄ  r   r   rÆ  r#   r
   rÈ  s   &&,  r6   rÉ  Ú"fresnels._eval_rewrite_as_Integral¾	  óB   € Ý6ÜÔ'¨¨a¨SÓ1×6Ñ6Ó7ˆÙœœB˜q !�t�G A�I›¨¨A¨q¨	Ó2Ð2r8   c                óB  € ^ RI Hp V P                  ^ ,          P                  WVR7      pV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^,          ,          ^,          # V\
        P                  \
        P                  39   d=   V\
        P                  J d   ^MRpV\
        P                  ,          V! W4      ,           # V P                  V4      # ©r(   r×   rÆ   rÉ   rÊ   rË   r£   )rÙ   rØ   r*   rÍ   rÎ   r   rÏ   r´   r   rº  rQ   r
   rM   rO   r�   r/   ©r0   r3   rÇ   rÈ   rØ   rY   rÒ   ræ   s   &&&&    r6   rÓ   Úfresnels._eval_as_leading_termÃ	  sÍ   € Ý,Ø�i‰i˜�l×*Ñ*¨1¸dÐ*ÓCˆØ�x‰x˜˜1‹~ˆà”1×$Ñ$Ó$Ø—9‘9˜Q ¬b°«h×.B×.BÐ.B¡sÈ�9ÓLˆDØ�<�<ˆ<Ü�c˜1•f•9˜Q•;ÐØ”a—j‘j¤!×"4Ñ"4Ð5Ô5ØœQŸZ™ZÓ'‘¨RˆAØ”Q—V‘V•8™e A›kÕ)Ð)à—9‘9˜T“?Ð"r8   c           
     ó~  <€ ^ RI Hp V^ ,          pV\        P                  \        P                  ) 39   Edä   V P                  ^ ,          p\        ^ V4       Uu. uF³  p^V,          ^,           V8  g   K  \        P                  V,          \        ^V,          ^,           4      ,          ^^V,          ^,           ,          V^V,          ^,           ,          ,          ^^V,          ,          ,          \        ^V,          4      ,          ,          NKµ  	  p	p^^V,          ,          .\        ^V4       Uu. uFÁ  p^V,          ^,           V8  g   K  \        P                  V,          \        ^V,          ^,
          4      ,          ^^V,          ^,           ,          V^V,          ^,           ,          ,          ^^V,          ^,
          ,          ,          \        ^V,          ^,
          4      ,          ,          NKÃ  	  up,           p
V	 Uu. uF!  p\        ^\        ,          4      ) V,          NK#  	  p	pV
 Uu. uF!  p\        ^\        ,          4      ) V,          NK#  	  p
pV\        P                  J d   ^MRpV\        P                  ,          \        V^,          4      \        V	!  ,          \        V^,          4      \        V
!  ,          ,           P                  V\        ^\        ,          4      V,          4      ,           V! ^Wq,          ,          V4      ,           # \        SV `A  WW44      # u upi u upi u upi u upi ©r(   r×   r£   )rÙ   rØ   r   rM   r*   rÞ   rP   r   r   r
   r�   r#   r   r"   rÎ   rß   rà   ©r0   rb   rá   r3   rÇ   rØ   râ   r{   rd   rW  rX  rZ   ræ   rç   s   &&&&&        €r6   rà   Úfresnels._eval_aseriesÒ	  sp  ø€ Ý,Ø�a•ˆð ”Q—Z‘Z¤!§*¡* Ð-Õ-Ø—	‘	˜!•ˆAô    1œ+ó6á%�Q¨¨1­¨q­°1©ôI”—‘ Õ!¤I¨a°­c°A­gÓ$6Õ6Ø�a˜•c˜A•g•,  Q q¥S¨1¥W¥Õ-°°A°aµCµÕ8¼À1ÀQÅ3»ÕG÷Ið Iá%ð ð 6ð �A�a•C•�	ä  1œ+ó6á%�Q¨¨1­¨q­°1©ôQœQŸ]™]¨AÕ-´	¸!¸A½#À½'Ó0BÕBØ�a˜•c˜A•g•,  Q q¥S¨1¥W¥Õ-°°A°aµC¸!µGµÕ<¼YÀqÈÅsÈQÅwÓ=OÕO÷Qð Qá%ñ6õ 6ˆAñ )*Ó*© 1”$�qœ•t“*�˜Q—�©ˆAÐ*Ù()Ó*© 1”$�qœ•t“*�˜Q—�©ˆAÐ*ØœaŸj™jÓ(‘¨bˆAð ”Q—V‘V•8œs 1 a¥4›y¬¨a©Õ0´3°q¸!µt³9¼SÀ!¹WÕ3DÕDß‘$�qœ$˜q¤�t›* Q�,Ó'õ(Ù*/°°!µ$µ¸Ó*:õ;ð ;ô ‰wÑ$ Q¨qÓ7Ð7ùò#6ùò6ùò +ùÚ*s&   ÁL+Á5BL+Ä2L0ÅB+L0È'L5È3'L:ré   )rê   rë   rì   rí   rî   r#   r/  r   rN   r•  rñ   r   re   r  r¬   r¦   rÉ  rÓ   rà   rò   ró   rô   rõ   s   @@r6   r™   r™   O	  s`   ù‡ € ñSðh €IØ�U‰UˆF€EàØñ	mó ó ð	mòaòeò[ò3ò
#÷8õ 8r8   r™   c                   óŠ   a a€ ] tR tRt oRt]t]P                  t	]
]R 4       4       tR tR tR tR tR tV 3R	 ltR
tVtV ;t# )r˜   ið	  a‰  
Fresnel integral C.

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

This function is defined by

.. math:: \operatorname{C}(z) = \int_0^z \cos{\frac{\pi}{2} t^2} \mathrm{d}t.

It is an entire function.

Examples
========

>>> from sympy import I, oo, fresnelc
>>> from sympy.abc import z

Several special values are known:

>>> fresnelc(0)
0
>>> fresnelc(oo)
1/2
>>> fresnelc(-oo)
-1/2
>>> fresnelc(I*oo)
I/2
>>> fresnelc(-I*oo)
-I/2

In general one can pull out factors of -1 and $i$ from the argument:

>>> fresnelc(-z)
-fresnelc(z)
>>> fresnelc(I*z)
I*fresnelc(z)

The Fresnel C integral obeys the mirror symmetry
$\overline{C(z)} = C(\bar{z})$:

>>> from sympy import conjugate
>>> conjugate(fresnelc(z))
fresnelc(conjugate(z))

Differentiation with respect to $z$ is supported:

>>> from sympy import diff
>>> diff(fresnelc(z), z)
cos(pi*z**2/2)

Defining the Fresnel functions via an integral:

>>> from sympy import integrate, pi, cos, expand_func
>>> integrate(cos(pi*z**2/2), z)
fresnelc(z)*gamma(1/4)/(4*gamma(5/4))
>>> expand_func(integrate(cos(pi*z**2/2), z))
fresnelc(z)

We can numerically evaluate the Fresnel integral to arbitrary precision
on the whole complex plane:

>>> fresnelc(2).evalf(30)
0.488253406075340754500223503357

>>> fresnelc(-2*I).evalf(30)
-0.488253406075340754500223503357*I

See Also
========

fresnels: Fresnel sine integral.

References
==========

.. [1] https://en.wikipedia.org/wiki/Fresnel_integral
.. [2] https://dlmf.nist.gov/7
.. [3] https://mathworld.wolfram.com/FresnelIntegrals.html
.. [4] https://functions.wolfram.com/GammaBetaErf/FresnelC
.. [5] The converging factors for the fresnel integrals
        by John W. Wrench Jr. and Vicki Alley

c                óL  € V ^ 8  d   \         P                  # \        V4      p\        V4      ^8”  dz   VR,          p\        ^,          ) V^,          ,          ^V ,          ^,
          ,          ^V ,          ^V ,          ^,
          ,          ^V ,          ^,           ,          ,          V,          # W^,          ) V ,          ,          \        ^4      RV ,          ,          \        ^V ,          ,          ,          ,          ^V ,          ^,           \        ^V ,          4      ,          ,          # r¤  r¥  r¦  s   &&* r6   re   Úfresnelc.taylor_termH
  sÉ   € ð ˆqŒ5Ü—6‘6ˆMä˜“
ˆAÜ�>Ó" QÔ&Ø" 2Õ&�Ü˜Q�˜˜q !�t� Q q¥S¨1¥WÕ-¨q°­s°A°aµC¸!µG­}¸aÀ½cÀA½gÕ/FÕGÈ1ÕLÐLà �T˜E A�:•~¬¨1«°°1µ­´b¸1¸Q½3µiÕ)?Õ@ÀQÀqÅSÈ1ÅWÌiÐXYÐZ[ÕX[ËnÕD\Õ]Ð]r8   c           	     óˆ  € \         P                  \        ,
          ^,          \        \         P                  \        ,           ^,          \	        \
        4      ,          V,          4      \        \        \         P                  \        ,
          ^,          \	        \
        4      ,          V,          4      ,          ,           ,          # r©  r«  r¥   s   &&,r6   r  Úfresnelc._eval_rewrite_as_erfU
  r­  r8   c           	     ó¶   € V\        \        ^^4      .\        P                  \        ^^4      .\        ^,          ) V^,          ,          ^,          4      ,          # r<   )r%   r   r   r�   r
   r¥   s   &&,r6   r¬   Úfresnelc._eval_rewrite_as_hyperX
  sA   € Ø”5œ( 1 a›.Ð)¬A¯F©F´H¸QÀ³NÐ+CÄbÈ!ÅeÀVÈAÈqÍDÅ[ÐQSÅ^ÓTÕTÐTr8   c           
     óL  € \         V\        ^^4      ,          ,          \        ^4      \        V^,          ^4      ,          \        V) ^4      ,          ,          \	        . ^.\        ^^4      .\        ^^4      ^ .\         ^,          ) V^,          ,          ^,          4      ,          # r¯  )r
   r   r   r   r&   r¥   s   &&,r6   r¦   Ú!fresnelc._eval_rewrite_as_meijerg[
  s‚   € Ü�1”h˜q !“nÕ$Õ$¬¨Q«´°Q¸µT¸1³Õ(=¼dÀAÀ2Àq»kÕ(IÕJÜ˜"˜q˜c¤H¨Q°£NÐ#3´h¸qÀ!³nÀaÐ5HÌ2ÈqÍ5È&ÐQRÐTUÕQUÍ+ÐVXÍ.ÓYõZð 	[r8   c                óª   € ^ RI Hp \        \        RV.4      P                  4      pV! \        \        V^,          ,          ^,          4      V^ V34      # rÃ  )rÅ  rÄ  r   r   rÆ  r"   r
   rÈ  s   &&,  r6   rÉ  Ú"fresnelc._eval_rewrite_as_Integral_
  r·  r8   c                ó  € ^ RI Hp V P                  ^ ,          P                  WVR7      pV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# V\
        P                  \
        P                  39   d=   V\
        P                  J d   ^MRpV\
        P                  ,          V! W4      ,           # V P                  V4      # r¹  )rÙ   rØ   r*   rÍ   rÎ   r   rÏ   r´   r   rº  rQ   rM   rO   r�   r/   rº  s   &&&&    r6   rÓ   Úfresnelc._eval_as_leading_termd
  sÀ   € Ý,Ø�i‰i˜�l×*Ñ*¨1¸dÐ*ÓCˆØ�x‰x˜˜1‹~ˆà”1×$Ñ$Ó$Ø—9‘9˜Q ¬b°«h×.B×.BÐ.B¡sÈ�9ÓLˆDØ�<�<ˆ<ØˆJØ”a—j‘j¤!×"4Ñ"4Ð5Ô5ØœQŸZ™ZÓ'‘¨RˆAØ”Q—V‘V•8™e A›kÕ)Ð)à—9‘9˜T“?Ð"r8   c           
     óz  <€ ^ RI Hp V^ ,          pV\        P                  \        P                  ) 39   Edâ   V P                  ^ ,          p\        V4       Uu. uF³  p^V,          ^,           V8  g   K  \        P                  V,          \        ^V,          ^,           4      ,          ^^V,          ^,           ,          V^V,          ^,           ,          ,          ^^V,          ,          ,          \        ^V,          4      ,          ,          NKµ  	  p	p^^V,          ,          .\        ^V4       Uu. uFÁ  p^V,          ^,           V8  g   K  \        P                  V,          \        ^V,          ^,
          4      ,          ^^V,          ^,           ,          V^V,          ^,           ,          ,          ^^V,          ^,
          ,          ,          \        ^V,          ^,
          4      ,          ,          NKÃ  	  up,           p
V	 Uu. uF!  p\        ^\        ,          4      ) V,          NK#  	  p	pV
 Uu. uF   p\        ^\        ,          4      V,          NK"  	  p
pV\        P                  J d   ^MRpV\        P                  ,          \        V^,          4      \        V	!  ,          \        V^,          4      \        V
!  ,          ,           P                  V\        ^\        ,          4      V,          4      ,           V! ^Wq,          ,          V4      ,           # \        SV `A  WW44      # u upi u upi u upi u upi r½  )rÙ   rØ   r   rM   r*   rÞ   rP   r   r   r
   r�   r"   r   r#   rÎ   rß   rà   r¾  s   &&&&&        €r6   rà   Úfresnelc._eval_aseriess
  sl  ø€ Ý,Ø�a•ˆð ”Q—Z‘Z¤!§*¡* Ð-Õ-Ø—	‘	˜!•ˆAô   œ(ó3á"�Q a¨¥c¨A¥g°¡kôI”—‘ Õ!¤I¨a°­c°A­gÓ$6Õ6Ø�a˜•c˜A•g•,  Q q¥S¨1¥W¥Õ-°°A°aµCµÕ8¼À1ÀQÅ3»ÕG÷Ið Iá"ð ð 3ð �A�a•C•�	ä  1œ+ó6á%�Q¨¨1­¨q­°1©ôQœQŸ]™]¨AÕ-´	¸!¸A½#À½'Ó0BÕBØ�a˜•c˜A•g•,  Q q¥S¨1¥W¥Õ-°°A°aµC¸!µGµÕ<¼YÀqÈÅsÈQÅwÓ=OÕO÷Qð Qá%ñ6õ 6ˆAñ )*Ó*© 1”$�qœ•t“*�˜Q—�©ˆAÐ*Ù()Ó*© 1”$�qœ•t“*˜Q—,�,©ˆAÐ*ØœaŸj™jÓ(‘¨bˆAð ”Q—V‘V•8œs 1 a¥4›y¬¨a©Õ0´3°q¸!µt³9¼SÀ!¹WÕ3DÕDß‘$�qœ$˜q¤�t›* Q�,Ó'õ(Ù*/°°!µ$µ¸Ó*:õ;ð ;ô ‰wÑ$ Q¨qÓ7Ð7ùò#3ùò6ùò +ùÚ*s&   ÁL)Á4BL)Ä1L.ÅB+L.È'L3È2&L8ré   )rê   rë   rì   rí   rî   r"   r/  r   rN   r•  rñ   r   re   r  r¬   r¦   rÉ  rÓ   rà   rò   ró   rô   rõ   s   @@r6   r˜   r˜   ð	  s^   ù‡ € ñSðh €IØ�E‰E€EàØñ	^ó ó ð	^òaòUò[ò3ò
#÷8õ 8r8   r˜   c                   óV   a a€ ] tR tRt oRt]R 4       tV 3R ltRR ltR t	Rt
VtV ;t# )	r¶   i–
  z]
Helper function to make the $\mathrm{erf}(z)$ function
tractable for the Gruntz algorithm.

c                óJ   € VP                   '       d   \        P                  # R # r–   )rQ   r   rN   )rX   rY   s   &&r6   r[   Ú
_erfs.evalœ
  s   € à�;�;ˆ;Ü—5‘5ˆLñ r8   c                ót  <€ ^ RI Hp V^ ,          pV\        P                  J dê   V P                  ^ ,          p\        V4       Uu. uF|  p^\        \        4      ,          \        ^V,          4      ,          \        ^4      ) V) ,          ,          \        V4      ,          ^V,          ^V,          ^,           ,          ,          NK~  	  p	pV! ^V^V,          ^,           ,          ,          V4      p
\        V	!  P                  W1V4      V
,           # VP                  \        4      pV\        P                  J dê   V P                  ^ ,          p\        V4       Uu. uF|  p^\        \        4      ,          \        ^V,          4      ,          \        ^4      ) V) ,          ,          \        V4      ,          ^V,          ^V,          ^,           ,          ,          NK~  	  p	pV! ^V^V,          ^,           ,          ,          V4      p
\        V	!  P                  W1V4      V
,           # \        SV `9  WW44      # u upi u upi rÖ   )rÙ   rØ   r   rM   r*   rÞ   r   r
   r   r   rÓ  rU   r	   rß   rà   )r0   rb   rá   r3   rÇ   rØ   râ   r{   rd   ÚlÚorZ   rç   s   &&&&&       €r6   rà   Ú_erfs._eval_aseries¡
  sî  ø€ Ý,Ø�a•ˆð ”A—J‘JÓØ—	‘	˜!•ˆAäDIÈ!ÄHóNÙDL¸qð ”4œ“8•œi¨¨!­›nÕ,¬qØó0ð /Ø�rõ.õ Ü$ Q›<õ(Ø+,¨Q­3°!°Aµ#¸µ'Õ*:÷;ð ;ÙDLð ð Ná�a˜˜A˜a�C !�G�•n aÓ(ˆAä˜‘G×*Ñ*¨1°Ó6¸Õ:Ð:ð ×*Ñ*¬1Ó-ˆØ”—
‘
‹?Ø—	‘	˜!•ˆAô EJÈ!ÄHóNÙDL¸qð ”4œ“8•œi¨¨!­›nÕ,¬qØó0ð /Ø�rõ.õ Ü$ Q›<õ(Ø+,¨Q­3°!°Aµ#¸µ'Õ*:÷;ð ;ÙDLð ð Ná�a˜˜A˜a�C !�G�•n aÓ(ˆAä˜‘G×*Ñ*¨1°Ó6¸Õ:Ð:ô ‰wÑ$ Q¨qÓ7Ð7ùò%NùòNs   ÁBH0ÅBH5c                ó´   € V^8X  dH   V P                   ^ ,          pR\        \        4      ,          ^V,          \        V4      ,          ,           # \	        W4      hrù   )r*   r   r
   r¶   r   ©r0   r@   r{   s   && r6   rA   Ú_erfs.fdiff¼
  s@   € Ø�qŒ=Ø—	‘	˜!•ˆAØ”dœ2“h•;  1¥¤U¨1£X¥Õ-Ð-ä$ TÓ4Ð4r8   c                óp   € \         P                  \        V4      ,
          \        V^,          4      ,          # r©   )r   rN   r:   r   r¥   s   &&,r6   Ú_eval_rewrite_as_intractableÚ"_erfs._eval_rewrite_as_intractableÃ
  s!   € Ü—‘œ˜A›•¤ A q¥D£	Õ)Ð)r8   ré   r<   )rê   rë   rì   rí   rî   rð   r[   rà   rA   rÚ  rò   ró   rô   rõ   s   @@r6   r¶   r¶   –
  s2   ù‡ € ñð
 ñó ðõ8ô65÷*ò *r8   r¶   c                   ób   a a€ ] tR tRt oRtV 3R ltR	R ltR tV 3R ltR
V 3R llt	Rt
VtV ;t# )rÀ  iÇ
  zr
Helper function to make the $\mathrm{Ei}(z)$ and $\mathrm{li}(z)$
functions tractable for the Gruntz algorithm.

c                ó°  <€ ^ RI Hp V^ ,          \        P                  \        P                  39  d   \
        S
V `  WW44      # V P                  ^ ,          p\        V4       Uu. uF*  p\        V4      ^V,          V^,           ,          ,          NK,  	  ppV! ^Wa^,           ,          ,          V4      p	\        V!  P                  W1V4      V	,           # u upi rÖ   )rÙ   rØ   r   rM   rO   rß   rà   r*   rÞ   r   r   rÓ  )r0   rb   rá   r3   rÇ   rØ   r{   rd   rÓ  rÔ  rç   s   &&&&&     €r6   rà   Ú_eis._eval_aseriesÏ
  s§   ø€ Ý,Ø��8œAŸJ™J¬×(:Ñ(:Ð;Ô;Ü‘7Ñ(¨°1Ó;Ð;à�I‰I�a�LˆÜ49¸!´HÓ=±H¨qŒY�q‹\˜Q˜q�S A¨¥E�N×*Ð*±HˆÐ=Ù�!�A˜A�•J•, Ó"ˆä�Q‘×&Ñ& q¨TÓ2°QÕ6Ð6ùò >s   Á$0Cc                óš   € V^8X  d;   V P                   ^ ,          p\        P                  V,          \        V4      ,
          # \	        W4      hr<   )r*   r   rN   rÀ  r   r×  s   && r6   rA   Ú
_eis.fdiffÛ
  s8   € Ø�qŒ=Ø—	‘	˜!•ˆAÜ—5‘5˜1•9œt A›wÕ&Ð&ä$ TÓ4Ð4r8   c                ó:   € \        V) 4      \        V4      ,          # r–   )r   r¥  r¥   s   &&,r6   rÚ  Ú!_eis._eval_rewrite_as_intractableâ
  s   € Ü�A�2‹w”r˜!“u�}Ðr8   c                óê   <€ V P                   ^ ,          P                  V^ 4      pVP                  '       d.   V P                  ! V P                   !  pVP	                  WVR7      # \
        SV `  WVR7      # rQ  )r*   r´   rQ   rÚ  rÓ   rß   )r0   r3   rÇ   rÈ   rÎ  rÕ  rç   s   &&&&  €r6   rÓ   Ú_eis._eval_as_leading_termå
  se   ø€ Ø�Y‰Y�q�\×Ñ  1Ó%ˆØ�:�:ˆ:Ø×1Ò1°4·9±9Ñ=ˆAØ×*Ñ*¨1¸dÐ*ÓCÐCÜ‰wÑ,¨QÀÐ,ÓEÐEr8   c                óæ   <€ V P                   ^ ,          P                  V^ 4      pVP                  '       d-   V P                  ! V P                   !  pVP	                  WV4      # \
        SV `  WV4      # rh   )r*   r´   rQ   rÚ  rÓ  rß   rÔ  s   &&&&&  €r6   rÓ  Ú_eis._eval_nseriesì
  s]   ø€ Ø�Y‰Y�q�\×Ñ  1Ó%ˆØ�:�:ˆ:Ø×1Ò1°4·9±9Ñ=ˆAØ—?‘? 1¨Ó.Ð.Ü‰wÑ$ Q¨4Ó0Ð0r8   ré   r<   rh   )rê   rë   rì   rí   rî   rà   rA   rÚ  rÓ   rÓ  rò   ró   rô   rõ   s   @@r6   rÀ  rÀ  Ç
  s)   ù‡ € ñõ	7ô5òõF÷1÷ 1r8   rÀ  N)T)Prî   Ú
sympy.corer   Úsympy.core.addr   Úsympy.core.cacher   Úsympy.core.functionr   r   r   Úsympy.core.logicr   Úsympy.core.numbersr	   r
   r   r   Úsympy.core.relationalr   Úsympy.core.powerr   Úsympy.core.singletonr   Úsympy.core.symbolr   r   Úsympy.core.sympifyr   Ú(sympy.functions.combinatorial.factorialsr   r   r   Ú$sympy.functions.elementary.complexesr   r   r   Ú#sympy.functions.elementary.integersr   r   Ú(sympy.functions.elementary.miscellaneousr   r   Ú&sympy.functions.elementary.exponentialr   r   r   Ú%sympy.functions.elementary.hyperbolicr    r!   Ú(sympy.functions.elementary.trigonometricr"   r#   r$   Úsympy.functions.special.hyperr%   r&   r7   r:   r¼   rÁ   rW  rF   rS   rT   r¥  r°   ré  r¶  r  r*  r  r  r»  r¼  r“  r™   r˜   r¶   rÀ  ré   r8   r6   Ú<module>rú     s£  ðñFõ "Ý Ý $ß OÑ OÝ %ß 7Ó 7Ý 'Ý  Ý "ß :Ý &ß [Ñ [ß LÑ Lß >ß ?ß FÑ Fß <ß CÑ Cß 8ôô*l-ˆ/ô l-ô^Hˆ?ô HôD}Bˆ?ô }Bô@O!ˆ?ô O!ôbZ$ˆ_ô Z$ôzP;ˆô P;ôf[ˆoô [ôBt@ˆô t@ôn}?ˆ_ô }?ò@ ôFeˆô eôNZ+ˆô Z+ô@<J˜Oô <Jô~EÐ	ô EôPJ@Ð	ô J@ôXgÐ
ô gôTnÐ
ô nôj5-�oô 5-ôp^8ˆô ^8ôB^8ˆô ^8ôL.*ˆOô .*ôb*1ˆ?ö *1r8   