+
    7åûjû3  ã                   óø   € ^ RI Ht ^ RIHtHtHtHtHtHtH	t	 ^ RI
Ht ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHt ^ R	IHtHt ^ R
IHt ^ RIH t H!t! ^ RI"H#t# ^RI$H$t$ RR lt%R t& ! R R]4      t'R# )é    )ÚAccumBounds)ÚSÚSymbolÚAddÚsympifyÚExprÚ	PoleErrorÚMul)Úfactor_terms)ÚFloatÚ_illegal)ÚAppliedUndef)ÚDummy)Ú	factorial)ÚAbsÚsignÚargÚre)ÚexpÚlog)Úgamma)ÚPolynomialErrorÚfactor)ÚOrder)Úgruntzc                ó:   € \        WW#4      P                  RR7      # )a½  Computes the limit of ``e(z)`` at the point ``z0``.

Parameters
==========

e : expression, the limit of which is to be taken

z : symbol representing the variable in the limit.
    Other symbols are treated as constants. Multivariate limits
    are not supported.

z0 : the value toward which ``z`` tends. Can be any expression,
    including ``oo`` and ``-oo``.

dir : string, optional (default: "+")
    The limit is bi-directional if ``dir="+-"``, from the right
    (z->z0+) if ``dir="+"``, and from the left (z->z0-) if
    ``dir="-"``. For infinite ``z0`` (``oo`` or ``-oo``), the ``dir``
    argument is determined from the direction of the infinity
    (i.e., ``dir="-"`` for ``oo``).

Examples
========

>>> from sympy import limit, sin, oo
>>> from sympy.abc import x
>>> limit(sin(x)/x, x, 0)
1
>>> limit(1/x, x, 0) # default dir='+'
oo
>>> limit(1/x, x, 0, dir="-")
-oo
>>> limit(1/x, x, 0, dir='+-')
zoo
>>> limit(1/x, x, oo)
0

Notes
=====

First we try some heuristics for easy and frequent cases like "x", "1/x",
"x**2" and similar, so that it's fast. For all other cases, we use the
Gruntz algorithm (see the gruntz() function).

See Also
========

 limit_seq : returns the limit of a sequence.
F)Údeep)ÚLimitÚdoit)ÚeÚzÚz0Údirs   &&&&ÚOC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\series\limits.pyÚlimitr%      s    € ôf ��rÓ×$Ñ$¨%Ð$Ó0Ð0ó    c                óØ  € RpV\         P                  J dO   \        V P                  V^V,          4      V\         P                  R4      p\        V\        4      '       d   R#  V# V P                  '       gO   V P                  '       g=   V P                  '       g+   V P                  '       Ed«   \        V \        4      '       Eg”   . p^ RIHp V P                   EF  p\        WqW#4      pVP                  \         P                  4      '       d™   VP                   f‹   \        V \"        4      '       dr   \%        V 4      p	\        V	\&        4      '       g	   V! V	4      p	\        V	\&        4      '       g   \)        V 4      p	\        V	\&        4      '       d   \+        W‘W#4      u #  R#  R# \        V\        4      '       d    R# V\         P,                  J d    R# VP/                  V4       EK  	  V'       Edd   V P0                  ! V!  pV\         P,                  J dó   V P                  '       dá   \2        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d§   . p
. p\5        V4       FP  w  rÍ\        V\6        4      '       d   V
P/                  V4       K.  VP/                  V P                  V,          4       KR  	  \9        V4      ^ 8”  d4   \'        V!  P;                  4       p\        WáW#4      pV\'        V
!  ,          pV\         P,                  J d:    ^ RIHp V! V 4      pT\         P,                  J g   TT 8X  d   R# \        TYT4      # V#   \@         d     R# i ; i)a  Computes the limit of an expression term-wise.
Parameters are the same as for the ``limit`` function.
Works with the arguments of expression ``e`` one by one, computing
the limit of each and then combining the results. This approach
works only for simple limits, but it is fast.
NÚ+)Útogetherc              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5i©N)Ú
isinstancer   )Ú.0Úrrs   & r$   Ú	<genexpr>Úheuristics.<locals>.<genexpr>j   s   é € Ð/XÑVWÐPR´
¸2¼{×0KÐ0KÓVWùs   ‚TF)Úratsimp)!r   ÚInfinityr%   ÚsubsÚZeror,   r   Úis_MulÚis_AddÚis_PowÚis_Functionr   Úsympy.simplify.simplifyr)   ÚargsÚhasÚ	is_finiter   r   r
   r   Ú
heuristicsÚNaNÚappendÚfuncÚanyÚ	enumerater   ÚlenÚsimplifyÚsympy.simplify.ratsimpr1   r   )r    r!   r"   r#   ÚrvÚrr)   ÚaÚlÚmÚr2Úe2ÚiiÚrvalÚe3r1   Úrat_es   &&&&             r$   r=   r=   E   sp  € ð 
€BØ	ŒQ�Z‰ZÓÜ�1—6‘6˜!˜Q˜q�S“> 1¤a§f¡f¨cÓ2ˆÜ�bœ%× Ò Ùð !ðb €Ið_ �(�(ˆ(�a—h—h�h !§(§( (¨q¯}¯}©}ÄZÐPQÔS_×E`ÓE`ØˆÝ4Ø—•ˆAÜ�a˜BÓ$ˆAØ�u‰u”Q—Z‘Z× Ò  Q§[¡[Ò%8Ü˜a¤×%Ò%Ü$ Q›�AÜ% a¬×-Ò-Ù$ Q›K˜Ü% a¬×-Ò-Ü" 1›I˜Ü! !¤S×)Ò)Ü)¨!°Ó8Ò8ÚÚÜ˜Aœu×%Ò%ÚØ”a—e‘e“Úà—‘˜—ñ% ÷& ˆ1Ø—’˜‘ˆBØ”Q—U‘U‹{˜qŸxŸx˜x¯C«CÑ/XÑVWÓ/X¯C¯CªCÑ/XÑVWÓ/X×,XÒ,XØ�Ø�Ü )¨!¦‘H�BÜ! $¬×4Ò4ØŸ	™	 $žàŸ	™	 !§&¡&¨¥*Ö-ñ	 !-ô �r“7˜Q”;Ü˜b™×*Ñ*Ó,�BÜ˜b RÓ-�AØœS "™X��Bà”Q—U‘U‹{ðÝ>Ù# A›J�Eð œAŸE™E“> U¨a¤ZÙÜ˜U A¨3Ó/Ð/Ø€Iøô 'ô Úðús   Ì M ÍM)Í(M)c                   óJ   a € ] tR t^„t o RtRR lt]R 4       tR tR t	Rt
V tR# )	r   zäRepresents an unevaluated limit.

Examples
========

>>> from sympy import Limit, sin
>>> from sympy.abc import x
>>> Limit(sin(x)/x, x, 0)
Limit(sin(x)/x, x, 0, dir='+')
>>> Limit(1/x, x, 0, dir="-")
Limit(1/x, x, 0, dir='-')

c                ó¸  € \        V4      p\        V4      p\        V4      pV\        P                  \        P                  \        P                  ,          39   d   R pM<V\        P                  \        P                  \        P                  ,          39   d   RpVP                  V4      '       d   \        RV: RV: R24      h\        V\        4      '       d   \        V4      pM1\        V\        4      '       g   \        R\        V4      ,          4      h\        V4      R9  d   \        RV,          4      h\        P                  ! V 4      pWW43Vn        V# )Ú-r(   z7Limits approaching a variable point are not supported (z -> Ú)z6direction must be of type basestring or Symbol, not %sz1direction must be one of '+', '-' or '+-', not %s)r(   rS   ú+-)r   r   r2   ÚImaginaryUnitÚNegativeInfinityr;   ÚNotImplementedErrorr,   Ústrr   Ú	TypeErrorÚtypeÚ
ValueErrorr   Ú__new__Ú_args)Úclsr    r!   r"   r#   Úobjs   &&&&& r$   r]   ÚLimit.__new__“   s  € Ü�A‹JˆÜ�A‹JˆÜ�R‹[ˆà”!—*‘*œaŸo™o¬a¯j©jÕ8Ð9Ô9Ø‰CØ”A×&Ñ&¬¯©¼×8JÑ8JÕ(JÐKÔKØˆCà�6‰6�!�9Š9Ý%Û34³bð':ó ;ð ;ä�cœ3×ÒÜ˜“+‰CÜ˜C¤×(Ò(Üð %Ü'+¨C£yõ1ó 2ð 2äˆs‹8Ð+Ô+Üð &Ø(+õ,ó -ð -ô �lŠl˜3ÓˆØ˜2�OˆŒ	Øˆ
r&   c                óô   € V P                   ^ ,          pVP                  pVP                  V P                   ^,          P                  4       VP                  V P                   ^,          P                  4       V# )r   )r:   Úfree_symbolsÚdifference_updateÚupdate)Úselfr    Úisymss   &  r$   rc   ÚLimit.free_symbols®   sS   € à�I‰I�a�LˆØ—‘ˆØ×Ñ §	¡	¨!¥× 9Ñ 9Ô:Ø�‰�T—Y‘Y˜q•\×.Ñ.Ô/Øˆr&   c                ó,  € V P                   w  r#rBVP                  VP                  reVP                  V4      '       g(   \	        V\        V4      ,          W44      p\        V4      # \	        WcV4      p\	        WSV4      p	V	\        P                  J dJ   V\        P                  \        P                  39   d%   \	        We^,
          ,          W44      p\        V4      # V	\        P                  J d'   V\        P                  J d   \        P                  # R# R# )é   N)r:   Úbaser   r;   r%   r   r   ÚOner2   rW   ÚComplexInfinity)
rf   r    Ú_r!   r"   Úb1Úe1ÚresÚex_limÚbase_lims
   &&        r$   Úpow_heuristicsÚLimit.pow_heuristics·   sÌ   € Ø—i‘i‰ˆˆbØ—‘˜Ÿ™ˆBØ�v‰v�a�yŠyÜ˜œ3˜r›7�
 AÓ*ˆCÜ�s“8ˆOä�r˜bÓ!ˆÜ˜ Ó#ˆà”q—u‘uÓØœ!Ÿ*™*¤a×&8Ñ&8Ð9Ô9Ü˜B Q¥�K¨Ó/�Ü˜3“x�Ø”q×)Ñ)Ó)¨f¼¿
¹
Ó.BÜ×$Ñ$Ð$ñ /CÑ)r&   c           	     óˆ  aaaa€ V P                   w  pooo\        S4      R8X  dÅ   \        VSSRR7      p\        VSSRR7      p\        V\        4      '       dB   \        V\        4      '       d,   VP                   ^ ,          VP                   ^ ,          8X  d   V # W48X  d   V# VP
                  '       d#   VP
                  '       d   \        P                  # \        RV: RV: 24      hS\        P                  J d   \        R4      hSP
                  '       dI   \        S4      pV\        V4      ,          pVP                  SVS,          4      pRo\        P                  oVP                  RR	4      '       d7   VP                  ! R/ VB pSP                  ! R/ VB oSP                  ! R/ VB oVS8X  d   S# VP!                  S4      '       g   V# S\        P"                  J d   \        P"                  # VP                   ! \%         '       d   V # VP&                  '       d4   \)        \        VP*                  SS4      .VP                   R
,          O5!  # \        P,                  p\        S4      R8X  d   \        P.                  pM \        S4      R8X  d   \        P0                  pVVVV3R loVP!                  \2        4      '       d   ^ RIHp V! V4      pS! V4      pVP9                  SS4      '       d÷   S\        P                  J d   VP                  S^S,          4      pV) pMVP                  SSS,           4      p VP;                  SVR7      w  r‰V	^ 8”  d   \        P,                  # V	^ 8X  d   V# V^8X  g   \=        V	4      ^,          '       g!   \        P                  \        V4      ,          # VR8X  d!   \        P>                  \        V4      ,          # \        P                  # S\        P                  J dj   VP@                  '       d   \C        V4      p\E        RSPF                  SPH                  SPJ                  R7      p
VP                  S^V
,          4      pV) pT
pMVP                  SSS,           4      pSp VP;                  WµR7      w  r‰\        V\L        4      '       d   V	\        P,                  8X  d   V# VP!                  \        P                  \        P>                  \        P                  \        P"                  4      '       d   V # VP!                  V4      '       gß   V	PF                  '       d   \        P,                  # V	^ 8X  d   V# V	PH                  '       d�   V^8X  d!   \        P                  \        V4      ,          # VR8X  dR   \        P>                  \        V4      ,          \        P0                  \        P.                  V	,           ,          ,          # \        P                  # \        RV	,          4      h SPb                  '       d   TPe                  \f        \h        4      pRp \_        TSSS4      pT\        P"                  J g   T\        P"                  J d   \O        4       h T#   \         d     EL¤i ; i  \        \        \N        3 dá    ^ RI(H)p T! T4      pTPT                  '       d   T PW                  T4      pTe   Tu #  TPY                  YµR7      pY‡8w  dm   TP!                  \Z        4      '       g&   TP!                  \        P\                  4      '       d-   \_        Y‹^ \a        T4      PH                  '       d   RMR4      u #  EL[  \        \        \N        3 d      ELui ; ii ; i  \N        \        3 d     Te   h \k        TSSS4      pTf   T u #  T# i ; i)a  Evaluates the limit.

Parameters
==========

deep : bool, optional (default: True)
    Invoke the ``doit`` method of the expressions involved before
    taking the limit.

hints : optional keyword arguments
    To be passed to ``doit`` methods; only used if deep is True.
rU   r(   )r#   rS   z1The limit does not exist since left hand limit = z and right hand limit = z.Limits at complex infinity are not implementedr   T:rj   NNc                 óÂ  <€ V P                   '       g   V # \        ;QJ d!    . V3R  lV P                    4       F  NK  	  5M! V3R  lV P                    4       4      pWP                   8w  d   V P                  ! V!  p \        V \        4      p\        V \
        4      p\        V \        4      pV'       g   V'       g
   V'       Ed    \        V P                   ^ ,          SS	S4      pVP                  '       d'   \        ^V P                   ^ ,          ,          SS	S4      pVP                  '       dœ   V^ 8  R8X  dE   V'       d   V P                   ^ ,          ) # V'       d   \        P                  # \        P                  # V^ 8„  R8X  dD   V'       d   V P                   ^ ,          # V'       d   \        P                  # \        P                  # V # V #   \         d    T u # i ; i)c              3   ó4   <"  € T F  pS! V4      x € K  	  R # 5ir+   © )r-   r   Ú	set_signss   & €r$   r/   Ú0Limit.doit.<locals>.set_signs.<locals>.<genexpr>  s   øé € Ð@±i¨s™I cŸN˜N³iùs   ƒT)r:   Útupler@   r,   r   r   r   r%   Úis_zeroÚis_extended_realr   ÚNegativeOneÚPirl   r4   rX   )
ÚexprÚnewargsÚabs_flagÚarg_flagÚ	sign_flagÚsigr#   rz   r!   r"   s
   &     €€€€r$   rz   ÚLimit.doit.<locals>.set_signs  sd  ø€ Ø—9—9�9Ø�ß”eÔ@°d·i²iÓ@—e‘eÔ@°d·i²iÓ@Ó@ˆGØŸ)™)Ô#Ø—y’y 'Ñ*�Ü! $¬Ó,ˆHÜ! $¬Ó,ˆHÜ" 4¬Ó.ˆIßŸ9¯¨ðDÜ §	¡	¨!¥¨a°°SÓ9�CØ—{—{�{Ü# A d§i¡i°¥l¥N°A°r¸3Ó?˜ð ×+×+Ð+Ø !™G¨Ô,ß5= T§Y¡Y¨q¥\ Mð Jß5>¤A§M¡MðJÜDEÇDÁDðJà! A™g¨$Ô.ß4< D§I¡I¨a¥Lð Dß-6¤A§E¡EðDÜ<=¿F¹FðDàˆK�4ˆKøô +ô  Ø’Kð ús   ÃAG ÇGÇG)Ú	nsimplify)Úcdirr!   )ÚpositiveÚnegativeÚrealzNot sure of sign of %s)ÚpowsimpNry   éÿÿÿÿ)6r:   rY   r%   r,   r   Úis_infiniter   rm   r\   rX   r   Úabsr3   r2   Úgetr   r;   r>   r   Úis_Orderr   r�   r4   rl   r   r   r9   rˆ   Úis_meromorphicÚleadtermÚintrW   r5   r   r   Úis_positiveÚis_negativeÚis_realr   r	   Úsympy.simplify.powsimpr�   r7   rt   Úas_leading_termr   ÚExp1r   r   Úis_extended_nonnegativeÚrewriter   r   r=   )rf   Úhintsr    rG   rI   r‰   rˆ   ÚneweÚcoeffÚexÚdummyÚnewzr�   r#   rz   r!   r"   s   &,           @@@@r$   r   Ú
Limit.doitÉ   sø  û€ ð Ÿ	™	‰ˆˆ1ˆb�#äˆs‹8�tÔÜ�a˜˜B CÔ(ˆAÜ�a˜˜B CÔ(ˆAÜ˜!œU×#Ò#¬
°1´e×(<Ò(<Ø—6‘6˜!•9 §¡ q¥	Ô)Ø�KØŒvØ�Ø�}�}ˆ} §§ Ü×(Ñ(Ð(Ýã !¢1ð&ó 'ð 'ð ”×"Ñ"Ó"Ü%ð 'Có Dð Dð �>�>ˆ>Ü˜“8ˆDØœ˜D›	•>ˆDØ—‘�q˜$˜q�&Ó!ˆAØˆCÜ—‘ˆBà�9‰9�V˜T×"Ò"Ø—’‘˜‘ˆAØ—’‘˜‘ˆAØ—’Ñ!˜5Ñ!ˆBà�Œ6ØˆIà�u‰u�Q�xŠxØˆHà”—‘‹;Ü—5‘5ˆLà�5Š5”(×ØˆKà�:�:ˆ:Üœ˜qŸv™v q¨"Ó-Ð;°·±°rµ
Ó;Ð;ä�v‰vˆÜˆs‹8�sŒ?Ü—5‘5‰DÜ�‹X˜Œ_Ü—=‘=ˆD÷	ð 	ð4 �5‰5”�<Š<õ
 :Ù˜!“ˆAÙ�a‹Lˆð ×Ñ˜A˜r×"Ò"Ø”Q—Z‘ZÓØ—v‘v˜a  1¥“~�à�u‘à—v‘v˜a  R¥Ó(�ð-Ø ŸM™M¨!°$˜MÓ7‘	�ð ˜”6ÜŸ6™6�MØ˜1”WØ �LØ˜1”9¤C¨£G¨a§K¤KÜŸ:™:¤d¨5£kÕ1Ð1Ø˜R”ZÜ×-Ñ-¬d°5«kÕ9Ð9ä×,Ñ,Ð,à”—‘ÓØ�x�xˆxÜ  “O�Ü˜#¨¯©ÀÇÁÐTU×T]ÑT]Ô^ˆEØ—6‘6˜!˜Q˜u�WÓ%ˆDà�5ˆDØ‰Dà—6‘6˜!˜Q �VÓ$ˆDØˆDð"	MØŸ™ d˜Ó6‰IˆEô  ˜%¤×-Ò-°"¼¿¹´,Ø�Ø�y‰yœŸ™¤Q×%7Ñ%7¼×9JÑ9JÌAÏEÉE×RÒRØ�Ø—9‘9˜T—?’?Ø—>—>�>ÜŸ6™6�MØ˜1”WØ �LØ—^—^�^Ø˜q”yÜ Ÿz™z¬$¨u«+Õ5Ð5Ø œÜ ×1Ñ1´$°u³+Õ=¼a¿m¹mÌaÏeÉeÐVXÍjÕ>YÕYÐYä ×0Ñ0Ð0ä-Ð.FÈÕ.KÓLÐLð #ð& ×%×%Ð%Ø—	‘	œ)¤UÓ+ˆAàˆð		Ü�q˜!˜R Ó%ˆAØ”A—E‘E‹z˜Q¤!§%¡%›ZÜ“kÐ!ð (ð ˆøôc ô Úðûô6 Ô/´Ð;ô 	å6Ù˜“
ˆAØ�x�xˆxØ×'Ñ'¨Ó*�Ø’=Ø’HðØ×,Ñ,¨TÐ,Ó=�Ø”= e§i¡i´§n¢n¸¿	¹	Ä!Ç&Á&×8IÒ8IÜ! %¨q¼¸D»×9M×9MÐ9M±#ÐSVÓWÒWûÜÔ 3´YÐ?ô Ûðúð	ûô^ œ:Ð&ô 	ØŠ}ØÜ˜1˜a  SÓ)ˆAØŠyØ’ð ð ˆð	úsg   ÍZ Ò	Z ÙA ^ ÚZÚZÚ5^Û^Û(2]/Ü$]/Ý )]/Ý)^Ý/^
Þ^Þ	^
Þ
^Þ*_ß _ry   N©r(   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r]   Úpropertyrc   rt   r   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r$   r   r   „   s4   ø‡ € ñôð6 ñó ðò%÷$Að Ar&   r   Nr¥   )(Ú!sympy.calculus.accumulationboundsr   Ú
sympy.corer   r   r   r   r   r	   r
   Úsympy.core.exprtoolsr   Úsympy.core.numbersr   r   Úsympy.core.functionr   Úsympy.core.symbolr   Ú(sympy.functions.combinatorial.factorialsr   Ú$sympy.functions.elementary.complexesr   r   r   r   Ú&sympy.functions.elementary.exponentialr   r   Ú'sympy.functions.special.gamma_functionsr   Úsympy.polysr   r   Úsympy.series.orderr   r   r%   r=   r   ry   r&   r$   Ú<module>r»      sO   ðÝ 9ß D× DÑ DÝ -ß .Ý ,Ý #Ý >ß EÓ Eß =Ý 9ß /Ý $Ý ô31òl<ô~FˆDö Fr&   