+
    ir                       ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHtHtHtHtHtHt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* ^ RI+H,t,H-t-H.t.H/t/H0t0 ^ RI1H2t2 ^ RI3H4t4H5t5 ^ RI6H7t7  ! R R]4      t8 ! R R]84      t9 ! R R]4      t: ! R R]8]:R7      t;R t< ! R R]4      t= ! R  R!]4      t>]R" 4       t?R## )$    )annotations)product)Add)cacheit)Expr)DefinedFunctionArgumentIndexError
expand_log
expand_mulFunctionClass	PoleErrorexpand_multinomialexpand_complex)	fuzzy_and	fuzzy_notfuzzy_or)Mul)IntegerRationalpiI)global_parameters)Pow)S)WildDummy)sympify)	factorial)arg
unpolarifyimreAbs)sqrt)multiplicityperfect_power)	factorintc                      ] tR t^#tRt]P                  3t]R 4       t	RR l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# )ExpBaseTc                	.    V P                   P                  # N)expkindselfs   &چ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/functions/elementary/exponential.pyr-   ExpBase.kind(   s    xx}}    c                    \         # )z-
Returns the inverse function of ``exp(x)``.
logr/   argindexs   &&r0   inverseExpBase.inverse,   	     
r2   c                H   V P                   '       g   V \        P                  3# V P                  pVP                  pV'       g$   V) P                  '       g   VP                  4       pV'       d#   \        P                  V P                  V) 4      3# V \        P                  3# )z
Returns this with a positive exponent as a 2-tuple (a fraction).

Examples
========

>>> from sympy import exp
>>> from sympy.abc import x
>>> exp(-x).as_numer_denom()
(1, exp(x))
>>> exp(x).as_numer_denom()
(exp(x), 1)
)is_commutativer   Oner,   is_negativecould_extract_minus_signfunc)r/   r,   neg_exps   &  r0   as_numer_denomExpBase.as_numer_denom2   sx      """;hh//111224G55$))SD/))QUU{r2   c                (    V P                   ^ ,          # )z'
Returns the exponent of the function.
)argsr.   s   &r0   r,   ExpBase.expL   s    
 yy|r2   c                J    V P                  ^4      \        V P                  !  3# )z'
Returns the 2-tuple (base, exponent).
)r@   r   rE   r.   s   &r0   as_base_expExpBase.as_base_expS   s     yy|S$))_,,r2   c                	T    V P                  V P                  P                  4       4      # r+   )r@   r,   adjointr.   s   &r0   _eval_adjointExpBase._eval_adjointY   s    yy))+,,r2   c                	T    V P                  V P                  P                  4       4      # r+   )r@   r,   	conjugater.   s   &r0   _eval_conjugateExpBase._eval_conjugate\       yy++-..r2   c                	T    V P                  V P                  P                  4       4      # r+   )r@   r,   	transposer.   s   &r0   _eval_transposeExpBase._eval_transpose_   rR   r2   c                	    V P                   pVP                  '       d)   VP                  '       d   R # VP                  '       d   R# VP                  '       d   R # R# TFN)r,   is_infiniteis_extended_negativeis_extended_positive	is_finiter/   r   s   & r0   _eval_is_finiteExpBase._eval_is_finiteb   sC    hh???''''''=== r2   c                	*   V P                   ! V P                  !  pVP                   V P                   8X  dT   VP                  P                  pV'       d   R # VP                  P                  '       d   \        V4      '       d   R# R# R# VP                  # rX   )r@   rE   r,   is_zerois_rationalr   )r/   szs   &  r0   _eval_is_rationalExpBase._eval_is_rationall   sf    IItyy!66TYYA"""y|| (4" == r2   c                	:    V P                   \        P                  J # r+   )r,   r   NegativeInfinityr.   s   &r0   _eval_is_zeroExpBase._eval_is_zerow   s    xx1----r2   c                j    V P                  4       w  r#\        P                  ! \        W#RR7      V4      # )z;exp(arg)**e -> exp(arg*e) if assumptions allow it.
        Fevaluate)rH   r   _eval_power)r/   otherbes   &&  r0   rn   ExpBase._eval_powerz   s,     !s1%8%@@r2   c                	  a  ^ RI Hp ^ RIHp S P                  ^ ,          pVP
                  '       d=   VP                  '       d+   \        P                  ! V 3R lVP                   4       4      # \        WC4      '       d@   VP                  '       d.   V! S P                  VP                  4      .VP                  O5!  # S P                  V4      # )r   )Product)Sumc              3  F   <"   T F  pSP                  V4      x  K  	  R # 5ir+   )r@   ).0xr/   s   & r0   	<genexpr>1ExpBase._eval_expand_power_exp.<locals>.<genexpr>   s     ?h		!hs   !)sympy.concrete.productsrt   sympy.concrete.summationsru   rE   is_Addr<   r   fromiter
isinstancer@   functionlimits)r/   hintsrt   ru   r   s   f,   r0   _eval_expand_power_expExpBase._eval_expand_power_exp   s    31iil:::#,,,<<?chh???!!c&8&8&8499S\\2@SZZ@@yy~r2    N   )__name__
__module____qualname____firstlineno__
unbranchedr   ComplexInfinity_singularitiespropertyr-   r8   rB   r,   rH   rL   rP   rU   r^   re   ri   rn   r   __static_attributes__r   r2   r0   r)   r)   #   ss    J'')N 4  --//	!.Ar2   r)   c                  @    ] tR t^tRtRtRtR tR tR t	R t
R tR	tR
# )	exp_polara  
Represent a *polar number* (see g-function Sphinx documentation).

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

``exp_polar`` represents the function
`Exp: \mathbb{C} \rightarrow \mathcal{S}`, sending the complex number
`z = a + bi` to the polar number `r = exp(a), \theta = b`. It is one of
the main functions to construct polar numbers.

Examples
========

>>> from sympy import exp_polar, pi, I, exp

The main difference is that polar numbers do not "wrap around" at `2 \pi`:

>>> exp(2*pi*I)
1
>>> exp_polar(2*pi*I)
exp_polar(2*I*pi)

apart from that they behave mostly like classical complex numbers:

>>> exp_polar(2)*exp_polar(3)
exp_polar(5)

See Also
========

sympy.simplify.powsimp.powsimp
polar_lift
periodic_argument
principal_branch
TFc                	L    \        \        V P                  ^ ,          4      4      # r   )r,   r"   rE   r.   s   &r0   	_eval_Absexp_polar._eval_Abs   s    2diil#$$r2   c                J   \        V P                  ^ ,          4      p V\        ) 8*  ;'       g
    V\        8  pV'       d   V # \	        V P                  ^ ,          4      P                  V4      pV^ 8  d   \        V4      ^ 8  d   \        V4      # V#   \         d    Rp Lhi ; i)z-Careful! any evalf of polar numbers is flaky T)r!   rE   r   	TypeErrorr,   _eval_evalfr"   )r/   precibadress   &&   r0   r   exp_polar._eval_evalf   s    tyy|	8%%q2vC K$))A,++D1q5RWq[c7N
  	C	s   B 
B B"!B"c                	T    V P                  V P                  ^ ,          V,          4      # r   )r@   rE   )r/   ro   s   &&r0   rn   exp_polar._eval_power   s    yy1e+,,r2   c                	P    V P                   ^ ,          P                  '       d   R# R# r   TN)rE   is_extended_realr.   s   &r0   _eval_is_extended_real exp_polar._eval_is_extended_real   s    99Q<((( )r2   c                	    V P                   ^ ,          ^ 8X  d   V \        P                  3# \        P	                  V 4      # r   )rE   r   r=   r)   rH   r.   s   &r0   rH   exp_polar.as_base_exp   s1    99Q<1;""4((r2   r   N)r   r   r   r   __doc__is_polaris_comparabler   r   rn   r   rH   r   r   r2   r0   r   r      s-    #J HM%-)r2   r   c                      ] tR t^tR tRtR# )ExpMetac                	    \         VP                  P                  9   d   R # \        V\        4      ;'       d    VP
                  \        P                  J # T)r,   	__class____mro__r   r   baser   Exp1)clsinstances   &&r0   __instancecheck__ExpMeta.__instancecheck__   s;    ($$,,,(C(DDX]]aff-DDr2   r   N)r   r   r   r   r   r   r   r2   r0   r   r      s    Er2   r   c                     a  ] tR t^tRtRR ltR t]R 4       t]	R 4       t
]]R 4       4       tRR ltV 3R ltR	 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V ;t# )r,   z
The exponential function, :math:`e^x`.

Examples
========

>>> from sympy import exp, I, pi
>>> from sympy.abc import x
>>> exp(x)
exp(x)
>>> exp(x).diff(x)
exp(x)
>>> exp(I*pi)
-1

Parameters
==========

arg : Expr

See Also
========

log
c                *    V^8X  d   V # \        W4      h)z0
Returns the first derivative of this function.
)r	   r6   s   &&r0   fdiff	exp.fdiff   s     q=K$T44r2   c                	   ^ RI HpHp V P                  ^ ,          pVP                  '       EdS   \
        \        P                  ,          pWEV) 39   d   \        P                  # VP                  ! \        \
        ,          4      pV'       d   V! VP                  ^V,          4      4      '       d   V! VP                  V4      4      '       d   \        P                  # V! VP                  V4      4      '       d   \        P                  # V! VP                  V\        P                   ,           4      4      '       d   \
        ) # V! VP                  V\        P                   ,           4      4      '       d   \
        # R# R# R# R# )r   )askQN)sympy.assumptionsr   r   rE   is_Mulr   r   InfinityNaNas_coefficientr   integerevenr=   oddNegativeOneHalf)r/   assumptionsr   r   r   Ioocoeffs   &&     r0   _eval_refineexp._eval_refine   s    ,iil:::AJJ,CSDk!uu&&r!t,Eqyy5)**166%=)) uuQUU5\** }},QVVEAFFN344 !r	QUU5166>233  4 +  r2   c                	   ^ RI Hp ^ RIHp ^ RIHp ^ RIHp \        W4      '       d   VP                  ! 4       # \        P                  '       d   \        \        P                  V4      # VP                  '       d   V\        P                   J d   \        P                   # VP"                  '       d   \        P$                  # V\        P$                  J d   \        P                  # V\        P&                  J d   \        P&                  # V\        P(                  J d   \        P*                  # EMV\        P,                  J d   \        P                   # \        V\.        4      '       d   VP0                  ^ ,          # \        W4      '       d0   V! \        VP2                  4      \        VP4                  4      4      # \        W4      '       d   VP6                  ! V 4      # VP8                  '       Ed   VP:                  ! \<        \>        ,          4      pV'       Ed	   ^V,          P@                  '       d   VPB                  '       d   \        P$                  # VPD                  '       d   \        PF                  # V\        PH                  ,           PB                  '       d   \>        ) # V\        PH                  ,           PD                  '       d   \>        # MOVPJ                  '       d>   V^,          pV^8  d
   V^,          pWv8w  d   V ! V\<        ,          \>        ,          4      # VPL                  ! 4       w  rhV\        P(                  \        P&                  39   d   VPN                  '       d   V\        P(                  J d   V) p\Q        V4      P"                  '       d%   V\        P*                  Jd   \        P                   # \Q        V4      PR                  '       d.   \U        V4      \        P*                  Jd   \        P,                  # \Q        V4      PV                  '       d   \        P*                  # R# V.Rr\X        PZ                  ! V4       Fc  pV! V4      p\        V\.        4      '       d   V
f   VP0                  ^ ,          p
K:   R# VP\                  '       d   V	P_                  V4       Kb   R# 	  V
'       d   V
\Y        V	!  ,          # R# VP`                  '       d   . p. pRpVP0                   F  pV\        P$                  J d   VP_                  V4       K*  V ! V4      p\        VV 4      '       dR   VP0                  ^ ,          V8w  d'   VP_                  VP0                  ^ ,          4       RpK  VP_                  V4       K  VP_                  V4       K  	  V'       g	   V'       d    \Y        V!  V ! \c        V!  RR7      ,          # VP"                  '       d   \        P$                  # R# )	r   AccumBounds)
MatrixBaseSetExpr
logcombineNFTrl   )2sympy.calculusr   sympy.matrices.matrixbaser   sympy.sets.setexprr   sympy.simplify.simplifyr   r   r,   r   
exp_is_powr   r   r   	is_Numberr   ra   r=   r   rh   Zeror   r5   rE   minmax
_eval_funcr   r   r   r   
is_integeris_evenis_oddr   r   is_Rationalas_coeff_Mul	is_numberr"   is_positiver!   r>   r   	make_argsr   appendr}   r   )r   r   r   r   r   r   r   ncoefftermscoeffslog_termtermterm_outadd
argchangedanewas   &&                r0   evalexp.eval  s   .8.6c&&779)))qvvs##]]]aee|uuuuvv

"zz!***vv +A%%%55LS!!88A;))s377|S\::%%>>#&&ZZZ&&r!t,EueG'''}}} uu }},!&&.111 !r	!&&.000  1&&&"QYFz!"6"9Q;// ++-LE ++QZZ88??? 2 22!&%y(((U!&&-@ uu%y,,,E!&&1H 000%y,,, vv %wHe,"4(eS))'#(::a=#'''MM$' - .68S&\)?4?ZZZCCJXX:JJqM1vdC((yy|q(

499Q<0%)


1JJt$  jCyS#Y!???;;;55L r2   c                "    \         P                  # )z/
Returns the base of the exponential function.
)r   r   r.   s   &r0   r   exp.base}  s    
 vvr2   c                    V ^ 8  d   \         P                  # V ^ 8X  d   \         P                  # \        V4      pV'       d   VR,          pVe   W1,          V ,          # W,          \	        V 4      ,          # )z:
Calculates the next term in the Taylor series expansion.
)r   r   r=   r   r   )nrx   previous_termsps   &&* r0   taylor_termexp.taylor_term  s\     q566M655LAJr"A}uqy tIaL  r2   c                   ^ RI HpHp V P                  ^ ,          P	                  4       w  rVV'       d'   VP
                  ! V3/ VB pVP
                  ! V3/ VB pV! V4      V! V4      rC\        V4      V,          \        V4      V,          3# )a  
Returns this function as a 2-tuple representing a complex number.

Examples
========

>>> from sympy import exp, I
>>> from sympy.abc import x
>>> exp(x).as_real_imag()
(exp(re(x))*cos(im(x)), exp(re(x))*sin(im(x)))
>>> exp(1).as_real_imag()
(E, 0)
>>> exp(I).as_real_imag()
(cos(1), sin(1))
>>> exp(1+I).as_real_imag()
(E*cos(1), E*sin(1))

See Also
========

sympy.functions.elementary.complexes.re
sympy.functions.elementary.complexes.im
)cossin)(sympy.functions.elementary.trigonometricr   r   rE   as_real_imagexpandr,   )r/   deepr   r   r   r"   r!   s   &&,    r0   r  exp.as_real_imag  ss    0 	F1**,4)5)B4)5)Br7CGSBSWS[))r2   c                	  < VP                   '       d1   \        VP                  \        VP                  4      ,          4      pM,V\        P
                  J d   VP                  '       d   \        p\        V\        4      '       g   V\        P
                  J d(   R  p\        P                  ! V! V 4      V! V4      V4      # V\        J d4   VP                  '       g"   W P                  P                  W4      ,          # \        SV `%  W4      # )c                    V P                   '       g   \        V \        4      '       d   \        V P	                  4       R R/ # T # )rm   F)is_Powr   r,   r   rH   )r   s   &r0   <lambda> exp._eval_subs.<locals>.<lambda>  s9    Jq#.. q}}?? 7567r2   )r  r,   r5   r   r   r   is_Functionr   r   
_eval_subs_subssuper)r/   oldnewfr   s   &&& r0   r  exp._eval_subs  s    :::cggc#((m+,CAFF]sCc33!&&=7A>>!D'1S6377#:cooos000w!#++r2   c                	"   V P                   ^ ,          P                  '       d   R# V P                   ^ ,          P                  '       dG   \        ^4      ) \        ,          V P                   ^ ,          ,          \
        ,          pVP                  # R# r   )rE   r   is_imaginaryr   r   r   r   r/   arg2s   & r0   r   exp._eval_is_extended_real  s]    99Q<(((YYq\&&&aD519tyy|+b0D<< 'r2   c                	L    R  p\        V! V P                  ^ ,          4      4      # )c              3  F   "   V P                   x  V P                  x  R # 5ir+   )
is_complexrZ   )r   s   &r0   complex_extended_negative7exp._eval_is_complex.<locals>.complex_extended_negative  s     .. ***s   !)r   rE   )r/   r  s   & r0   _eval_is_complexexp._eval_is_complex  s"    	+ 1$))A,?@@r2   c                	J   V P                   \        ,          \        ,          P                  '       d   R # \	        V P                   P
                  4      '       dJ   V P                   P                  '       d   R# V P                   \        ,          P                  '       d   R# R# R# rX   )r,   r   r   rb   r   ra   is_algebraicr.   s   &r0   _eval_is_algebraicexp._eval_is_algebraic  sg    HHrMA***TXX%%&&xx$$$((R-,,, - 'r2   c                	(   V P                   P                  '       d$   V P                  ^ ,          \        P                  J# V P                   P
                  '       d7   \        ) V P                  ^ ,          ,          \        ,          pVP                  # R# )r   N)	r,   r   rE   r   rh   r  r   r   r   r  s   & r0   _eval_is_extended_positiveexp._eval_is_extended_positive  sc    88$$$99Q<q'9'999XX"""2		!$r)D<< #r2   c                	  a ^ RI Ho ^ RIHp ^ RIHp ^ RIHp ^ RIH	p V P                  p	V	P                  ! WVR7      p
V
P                  '       d
   ^V
,           # V! V
P                  4       V^ 4      pV\        P                  J d   V! W,          V4      # V\        P                   J d   V # VP"                  '       d   \%        RV ,          4      h\&        ;QJ d)    V3R lVP(                   4       F  '       g   K   R	M	  R
M! V3R lVP(                   4       4      '       d   V # \+        R4      pTp V! V	P,                  ! WR7      V4      P/                  4       pV'       d   V^ 8  d   V! W.,          4      p\        V4      P3                  W4      p\        V4      VP5                  WV,
          4      ,          pVe   V\7        V4      /M/ pVP5                  V4      V 8X  d   V# V'       dA   V^8  d:   VV! W,
          V,          V4      W^,
          V,          ,          ,          ,          pMVV! W,
          V,          V4      ,          pVP9                  4       pV! VR	RR7      pR p\;        RV.R7      pVP=                  \        P>                  V,          \A        \        P>                  V,          4      4      pV#   \0        \$        3 d    ^ p ELxi ; i)r   )signceiling)limitOrderpowsimpr   logxCannot expand %s around 0c              3  <   <"   T F  p\        VS4      x  K  	  R # 5ir+   )r   )rw   r   r'  s   & r0   ry   $exp._eval_nseries.<locals>.<genexpr>  s     :	z#t$$	s   TFtr0  r,   r  combinec                H    V P                   ;'       d    V P                  R9   # )   )r9        )r   q)rx   s   &r0   r	  #exp._eval_nseries.<locals>.<lambda>  s    amm@@y0@@r2   w)
properties)!$sympy.functions.elementary.complexesr'  #sympy.functions.elementary.integersr)  sympy.series.limitsr*  sympy.series.orderr,  sympy.simplify.powsimpr.  r,   _eval_nseriesis_OrderremoveOr   rh   r   rY   r   anyrE   r   as_leading_termgetnNotImplementedError_taylorsubsr5   r  r   replacer   r   )r/   rx   r   r0  cdirr)  r*  r,  r.  r   
arg_seriesarg0r4  ntermscf
exp_seriesrrep	simpleratr>  r'  s   &&&&&               @r0   rE  exp._eval_nseries  s1    	>?-,2hh&&qD9
z>!Z'')1a01%%%q>!1::K74@AA3:		:333:		:::K#J	s**18!<AACB "q&QT]FV^^A.
Ijooad):;; $ 0tSVnb66#;$H"q&
)A-q1!!tQh-??A
)A-q11AHHJAD%0@	)-IIammQ&q}}a7G(HI' $Y/ 	B	s   4(J> >KKc                	    . pR p\        V4       FW  pV P                  WPP                  ^ ,          V4      pVP                  WR7      pVP	                  VP                  4       4       KY  	  \        V!  # )N)r   )ranger   rE   nseriesr   rG  r   )r/   rx   r   lgr   s   &&&   r0   rL  exp._taylor  sa    qA  IIaL!4A		!	!AHHQYY[!  Awr2   c                	   ^ RI Hp V P                  ^ ,          P                  4       P	                  WR7      pVP
                  ! V^ 4      pV\        P                  J d   \        P                  # \        Wd4      '       d6   \        V4      \        P                  8  d   \        V) 4      # \        V4      # V\        P                  J d   VP                  ! V^ 4      pVP                  RJ d   \        V4      # \        RV ,          4      h)r   r   r5  Fr1  )sympy.calculus.utilr   rE   cancelrI  rM  r   r   r   r"   r   r,   r*  rY   r   )r/   rx   r0  rO  r   r   rQ  s   &&&&   r0   _eval_as_leading_termexp._eval_as_leading_term  s    3iil!!#33A3Axx1~!%%<55Ld(( $x!&& D5z!t9155=99Q?Du$t93t<==r2   c                	    ^ RI Hp V! \        V,          \        ^,          ,           4      \        V! \        V,          4      ,          ,
          # )r   )r   )r  r   r   r   )r/   r   kwargsr   s   &&, r0   _eval_rewrite_as_sinexp._eval_rewrite_as_sin.  s-    @1S52a4< 1S3Z<//r2   c                	    ^ RI Hp V! \        V,          4      \        V! \        V,          \        ^,          ,           4      ,          ,           # )r   )r   )r  r   r   r   )r/   r   re  r   s   &&, r0   _eval_rewrite_as_cosexp._eval_rewrite_as_cos2  s.    @1S5zAc!C%"Q$,////r2   c                	p    ^ RI Hp ^V! V^,          4      ,           ^V! V^,          4      ,
          ,          # )r   )tanh)%sympy.functions.elementary.hyperbolicrl  )r/   r   re  rl  s   &&, r0   _eval_rewrite_as_tanhexp._eval_rewrite_as_tanh6  s(    >DQK!d3q5k/22r2   c                	v   ^ RI HpHp VP                  '       d   VP                  ! \
        \        ,          4      pV'       dt   VP                  '       d`   V! \
        V,          4      V! \
        V,          4      rv\        Wd4      '       g(   \        Ws4      '       g   V\        V,          ,           # R# R# R# R# R# )r   )r   r   N)	r  r   r   r   r   r   r   r   r   )r/   r   re  r   r   r   cosinesines   &&,     r0   _eval_rewrite_as_sqrtexp._eval_rewrite_as_sqrt:  sy    E:::IIbdOE"2e8}c"U(m!&..z47M7M!AdF?* 8N. )u r2   c                	\   VP                   '       d   VP                   Uu. uF9  p\        V\        4      '       g   K  \	        VP                  4      ^8X  g   K7  VNK;  	  ppV'       d<   \        V^ ,          P                  ^ ,          VP                  ! V^ ,          4      4      # R# R# u upi r   N)r   rE   r   r5   lenr   r   )r/   r   re  r   logss   &&,  r0   _eval_rewrite_as_Powexp._eval_rewrite_as_PowC  sv    :::"xxSx!:a+=A#aff+QRBRAAxDS47<<?CIId1g,>??  Ss   B)B)B)r   r   r   r   )r   r   r   r   r   r   r   classmethodr   r   r   staticmethodr   r   r  r  r   r  r!  r$  rE  rL  rb  rf  ri  rn  rs  ry  r   __classcell__r   s   @r0   r,   r,      s    45!( g gR   !  !*@, A -^>*003+@ @r2   r,   )	metaclassc                    V P                  \        RR7      w  rV^ 8X  d   VP                  '       d   W3# VP                  \        4      pV'       d(   VP                  '       d   VP                  '       d   W3# R# )a  
Try to match expr with $a + Ib$ for real $a$ and $b$.

``match_real_imag`` returns a tuple containing the real and imaginary
parts of expr or ``(None, None)`` if direct matching is not possible. Contrary
to :func:`~.re`, :func:`~.im``, and ``as_real_imag()``, this helper will not force things
by returning expressions themselves containing ``re()`` or ``im()`` and it
does not expand its argument either.

Tas_Add)NN)as_independentr   is_realr   )exprr_i_s   &  r0   match_real_imagr  J  sa       4 0FB	Qw2:::x			1	B	bjjjRZZZxr2   c                      ] tR tRt$ RtR]R&   ]P                  ]P                  3t	RR lt
RR lt]RR l4       t]]R	 4       4       tRR
 ltR tRR l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# )r5   i_  ah  
The natural logarithm function `\ln(x)` or `\log(x)`.

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

Logarithms are taken with the natural base, `e`. To get
a logarithm of a different base ``b``, use ``log(x, b)``,
which is essentially short-hand for ``log(x)/log(b)``.

``log`` represents the principal branch of the natural
logarithm. As such it has a branch cut along the negative
real axis and returns values having a complex argument in
`(-\pi, \pi]`.

Examples
========

>>> from sympy import log, sqrt, S, I
>>> log(8, 2)
3
>>> log(S(8)/3, 2)
-log(3)/log(2) + 3
>>> log(-1 + I*sqrt(3))
log(2) + 2*I*pi/3

See Also
========

exp

ztuple[Expr]rE   c                Z    V^8X  d   ^V P                   ^ ,          ,          # \        W4      h)z/
Returns the first derivative of the function.
)rE   r	   r6   s   &&r0   r   	log.fdiff  s(     q=TYYq\>!$T44r2   c                    \         # )z3
Returns `e^x`, the inverse function of `\log(x)`.
)r,   r6   s   &&r0   r8   log.inverse  r:   r2   Nc                	d   ^ RI Hp ^ RIHp \	        V4      pVe   \	        V4      pV^8X  d(   V^8X  d   \
        P                  # \
        P                  #  \        W!4      pV'       d0   V\        WV,          ,          4      \        V4      ,          ,           # \        V4      \        V4      ,          # VP                  '       d   VP                  '       d   \
        P                  # V\
        P                  J d   \
        P                  # V\
        P                   J d   \
        P                   # V\
        P"                  J d   \
        P                   # V\
        P                  J d   \
        P                  # VP$                  '       d%   VP&                  ^8X  d   V ! VP(                  4      ) # VP*                  '       dG   VP,                  \
        P                  J d)   VP.                  P0                  '       d   VP.                  # \3        V\.        4      '       d)   VP.                  P0                  '       d   VP.                  # \3        V\.        4      '       d   VP.                  P4                  '       d   \7        VP.                  4      w  rgV'       de   VP8                  '       dS   V^\:        ,          ,          pV\:        8  d   V^\:        ,          ,          pV\=        V\>        ,          RR7      ,           # EM \3        V\@        4      '       d   \C        VP.                  4      # \3        W4      '       d   VPD                  PF                  '       d0   V! \        VPD                  4      \        VPH                  4      4      # VPD                  P                  '       d+   V! \
        P"                  \        VPH                  4      4      # \
        P                  # \3        W4      '       d   VPJ                  ! V 4      # VP4                  '       dz   VPL                  '       d    \:        \>        ,          V ! V) 4      ,           # V\
        P                  J d   \
        P                  # V\
        P                  J d   \
        P                  # VP                  '       d   \
        P                  # VPN                  '       g   VPP                  ! \>        4      pVe   V\
        P                   J d   \
        P                   # V\
        P"                  J d   \
        P                   # VP$                  '       d{   VPR                  '       d4   \:        \>        ,          \
        PT                  ,          V ! V4      ,           # \:        ) \>        ,          \
        PT                  ,          V ! V) 4      ,           # VP4                  '       Ed   VPV                  '       Ed   VPX                  ! \>        RR7      w  rVPL                  '       d   VR	,          pV	R	,          p	\=        V	RR7      p	V	PY                  \>        RR7      w  rgVPQ                  \>        4      pVPZ                  '       Ed   V'       Ed   VPZ                  '       Ed   VPZ                  '       Ed   VP                  '       d   VPF                  '       d:   \:        \>        ,          \
        PT                  ,          V ! W,          4      ,           # VPL                  '       d<   \:        ) \>        ,          \
        PT                  ,          V ! W) ,          4      ,           # R# ^ RI.H/p
 Wv,          Pa                  4       pV) Pa                  4       p\c        4       pW9   dv   V
! V\e        V	4      ,          4      pVPF                  '       d!   V ! V4      \>        W,          ,          ,           # V ! V4      \>        W,          \:        ,
          ,          ,           # W9   dw   V
! V\e        V	4      ,          4      pVPF                  '       d"   V ! V4      \>        W,          ) ,          ,           # V ! V4      \>        \:        W,          ,
          ,          ,           # R# R# R# R# R# R# R#   \         d     Mi ; iT\
        P                  Jd   T ! T4      T ! T4      ,          # T ! T4      # )
r   r   r   NFr  r  T)ratsimpr   )3r   r   r   r   r   r   r   r   r%   r5   
ValueErrorr   r   ra   r=   r   r   rh   r   r   r<  r  r   r,   r   r   r   r  r   r   r   r   r   r    r   r   r   r   r>   r}   r   is_nonnegativer   r   r  r  sympy.simplifyr  ra  _log_atan_tabler#   )r   r   r   r   r   r   r  r  r   arg_r  r4  t1
atan_tablemoduluss   &&&            r0   r   log.eval  s   ..cl4=Dqy!855L,,,	 !+s3q=1CI===s8CI-- ==={{{(((vv

"zz!***zz!uuSUUaZCEE
{":::#((aff,1I1I1I77Nc3CGG$<$<$<77NS!!cgg&7&7&7$SWW-FBb&&&ad
7!B$JBJrAvE:::Y''cgg&&))ww""""3sww<SWW>>"1#5#5s377|DDuu%%>>#&&===AvSD	)))))(((uu;;;$$$ zzz&&q)E AJJ&::%a000::%&&&+++!AvU;; "sQw/#uf+=====S---,,Qu=KE   
d/D((4(8FB""1%B}}}


rzzz:::~~~!AvUZ@@ "sQw/#eck2BBB ( 7(A"B!0!2J")%#d)*;"<>>>#&w<!jm2C#CC#&w<!z}r7I2J#JJ)")%#d)*;"<>>>#&w<!
2G#GG#&w<!rJN7J2K#KK *% 8B
} .=M  166!3xD	))3xs   Aa0 a0 0a>=a>c                P   ^ RI Hp V ^ 8  d   \        P                  # \	        V4      pV ^ 8X  d   V# V'       d6   VR,          pVe)   V! V ) V,          V,          V ^,           ,          RRR7      # ^^V ^,          ,          ,
          W^,           ,          ,          V ^,           ,          # )zF
Returns the next term in the Taylor series expansion of `\log(1+x)`.
r-  Tr,   r6  r   )rD  r.  r   r   r   )r   rx   r   r.  r   s   &&*  r0   r   log.taylor_term  s     	3q566MAJ6Hr"A}ax!|q1u5D%PPAq1uIU+QU33r2   c                	   ^ RI HpHp VP                  RR4      pVP                  RR4      p\	        V P
                  4      ^8X  d&   \        V P                  ! V P
                  !  WR7      # V P
                  ^ ,          pVP                  '       d   \        V4      pRp	^p
VRJd   Vw  rzV P                  V4      p	V'       d@   \        V4      pWxP                  4       9  d!   \        R VP                  4        4       4      p	V	e	   W,          # EM'VP                  '       d0   \        VP                   4      \        VP"                  4      ,
          # VP$                  '       Ed9   . p. pVP
                   EF  pV'       g%   VP&                  '       g   VP(                  '       dm   V P                  V4      p\+        V\        4      '       d3   VP-                  V P                  V4      P.                  ! R/ VB 4       K  VP-                  V4       K  VP0                  '       dE   V P                  V) 4      pVP-                  V4       VP-                  \2        P4                  4       K  VP-                  V4       EK  	  \7        V!  \        \9        V!  4      ,           # VP:                  '       g   \+        V\<        4      '       Ed   V'       g   VP<                  P>                  '       dc   VP@                  P&                  '       gc   VP<                  ^,           P&                  '       d$   VP<                  ^,
          PB                  '       g   VP@                  P(                  '       dt   VP@                  pVP<                  pV P                  V4      p\+        V\        4      '       d#   \E        V4      VP.                  ! R/ VB ,          # \E        V4      V,          # M\\+        Wt4      '       dL   V'       g   VPF                  P&                  '       d(   V! \        VPF                  4      .VPH                  O5!  # V P                  V4      # )	r   )ru   rt   forceFfactor)r  r  Nc              3  J   "   T F  w  rV\        V4      ,          x  K  	  R # 5ir+   r4   )rw   valr   s   &  r0   ry   'log._eval_expand_log.<locals>.<genexpr>7  s      D)3s8)s   !#r   )%sympy.concreteru   rt   getrw  rE   r
   r@   
is_Integerr&   r'   keyssumitemsr   r5   r   r<  r   r   r   r   r   _eval_expand_logr>   r   r   r   r   r  r,   r   r   is_nonpositiver    r   r   )r/   r  r   ru   rt   r  r  r   r   logargr   r  nonposrx   r   rp   rq   s   &&,              r0   r  log._eval_expand_log$  s   /		'5)8U+		Nadii3$LLiil>>>c"AFE~
3cNffh&  D!'') DDF!|# "___suu:CEE
**ZZZDFXXAMMMQZZZ		!A!!S))DIIaL$A$A$JE$JKA]]]		1"AKKNMM!--0MM!$  :CL 111ZZZ:c3//111sxx7K7K7KQTQXQXYZQZQ"%''!)!;!;!;#((BSBSBSHHGGIIaLa%%%a=1+=+=+F+FFF%a=1,, CT %%0003s||,:szz::yy~r2   c                	J   ^ RI HpHpHp \	        V P
                  4      ^8X  d"   V! V P                  ! V P
                  !  3/ VB # V P                  V! V P
                  ^ ,          3/ VB 4      pVR,          '       d	   V! V4      pV! VRR7      p\        WP.VR,          R7      # )r   )r
   simplifyinversecombiner8   Tr  measure)key)r   r
   r  r  rw  rE   r@   r   )r/   re  r
   r  r  r  s   &,    r0   _eval_simplifylog._eval_simplify]  s    PPtyy>QDIItyy1<V<<yy$))A,9&9:)!$'D$T*D<VI%677r2   c                l   V P                   ^ ,          pV'       d%   V P                   ^ ,          P                  ! V3/ VB p\        V4      pWC8X  d   V \        P                  3# \        V4      pVP                  RR4      '       d$   RVR&   \        V4      P                  ! V3/ VB V3# \        V4      V3# )a9  
Returns this function as a complex coordinate.

Examples
========

>>> from sympy import I, log
>>> from sympy.abc import x
>>> log(x).as_real_imag()
(log(Abs(x)), arg(x))
>>> log(I).as_real_imag()
(0, pi/2)
>>> log(1 + I).as_real_imag()
(log(sqrt(2)), pi/4)
>>> log(I*x).as_real_imag()
(log(Abs(x)), arg(I*x))

r5   Fcomplex)rE   r  r#   r   r   r   r  r5   )r/   r  r   sargsarg_abssarg_args   &&,   r0   r  log.as_real_imagh  s    & yy|99Q<&&t5u5Dt9<t999UE""$E)M((77BBx=(**r2   c                	   V P                   ! V P                  !  pVP                   V P                   8X  d   V P                  ^ ,          ^,
          P                  '       d   R# VP                  ^ ,          P                  '       d8   \	        V P                  ^ ,          ^,
          P                  4      '       d   R# R# R# VP                  # r   TFN)r@   rE   ra   rb   r   r/   rc   s   & r0   re   log._eval_is_rational  s    IItyy!66TYY		!q )))vvay$$$DIIaL14D3M3M)N)N *O$ == r2   c                	   V P                   ! V P                  !  pVP                   V P                   8X  d   V P                  ^ ,          ^,
          P                  '       d   R# \        V P                  ^ ,          ^,
          P                  4      '       d(   V P                  ^ ,          P                  '       d   R# R# R# VP                  # r  )r@   rE   ra   r   r   r  s   & r0   r!  log._eval_is_algebraic  s    IItyy!66TYY		!q )))DIIaL1,556699Q<,,,  - 7 >>!r2   c                	<    V P                   ^ ,          P                  # r   rE   r[   r.   s   &r0   r   log._eval_is_extended_real  s    yy|000r2   c                	|    V P                   ^ ,          p\        VP                  \        VP                  4      .4      # r   )rE   r   r  r   ra   )r/   rd   s   & r0   r  log._eval_is_complex  s,    IIaL!,,	!))(<=>>r2   c                	h    V P                   ^ ,          pVP                  '       d   R# VP                  # )r   F)rE   ra   r\   r]   s   & r0   r^   log._eval_is_finite  s%    iil;;;}}r2   c                	J    V P                   ^ ,          ^,
          P                  # r   r  r.   s   &r0   r$  log._eval_is_extended_positive  s    		!q 666r2   c                	J    V P                   ^ ,          ^,
          P                  # r   )rE   ra   r.   s   &r0   ri   log._eval_is_zero  s    		!q )))r2   c                	J    V P                   ^ ,          ^,
          P                  # r   )rE   is_extended_nonnegativer.   s   &r0   _eval_is_extended_nonnegative!log._eval_is_extended_nonnegative  s    		!q 999r2   c                	`  a ^ RI Hp ^ RIHp ^ RIHp V P                  ^ ,          V8X  d   Vf   \        V4      # T# V P                  ^ ,          pV! RRR7      p	V^ 8X  d   ^pVP                  ! WV	,          4      p
\        R4      \        R4      rV
P                  WV,          ,          4      pVe   W,          W,          rV^ 8w  dx   VP                  V	4      '       ga   VP                  V	4      '       gJ   Vf   V\        V4      ,          MW,          pV\        V4      V\        V4      ,          ,
          ,          pV# R	 p V
P                  W^R
7      w  ppYT	T,          ,          ,          ^,
          P-                  4       P!                  T	ST^R7      pTP                  \.        4      '       d	   T! T4      p\1        TT4      '       d   TP3                  4       oT! TT	4      w  ppTf   \        T4      MTpTP4                  '       g   \        T4      T\        T4      ,          ,
          TT,          ,           pTpRRRRRRRRRRRRRRRRRR/	pT P6                  ! R/ TB pTP9                  4       '       gE   TP9                  4       '       d/   TP                  T) \        T4      ) 4      P6                  ! R/ TB pM+TP                  T\        T4      4      P6                  ! R/ TB pTT8X  d   T# TT! TS,          T4      ,           # T3R lp/ p\:        P<                  ! TP%                  4       4       F9  pT! TT	4      w  ppTP?                  T\(        P*                  4      T,           TT&   K;  	  \(        P@                  p/ pTpTT,          S8  d   \(        PB                  T,          ) T,          p T F;  p!TP?                  T!\(        P*                  4      T TT!,          ,          ,           TT!&   K=  	  T! TT4      pT\(        P@                  ,          pK  \        T4      T\        T4      ,          ,
          TT,          ,           pT F/  p!TTT!,          P-                  4       T	T!,          ,          ,          pK1  	  TPD                  '       d   \G        T
4      ^ 8w  d   ^ RI$H%p" \M        T
PO                  T	4      4       F!  w  p#pTPP                  '       d
   T#^8X  g   K!   M	  X#^8  dL   XPS                  T	4      w  p pTR\T        ,          \V        ,          T"! \G        T 4      ) ^ 4      ,          ,          pTP                  YT,          4      pTT! TS,          T4      ,           #   \        \        \        3 d    T
P!                  T	ST^R7      pTP"                  '       d!   S^,          oT
P!                  T	ST^R7      pK2   TP%                  4       P                  T	^R7      w  pp EL  \         d7    TP%                  4       P'                  T	^R7      \(        P*                  pp  ELi ; ii ; i)r   r+  r   )r   r4  Tpositivekr\  c                d   \         P                  \         P                  r2\        P                  ! V 4       FP  pVP                  V4      '       d/   VP                  4       w  rSWQ8w  d    V P                  V4      u # KH  W$,          pKR  	  W#3#   \         d    T \         P                  3u u # i ; ir+   )	r   r=   r   r   r   hasrH   leadtermr  )r   rx   r   r,   r  r   s   &&    r0   	coeff_exp$log._eval_nseries.<locals>.coeff_exp  s    3---::a== & 2 2 4IDy0#'==#33 ! OE . :	  * 0#'</0s   )BB/.B/r0  rO  )r   r0  rO  )rO  r  r5   mulF	power_exp
power_basemultinomialbasicr  r  c                   < / p\        W4       FR  w  r4W4,           pVS8  g   K  VP                  V\        P                  4      W,          W,          ,          ,           W%&   KT  	  V# r+   )r   r  r   r   )d1d2r   e1e2exr   s   &&    r0   r  log._eval_nseries.<locals>.mul  sP    C!"/W6!ggb!&&1BF26MACG * Jr2   	Heavisider   ),rC  r,  r   r   sympy.core.symbolr   rE   r5   rM  r   matchr  r  r  rK  r   rE  rF  rG  rI  r   r   ra  r,   r   rJ  r   r  r?   r   r   r  r=   r   r>   r!   'sympy.functions.special.delta_functionsr  	enumeratelseriesr  as_coeff_exponentr   r   )$r/   rx   r   r0  rO  r,  r   r   r   r4  rd   r  r\  rU  r  r   rp   rc   r   _dr   _reslogflagsr  r  ptermsr   co1r  r   pkr   r  r  r   s$   &&f&&                               r0   rE  log._eval_nseries  s    	-6+99Q<1!\3q63t3iil#%19DHHQQCy$s)1GGAdFO=4qAvaeeAhhquuQxx $Ac!fH!&SVaD	k))	
	F::a:3DAq !Q$Z!^##%33AA3N55::1AaAA1s1v4}}}a&1SY;&4/CDeT5%ee]E7E7TX%!H ;;**D..00--//yy$Q077C(Cyys1v.55AAt|
q!tQ''	 MM!))+.Da(GCB/#5F2J / EEcAg]]A%%a'E!IIb!&&1E"R&L@b	 RBJA!fqT{"QtV+B59##%a"g--C  ===RUaZI$QYYq\24|||qAv 3 1u11!4qr!tBwy"U)Q777hhqD&!U1a4^##S /; 	FQT:A***QOOAAO>Fyy{++AA+61 Fyy{22112=qvv11F	Fs0   U# #<X-  X-$W((<X)$X-(X))X-c                	h   V P                   ^ ,          P                  4       p\        RRR7      pV^ 8X  d   ^pVP                  WV,          4      p VP	                  WR^R7      w  rxTP                  T4      '       d=   TP                  YQT,          4      pT^ 8w  d   \        RT ,          4      h\        T4      # T\        P                  8X  d=   T\        P                  8X  d(   T\        P                  ,
          P                  YR7      # \        T4      T\        T4      ,          ,
          p
Tf   \        T4      MTpYT,          ,          p
TP                  '       d   \        T4      ^ 8w  d   ^ RIHp \#        TP%                  T4      4       F   w  rTP&                  '       d
   T^8X  g   K    M	  X^8  dK   XP)                  T4      w  rT
R\*        ,          \,        ,          T! \        T4      ) ^ 4      ,          ,          p
T
#   \
         d"    TP                  YTR7      p	\        T	4      u # i ; i)	r   r4  Tr  r  r1  r5  r  r  )rE   togetherr   rM  r  r  rI  r5   r  r   r   r=   r   r>   r!   r  r  r  r  r  r  r   r   )r/   rx   r0  rO  rQ  r4  rd   crq   r   r   r  r   r   r   r  s   &&&&            r0   rb  log._eval_as_leading_term'  s    yy|$$& #%19DIIaa 	::a:3DA 5588qD&!AAv ;t DEEq6M :!qvv+155L11!1?? !fqT{"s1v4v ===RUaZI$QYYq\2|||qAv 3 1u11!4r!tBwy"U)Q777
7  	&&q$&?Cs8O	s   H )H10H1r   r   r+   r   r   )r   r   r   r   r   __annotations__r   r   r   r   r   r8   r{  r   r|  r   r   r  r  r  re   r!  r   r  r^   r$  ri   r  rE  rb  r   r   r2   r0   r5   r5   _  s    B ffa//0N5 {L {Lz 4  4 7r	8+@!	"1?7*:r$h*r2   r5   c                     a  ] tR tRtRt]! ]P                  RRR7      ) ]P                  3t	]
RR l4       tRR ltR tR tR	 tR
 tRV 3R lltR tRtV ;t# )LambertWiT  a  
The Lambert W function $W(z)$ is defined as the inverse
function of $w \exp(w)$ [1]_.

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

In other words, the value of $W(z)$ is such that $z = W(z) \exp(W(z))$
for any complex number $z$.  The Lambert W function is a multivalued
function with infinitely many branches $W_k(z)$, indexed by
$k \in \mathbb{Z}$.  Each branch gives a different solution $w$
of the equation $z = w \exp(w)$.

The Lambert W function has two partially real branches: the
principal branch ($k = 0$) is real for real $z > -1/e$, and the
$k = -1$ branch is real for $-1/e < z < 0$. All branches except
$k = 0$ have a logarithmic singularity at $z = 0$.

Examples
========

>>> from sympy import LambertW
>>> LambertW(1.2)
0.635564016364870
>>> LambertW(1.2, -1).n()
-1.34747534407696 - 4.41624341514535*I
>>> LambertW(-1).is_real
False

References
==========

.. [1] https://en.wikipedia.org/wiki/Lambert_W_function
Frl   c                	   V\         P                  8X  d	   V ! V4      # Vf   \         P                  pVP                  '       Ed=   VP                  '       d   \         P                  # V\         P                  J d   \         P                  # VR\         P                  ,          8X  d   \         P
                  # V\        ^4      ) ^,          8X  d   \        ^4      ) # V^\        ^4      ,          8X  d   \        ^4      # V\        ) ^,          8X  d   \        \        ,          ^,          # V\        ^\         P                  ,           4      8X  d   \         P                  # V\         P                  J d   \         P                  # \        VP                  4      '       d#   VP                  '       d   \         P                  # V\         P
                  J d~   V\        ) ^,          8X  d   \        ) \        ,          ^,          # VR\         P                  ,          8X  d   \         P
                  # VR\        R4      ,          8X  d   \        ^4      ) # R # R # )Nr   r  )r   r   ra   r   r=   r   r5   r   r   r,   r   r   rh   r   )r   rx   r  s   &&&r0   r   LambertW.evaly  sv   ;q6MYA999yyyvvAFF{uuBqvvI~}}$SVGAI~AwAc!fH}1vRCEztAvCAFF
O#vvAJJzz!QYYyyy)))RCEzr"uQwbi}}$bRj
{" ! r2   c                Z   V P                   ^ ,          p\        V P                   4      ^8X  d2   V^8X  d*   \        V4      V^\        V4      ,           ,          ,          # MCV P                   ^,          pV^8X  d*   \        W#4      V^\        W#4      ,           ,          ,          # \        W4      h)z/
Return the first derivative of this function.
)rE   rw  r  r	   )r/   r7   rx   r  s   &&  r0   r   LambertW.fdiff  s     IIaLtyy>Q1}{Aq8A;$788  		!A1}~q!hqn*<'=>> 00r2   c                	x   V P                   ^ ,          p\        V P                   4      ^8X  d   \        P                  pMV P                   ^,          pVP                  '       dc   V^\        P
                  ,          ,           P                  '       d   R# V^\        P
                  ,          ,           P                  '       d   R# R# V^,           P                  '       d   VP                  '       d1   V^\        P
                  ,          ,           P                  '       d   R# VP                  '       g/   V^\        P
                  ,          ,           P                  '       d   R# R# \        VP                  4      '       d;   \        V^,           P                  4      '       d   VP                  '       d   R# R# R# R# r  )rE   rw  r   r   ra   r   r   r  r>   r  r   r   )r/   rx   r  s   &  r0   r   LambertW._eval_is_extended_real  s   IIaLtyy>QA		!A999AaffH)))ah,... /!e___}}}!ah,!;!;!;!!!a!AFF(l%B%B%B &Cqyy!!iQ&@&@!!! " 'A!r2   c                	<    V P                   ^ ,          P                  # r   )rE   r\   r.   s   &r0   r^   LambertW._eval_is_finite  s    yy|%%%r2   c                	.   V P                   ! V P                  !  pVP                   V P                   8X  dV   \        V P                  ^ ,          P                  4      '       d(   V P                  ^ ,          P                  '       d   R# R# R# VP                  # )r   FN)r@   rE   r   ra   r   r  s   & r0   r!  LambertW._eval_is_algebraic  sh    IItyy!66TYY1--..499Q<3L3L3L 4M. >>!r2   c                	   \        V P                  4      ^8X  dj   V P                  ^ ,          pVP                  ! V^ 4      P                  4       pVP                  '       g   V P                  V4      # VP                  ! V4      # R# rv  )rw  rE   rM  ra  ra   r@   rI  )r/   rx   r0  rO  r   rQ  s   &&&&  r0   rb  LambertW._eval_as_leading_term  sd    tyy>Q))A,C88Aq>((*D<<<yy&&&q)) r2   c           
     	  < \        V P                  4      ^8X  Ed6   ^ RIHp ^ RIHp V P                  ^ ,          P                  WVR7      pVP                  ! WR7      p^p	VP                  '       d   VP                  p	V! W),          4      ^8  d   \        \        ^V! W),          4      4       U
u. uFd  p
\        P                  ) V
^,
          ,          \        V
4      V
^,
          ,          ,          \        V
^,
          4      ,          Wz,          ,          NKf  	  up
!  p\!        V4      pM\        P"                  pW! W,          V4      ,           # \$        SV `M  WV4      # u up
i )r   r(  r+  r/  r5  )rw  rE   rA  r)  rC  r,  r[  rI  r  r,   r   rZ  r   r=   r   r   r   r   r  rE  )r/   rx   r   r0  rO  r)  r,  r   ltlter  rc   r   s   &&&&&       r0   rE  LambertW._eval_nseries  s   tyy>QC0))A,&&qD&9C$$Q2BCyyyffqu~";@GAEN;SU;Sa EE6QU+GAJQ,??#AE*++.62 2;SU V&q)FFuQT1~%%w$Q400Us   2A*E"c                	    V P                   ^ ,          p\        V P                   4      ^8X  d   VP                  # \        VP                  V P                   ^,          P                  .4      # r   )rE   rw  ra   r   )r/   rx   s   & r0   ri   LambertW._eval_is_zero  sK    IIaLtyy>Q99aii1)=)=>??r2   r   r   r+   r   r   )r   r   r   r   r   r   r   r   r   r   r{  r   r   r   r^   r!  rb  rE  ri   r   r}  r~  s   @r0   r  r  T  sh    !D 1662668I8IJN!# !#F1 (&"*1&@ @r2   r  c            	     
   / \        ^4      \        ^,          b^\        ^,          b\        ^^\        ^4      ,          ,
          4      \        ^,          b\        ^4      \        ^\        ^4      ,
          4      ,          ^\        ^4      ,           ,          \        ^,          b\        ^^\        ^4      ,          ,           4      \        \        ^^4      ,          b\        ^4      \        \        ^4      ^,           4      ,          R\        ^4      ,           ,          \        \        ^^4      ,          b\        ^4      ^,          \        ^,          b\        ^4      ^,
          \        ^,          b\        ^\        ^4      ,
          4      \        \        ^4      ^,           4      ,          \        ^,          b\        ^4      ^,           \        \        ^^4      ,          b\        \        ^4      ^,           4      \        ^\        ^4      ,
          4      ,          \        \        ^^4      ,          b\        ^^\        ^4      ,          ^,          ,
          4      \        ^
,          b\        ^4      ) \        ^
4      ,           ^\        \        ^4      ^,           4      ,          ,          \        ^
,          b\        ^^\        ^4      ,          ^,          ,           4      \        \        ^^
4      ,          b\        ^4      \        ^
4      ,           ^\        ^\        ^4      ,
          4      ,          ,          \        \        ^^
4      ,          b^\        ^4      ,
          \        ^,          bR\        ^4      ,           ^\        ^4      ,           ,          \        ^,          b^\        ^4      ,           \        \        ^^4      ,          ^\        ^4      ,           R\        ^4      ,           ,          \        \        ^^4      ,          /C# )r9  r   )r$   r   r   r   r2   r0   r  r    s   Qa 	
26 	QT!W_rAv	
 	Q$q47{##q47{3R!V 	QT!W_rHQN2 	Q$tAw{##rDG|4b8Aq>6I 	Q!R!V 	Q!R!V 	Qa[Da1--rAv 	Q!R(1a.( 	T!Wq[DT!W--rHQN/B 	QT!Wq !27 q'DH	T$q'A+%6!67b 	QT!Wq !2B#7  
a48	DT!W$5 56Xa_8L!" 	
DGR"W#$ 
d1g!d1g+&R%& 	
DGR(1b/)	
T!Wd1g&Xa_(<) r2   N)@
__future__r   	itertoolsr   sympy.core.addr   sympy.core.cacher   sympy.core.exprr   sympy.core.functionr   r	   r
   r   r   r   r   r   sympy.core.logicr   r   r   sympy.core.mulr   sympy.core.numbersr   r   r   r   sympy.core.parametersr   sympy.core.powerr   sympy.core.singletonr   r  r   r   sympy.core.sympifyr   (sympy.functions.combinatorial.factorialsr   r@  r   r    r!   r"   r#   (sympy.functions.elementary.miscellaneousr$   sympy.ntheoryr%   r&   sympy.ntheory.factor_r'   r)   r   r   r,   r  r5   r  r  r   r2   r0   <module>r!     s    "   $  N N N ; ;  7 7 3   " ) & > M M 9 5 +eo ePF) F)REm El@'W l@^*r/ rjX@ X@v 	 	r2   