+
    i                      ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
HtHt ^ RIHtHtHtHt ^ RIHt ^ RIHt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%H&t& ^ RI'H(t(H)t) ^ RI*H+t,H-t-H.t. ^ RI/H0t0H1t1 ^ RI2H3t3 ^ RI4H5t5H6t6H7t7 ^ RI8H9t9 ^ RI:H;t;H<t<H=t= ^ RI>H?t? ^ RI@HAtA ^ RIBHCtC ^ RIDHEtE R tF ! R R]	4      tG]R 4       tHR tIRAR R lltJ ! R  R!]G4      tK ! R" R#]G4      tL ! R$ R%]G4      tM ! R& R']G4      tN ! R( R)]G4      tO ! R* R+]O4      tP ! R, R-]O4      tQ ! R. R/]	4      tR ! R0 R1]	4      tS ! R2 R3]S4      tT ! R4 R5]S4      tU ! R6 R7]S4      tV ! R8 R9]S4      tW ! R: R;]S4      tX ! R< R=]S4      tY ! R> R?]S4      tZR@# )B    )annotations)Add)cacheit)Expr)DefinedFunctionArgumentIndexError	PoleError
expand_mul)	fuzzy_notfuzzy_or	FuzzyBool	fuzzy_and)Mod)RationalpiIntegerFloatequal_valued)NeEq)S)SymbolDummy)sympify)	factorialRisingFactorial)	bernoullieuler)argimre)logexp)floor)sqrtMinMax)	Piecewise)	cos_table	ipartfracfermat_coords)And)	factorint)symmetric_poly)numbered_symbolsc                p    \        V \        4      '       d   R# V P                  \        P                  4      # )z:Helper to extract symbolic coefficient for imaginary unit N)
isinstancer   as_coefficientr   ImaginaryUnit)r   s   &ڈ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/functions/elementary/trigonometric.py_imaginary_unit_as_coefficientr5   !   s'    #u!!!//22    c                  b    ] tR t^-tRtRt]P                  3tR t	R t
R
R ltR
R ltRR ltR	tR# )TrigonometricFunctionz(Base class for trigonometric functions. Tc                	.   V P                   ! V P                  !  pVP                   V P                   8X  dV   VP                  ^ ,          P                  '       d1   \        VP                  ^ ,          P                  4      '       d   R# R# R# VP                  # r   FN)funcargsis_rationalr   is_zeroselfss   & r4   _eval_is_rational'TrigonometricFunction._eval_is_rational3   sh    IItyy!66TYYvvay$$$166!93D3D)E)E *F$ == r6   c                	   V P                   ! V P                  !  pVP                   V P                   8X  d   \        V P                  ^ ,          P                  4      '       d&   V P                  ^ ,          P                  '       d   R# \        V P                  ^ ,          4      pVe   VP                  '       d   R# R# R# VP                  # )r   FNT)r;   r<   r   r>   is_algebraic	_pi_coeffr=   )r@   rA   pi_coeffs   &  r4   _eval_is_algebraic(TrigonometricFunction._eval_is_algebraic;   s    IItyy!66TYY1--..499Q<3L3L3L 1.H#(<(<(< )=# >>!r6   c                	h    V P                   ! RR V/VB w  r4W4\        P                  ,          ,           # )deep )as_real_imagr   r3   )r@   rK   hintsre_partim_parts   &&,  r4   _eval_expand_complex*TrigonometricFunction._eval_expand_complexF   s/    ,,@$@%@000r6   c                	   V P                   ^ ,          P                  '       de   V'       d:   RVR&   V P                   ^ ,          P                  ! V3/ VB \        P                  3# V P                   ^ ,          \        P                  3# V'       d8   V P                   ^ ,          P                  ! V3/ VB P                  4       w  r4W43# V P                   ^ ,          P                  4       w  r4W43# )r   Fcomplex)r<   is_extended_realexpandr   ZerorM   )r@   rK   rN   r!   r    s   &&,  r4   _as_real_imag#TrigonometricFunction._as_real_imagJ   s    99Q<(((#(i 		!++D:E:AFFCC		!aff--YYq\((77DDFFB x YYq\..0FBxr6   Nc                	,   \        V P                  ^ ,          4      pVf   \        VP                  4      ^ ,          pVP	                  V4      '       g   \
        P                  # W28X  d   V# W#P                  9   d   VP                  '       d,   VP                  V4      w  rEWR8X  d   V\        V4      ,          # VP                  '       dA   VP                  V4      w  reVP                  VRR7      w  rEWR8X  d   V\        V4      ,          # \        R4      h)r   F)as_Addz%Use the periodicity function instead.)r
   r<   tuplefree_symbolshasr   rW   is_Mulas_independentabsis_AddNotImplementedError)r@   general_periodsymbolfghas   &&&    r4   _periodTrigonometricFunction._periodW   s    tyy|$>1>>*1-FuuV}}66M;!!^^#xxx''/;)#a&00xxx''/''u'=;)#a&00!"IJJr6   rL   TN)__name__
__module____qualname____firstlineno____doc__
unbranchedr   ComplexInfinity_singularitiesrB   rH   rQ   rX   rj   __static_attributes__rL   r6   r4   r8   r8   -   s8    2J'')N!	"1K Kr6   r8   c                 &    ^R^R^R^R^R^(R^<R^xR/# )	   )      )rz      )r{      )r|   
   )r|      )r~   r}   )      )(   <   rL   rL   r6   r4   _table2r   q   s6     	F
F
F
G
F
G
HX	 	r6   c                R   \         P                  p. p\        P                  ! V 4       FM  pVP	                  \
        4      pV'       d   VP                  '       d   W,          pK<  VP                  V4       KO  	  V\         P                  J d   V \         P                  3# V\         P                  ,          pW,
          pVP                  '       g*   ^V,          P                  '       d.   VP                  RJ d   \        W%\
        ,          .,           !  V3# V \         P                  3# )a  
Split ARG into two parts, a "rest" and a multiple of $\pi$.
This assumes ARG to be an Add.
The multiple of $\pi$ returned in the second position is always a Rational.

Examples
========

>>> from sympy.functions.elementary.trigonometric import _peeloff_pi
>>> from sympy import pi
>>> from sympy.abc import x, y
>>> _peeloff_pi(x + pi/2)
(x, 1/2)
>>> _peeloff_pi(x + 2*pi/3 + pi*y)
(x + pi*y + pi/6, 1/2)

F)r   rW   r   	make_argscoeffr   r=   appendHalf
is_integeris_even)r   rG   
rest_termsri   Km1m2s   &      r4   _peeloff_pir      s    $ vvHJ]]3GGBKMHa    166AFF{
QVV
B	B	}}}!B$***rzzU/BZb5')+R//;r6   c               $    V ^8  d   QhRRRRRR/# )   r   r   cyclesintreturnzExpr | NonerL   )formats   "r4   __annotate__r      s&     H H4 H H[ Hr6   c                b   V \         J d   \        P                  # V '       g   \        P                  # V P                  '       EdH   V P                  \         4      pV'       Ed'   VP                  4       w  r4VP                  '       d   \        V4      ^,          pV^ 8w  do   \        \        \        V^4      P                  4       4      4      ) p^V,          pW7,          p\        V4      p	\        W4      '       d   \        W4      pW4,          pM\        \        V4      4      pW4,          pVP                  '       dL   V^,          p
V
^8X  d   V# V
'       g*   VP                   e   \        P                  # \#        ^4      # W,          # V#  R# V P$                  '       d   \        P                  # R# )a  
When arg is a Number times $\pi$ (e.g. $3\pi/2$) then return the Number
normalized to be in the range $[0, 2]$, else `None`.

When an even multiple of $\pi$ is encountered, if it is multiplying
something with known parity then the multiple is returned as 0 otherwise
as 2.

Examples
========

>>> from sympy.functions.elementary.trigonometric import _pi_coeff
>>> from sympy import pi, Dummy
>>> from sympy.abc import x
>>> _pi_coeff(3*x*pi)
3*x
>>> _pi_coeff(11*pi/7)
11/7
>>> _pi_coeff(-11*pi/7)
3/7
>>> _pi_coeff(4*pi)
0
>>> _pi_coeff(5*pi)
1
>>> _pi_coeff(5.0*pi)
1
>>> _pi_coeff(5.5*pi)
3/2
>>> _pi_coeff(2 + pi)

>>> _pi_coeff(2*Dummy(integer=True)*pi)
2
>>> _pi_coeff(2*Dummy(even=True)*pi)
0

N)r   r   OnerW   r_   r   as_coeff_Mulis_Floatra   r   roundr"   evalfr   r   r   r   r   r>   )r   r   cxcxrf   pmcmic2s   &&         r4   rF   rF      s;   J byuuvv	YYr]2??$DAzzzFQJ6U3q!9??#4566A1ABBA#A**$QNS Q(AB|||U7Hyy, vv"1:%4KI5 :  
vvr6   c                     a  ] tR t^tRtRR ltRR lt]R 4       t]	]
R 4       4       tRV 3R ll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R tR tR t Rt!V ;t"# ) sina3  
The sine function.

Returns the sine of x (measured in radians).

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

This function will evaluate automatically in the
case $x/\pi$ is some rational number [4]_.  For example,
if $x$ is a multiple of $\pi$, $\pi/2$, $\pi/3$, $\pi/4$, and $\pi/6$.

Examples
========

>>> from sympy import sin, pi
>>> from sympy.abc import x
>>> sin(x**2).diff(x)
2*x*cos(x**2)
>>> sin(1).diff(x)
0
>>> sin(pi)
0
>>> sin(pi/2)
1
>>> sin(pi/6)
1/2
>>> sin(pi/12)
-sqrt(2)/4 + sqrt(6)/4


See Also
========

csc, cos, sec, tan, cot
asin, acsc, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Trigonometric_functions
.. [2] https://dlmf.nist.gov/4.14
.. [3] https://functions.wolfram.com/ElementaryFunctions/Sin
.. [4] https://mathworld.wolfram.com/TrigonometryAngles.html

c                	<    V P                  ^\        ,          V4      # r   rj   r   r@   re   s   &&r4   period
sin.period#      ||AbD&))r6   c                	^    V^8X  d   \        V P                  ^ ,          4      # \        W4      h   )cosr<   r   r@   argindexs   &&r4   fdiff	sin.fdiff&  s'    q=tyy|$$$T44r6   c           
     	R   ^ RI Hp ^ RIHp VP                  '       du   V\
        P                  J d   \
        P                  # VP                  '       d   \
        P                  # V\
        P                  \
        P                  39   d
   V! R^4      # V\
        P                  J d   \
        P                  # \        W4      '       Ed   ^ RIHp VP                  VP                   re\#        V^\$        ,          ,          4      pV\
        P                  Jd   WW^,          \$        ,          ,
          pV\
        P                  Jd   Wg^,          \$        ,          ,
          pV! WV4      P'                  V! \$        ^,          \$        \)        ^^4      ,          4      4      \
        P*                  Jdd   V! WV4      P'                  V! \$        \)        ^^4      ,          \$        \)        ^^4      ,          4      4      \
        P*                  Jd
   V! R^4      # V! WV4      P'                  V! \$        ^,          \$        \)        ^^4      ,          4      4      \
        P*                  Jd&   V! \-        \/        V4      \/        V4      4      ^4      # V! WV4      P'                  V! \$        \)        ^^4      ,          \$        \)        ^^4      ,          4      4      \
        P*                  Jd&   V! R\1        \/        V4      \/        V4      4      4      # V! \-        \/        V4      \/        V4      4      \1        \/        V4      \/        V4      4      4      # \        W4      '       d   VP3                  V 4      # VP5                  4       '       d   V ! V) 4      ) # \7        V4      pVe$   ^ RIHp	 \
        P<                  V	! V4      ,          # \?        V4      p
V
Ee{   V
P@                  '       d   \
        P                  # ^V
,          P@                  '       d=   V
PB                  RJ d-   \
        PD                  V
\
        PF                  ,
          ,          # V
PH                  '       g   V
\$        ,          pW8w  d	   V ! V4      # R# V
PH                  '       d   V
^,          pV^8  d   V ! V^,          \$        ,          4      ) # ^V,          ^8  d   V ! ^V,
          \$        ,          4      # V
\)        ^^4      ,           ^,          \$        ,          p\K        V4      p\        V\J        4      '       g   V# V
\$        ,          V8w  d   V ! V
\$        ,          4      # R# VPL                  '       d^   \O        V4      w  rV'       dI   V\$        ,          p\/        V4      \K        V4      ,          \K        V4      \/        V4      ,          ,           # VP                  '       d   \
        P                  # \        V\P        4      '       d   VPR                  ^ ,          # \        V\T        4      '       d4   VPR                  ^ ,          pV\W        ^V^,          ,           4      ,          # \        V\X        4      '       d6   VPR                  w  rV\W        V^,          V^,          ,           4      ,          # \        V\Z        4      '       d-   VPR                  ^ ,          p\W        ^V^,          ,
          4      # \        V\\        4      '       dB   VPR                  ^ ,          p^\W        ^^V^,          ,          ,           4      V,          ,          # \        V\^        4      '       d   VPR                  ^ ,          p^V,          # \        V\`        4      '       d4   VPR                  ^ ,          p\W        ^^V^,          ,          ,
          4      # R# )r   AccumBoundsSetExpr	FiniteSetN)sinhF)1!sympy.calculus.accumulationboundsr   sympy.sets.setexprr   	is_Numberr   NaNr>   rW   InfinityNegativeInfinityrt   r1   sympy.sets.setsr   minmaxr$   r   intersectionr   EmptySetr&   r   r'   
_eval_funccould_extract_minus_signr5   %sympy.functions.elementary.hyperbolicr   r3   rF   r   r   NegativeOner   is_Rationalr   rb   r   asinr<   atanr%   atan2acosacotacscasec)clsr   r   r   r   r   r   di_coeffr   rG   nargr   resultr   ys   &&              r4   evalsin.eval,  sW   A.===aee|uuvvQ%7%788"2q))!###55Lc''1wwc1R4j!A!,,,aCFl!**$aCFl3$11)BqD"XaQR^BS2TU::&)66yHQPQNAR8Aq>)8+ ,34::>"2q))S&33IbdBxPQST~DU4VW::&"3s3xS#:A>>S&33Ib!Q>OQST\]^`aTbQb4cd zz*"2s3s8SX'>??"3s3xS#: #CHc#h 79 9%%>>#&&''))I:05B??4=00S>"""vv(
&&& ##u,==8aff+<=='''{;t9$ ###qLq5Q
O++Q37Arz?*!HQN2a7;T!&#..!MB;#%x{++:::s#DAbD1vc!f}s1vc!f}44;;;66Mc4  88A;c4  AT!ad(^##c5!!88DAT!Q$A+&&&c4  AAqD>!c4  Ad1qAv:&q())c4  AQ3Jc4  AAadF
## !r6   c                	T   V ^ 8  g   V ^,          ^ 8X  d   \         P                  # \        V4      p\        V4      ^8  d/   VR,          pV) V^,          ,          W ^,
          ,          ,          # \         P                  V ^,          ,          W,          ,          \        V 4      ,          # r   r   rW   r   lenr   r   nr   previous_termsr   s   &&* r4   taylor_termsin.taylor_term  |     q5AEQJ66M
A>"Q&"2&r!Q$wq5	**}}q!t,QT1)A,>>r6   c                	6  < V P                   ^ ,          pVe   VP                  \        V4      V4      pVP                  V^ 4      P                  \        P
                  \        P                  4      '       d   \        RV ,          4      h\        SV `%  WW4R7      # r   zCannot expand %s around 0)r   logxcdir
r<   subsr"   r^   r   r   rt   r	   super_eval_nseriesr@   r   r   r   r   r   	__class__s   &&&&& r4   r   sin._eval_nseries  w    iil((3q64(C88Aq>aeeQ%6%67774@AAw$Q$$BBr6   c                	6   ^ RI Hp \        P                  p\	        V\
        V34      '       d6   VP                  VP                  ^ ,          4      P                  \        4      p\        W,          4      \        V) V,          4      ,
          ^V,          ,          # r   )HyperbolicFunction
r   r   r   r3   r1   r8   r;   r<   rewriter#   )r@   r   kwargsr   Is   &&,  r4   _eval_rewrite_as_expsin._eval_rewrite_as_exp  sg    LOOc13EFGG((388A;'//4CCE
S#a[(1Q3//r6   c                	    \        V\        4      '       dV   \        P                  pVP                  ^ ,          pW4V) ,          ,          ^,          W4V,          ,          ^,          ,
          # R# r   Nr1   r"   r   r3   r<   r@   r   r   r   r   s   &&,  r4   _eval_rewrite_as_Powsin._eval_rewrite_as_Pow  sK    c3AAU719qAvqy((  r6   c                	@    \        V\        ^,          ,
          RR7      # r   Fevaluater   r   r@   r   r   s   &&,r4   _eval_rewrite_as_cossin._eval_rewrite_as_cos      3A:..r6   c                	~    \        \        P                  V,          4      p^V,          ^V^,          ,           ,          # r   tanr   r   r@   r   r   tan_halfs   &&, r4   _eval_rewrite_as_tansin._eval_rewrite_as_tan  s*    qvvcz?z1x{?++r6   c                	X    \        V4      \        V4      ,          \        V4      ,          # rm   r   r   r	  s   &&,r4   _eval_rewrite_as_sincossin._eval_rewrite_as_sincos      3xC S))r6   c                	   \        \        P                  V,          4      p\        ^ \	        \        \        V4      ^ 4      \        \        V\        4      ^ 4      4      3^V,          ^V^,          ,           ,          R34      # )r   T	cotr   r   r(   r,   r   r    r   r   r@   r   r   cot_halfs   &&, r4   _eval_rewrite_as_cotsin._eval_rewrite_as_cot  s^    qvvcz?!SBsGQCRL!1DEFH*a(A+o6=? 	?r6   c                	Z    V P                   ! \        3/ VB P                   ! \        3/ VB # rm   )r   r   powr	  s   &&,r4   _eval_rewrite_as_powsin._eval_rewrite_as_pow  s&    ||C*6*223A&AAr6   c                	Z    V P                   ! \        3/ VB P                   ! \        3/ VB # rm   )r   r   r%   r	  s   &&,r4   _eval_rewrite_as_sqrtsin._eval_rewrite_as_sqrt  s&    ||C*6*224B6BBr6   c                	&    ^\        V4      ,          # r   cscr	  s   &&,r4   _eval_rewrite_as_cscsin._eval_rewrite_as_csc      Szr6   c                	N    ^\        V\        ^,          ,
          RR7      ,          # )r   Fr  secr   r	  s   &&,r4   _eval_rewrite_as_secsin._eval_rewrite_as_sec  s    S2a4Z%000r6   c                	&    V\        V4      ,          # rm   )sincr	  s   &&,r4   _eval_rewrite_as_sincsin._eval_rewrite_as_sinc  s    49}r6   c                	    ^ RI Hp \        \        V,          ^,          4      V! \        P
                  V4      ,          # r   besseljsympy.functions.special.besselr9  r%   r   r   r   r@   r   r   r9  s   &&, r4   _eval_rewrite_as_besseljsin._eval_rewrite_as_besselj  s'    :BsF1H~gaffc222r6   c                	b    V P                  V P                  ^ ,          P                  4       4      # r   r;   r<   	conjugater@   s   &r4   _eval_conjugatesin._eval_conjugate  "    yy1//122r6   c                	    ^ RI HpHp V P                  ! RRV/VB w  rV\	        V4      V! V4      ,          \        V4      V! V4      ,          3# r   coshr   rK   rL   )r   rJ  r   rX   r   r   r@   rK   rN   rJ  r   r!   r    s   &&,    r4   rM   sin.as_real_imag  sD    D##777BR #b'$r("233r6   c           	     	d   ^ RI HpHp V P                  ^ ,          pRpVP                  '       d   VP                  4       w  rV\        VRR7      P                  4       p\        VRR7      P                  4       p\        VRR7      P                  4       p	\        VRR7      P                  4       p
Wz,          W,          ,           # VP                  '       d   VP                  RR7      w  rVP                  '       d   VP                  '       d=   \        P                  V^,
          ^,          ,          V! V\        V4      4      ,          # \        \        P                  V^,          ^,
          ,          \        V4      ,          V! V^,
          \        V4      4      ,          RR7      # \        V4      # )r   )
chebyshevt
chebyshevuNFr  Trational)rK   )#sympy.functions.special.polynomialsrN  rO  r<   rb   as_two_termsr   _eval_expand_trigr   r_   r   
is_Integeris_oddr   r   r
   )r@   rN   rN  rO  r   r   r   sxsyr   cyr   s   &,          r4   rT  sin._eval_expand_trig  s:   Niil:::##%DAQ'99;BQ'99;BQ'99;BQ'99;B525= ZZZ##T#2DA||| 888==AE195jCF6KKK%ammacAg&>s1v&E&0QA&?'@FKM M3xr6   c                	b   ^ RI Hp V P                  ^ ,          pVP                  V^ 4      P	                  4       pV\
        ,          pVP                  '       dA   WW\
        ,          ,
          P                  V4      p\        P                  V,          V,          # V\        P                  J d2   TP                  T^ \        V4      P                  '       d   RMRR7      pV\        P                  \        P                  39   d
   V! R^4      # VP                   '       d   V P#                  V4      # T # r   r   -+dirr   r   r   r<   r   cancelr   r   as_leading_termr   r   rt   limitr!   is_negativer   r   	is_finiter;   	r@   r   r   r   r   r   x0r   lts	   &&&&     r4   _eval_as_leading_termsin._eval_as_leading_term  s    AiilXXa^""$rE<<<"*--a0BMM1$b(("""1aBtH,@,@,@ScJB!**a0011r1%% "tyy}6$6r6   c                	P    V P                   ^ ,          P                  '       d   R# R# r   TNr<   rU   rC  s   &r4   _eval_is_extended_realsin._eval_is_extended_real      99Q<((( )r6   c                	T    V P                   ^ ,          pVP                  '       d   R# R# rm  rn  r@   r   s   & r4   _eval_is_finitesin._eval_is_finite  s#    iil  r6   c                	~    \        V P                  ^ ,          4      w  rVP                  '       d   VP                  # R# r   r   r<   r>   r   r@   restpi_mults   &  r4   _eval_is_zerosin._eval_is_zero  0    #DIIaL1<<<%%% r6   c                	    V P                   ^ ,          P                  '       g$   V P                   ^ ,          P                  '       d   R# R# rm  r<   rU   
is_complexrC  s   &r4   _eval_is_complexsin._eval_is_complex#  s2    99Q<(((99Q<*** +r6   rL   rm   r   r@  rl   )#rn   ro   rp   rq   rr   r   r   classmethodr   staticmethodr   r   r   r   r  r
  r  r  r  r"  r%  r*  r0  r4  r=  rD  rM   rT  rj  ro  rt  r{  r  rv   __classcell__r   s   @r4   r   r      s    -^*5 r$ r$h 
?  
?C0)/,*?
BC1334
27
&
 r6   r   c                     a  ] tR tRtRtRR ltRR lt]R 4       t]	]
R 4       4       tRV 3R ll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R tR R ltR tR tR tR tR tR tRt V ;t!# )!r   i)  a  
The cosine function.

Returns the cosine of x (measured in radians).

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

See :func:`sin` for notes about automatic evaluation.

Examples
========

>>> from sympy import cos, pi
>>> from sympy.abc import x
>>> cos(x**2).diff(x)
-2*x*sin(x**2)
>>> cos(1).diff(x)
0
>>> cos(pi)
-1
>>> cos(pi/2)
0
>>> cos(2*pi/3)
-1/2
>>> cos(pi/12)
sqrt(2)/4 + sqrt(6)/4

See Also
========

sin, csc, sec, tan, cot
asin, acsc, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Trigonometric_functions
.. [2] https://dlmf.nist.gov/4.14
.. [3] https://functions.wolfram.com/ElementaryFunctions/Cos

c                	<    V P                  ^\        ,          V4      # r   r   r   s   &&r4   r   
cos.periodU  r   r6   c                	`    V^8X  d   \        V P                  ^ ,          4      ) # \        W4      hr   )r   r<   r   r   s   &&r4   r   	cos.fdiffX  s*    q=		!%%%$T44r6   c                	B   ^ RI Hp ^ RIHp ^ RIHp VP                  '       du   V\        P                  J d   \        P                  # VP                  '       d   \        P                  # V\        P                  \        P                  39   d
   V! R^4      # V\        P                  J d   \        P                  # \        W4      '       d   \        V\         ^,          ,           4      # \        W4      '       d   VP#                  V 4      # VP$                  '       d   VP&                  RJ d
   V! R^4      # VP)                  4       '       d
   V ! V) 4      # \+        V4      pVe   ^ RIHp V! V4      # \1        V4      pVEe   VP2                  '       d   \        P4                  V,          # ^V,          P2                  '       d!   VP6                  RJ d   \        P8                  # VP:                  '       g   V\         ,          pW8w  d	   V ! V4      # R# VP:                  '       Ed   VP<                  p	VP>                  ^V	,          ,          p
W8  d   V^,
          \         ,          pV ! V4      ) # ^V
,          V	8  d   ^V,
          \         ,          pV ! V4      ) # \A        4       pW9   d   W,          w  rV
\         ,          V,          V
\         ,          V,          rV ! V4      V ! V4      rRW39   d   R# W,          V ! \         ^,          V,
          4      V ! \         ^,          V,
          4      ,          ,           # V	^8  d   R# ^\        PB                  ^\E        ^4      ^,           ^,          /pV	V9   d5   VVP<                  ,          pV! VP>                  V4      PG                  4       # ^ V	^,          8X  d   V^,          \         ,          pV ! V4      pRV8X  d   R# ^V,          ^,           ^,          pRV^ 8  d   RM^\I        \K        V4      4      ,          ,          pV\E        ^V,           ^,          4      ,          # R# VPL                  '       d_   \O        V4      w  ppV'       dI   V\         ,          p\Q        V4      \Q        V4      ,          \        V4      \        V4      ,          ,
          # VP                  '       d   \        P                  # \        V\R        4      '       d   VPT                  ^ ,          # \        V\V        4      '       d4   VPT                  ^ ,          p^\E        ^V^,          ,           4      ,          # \        V\X        4      '       d7   VPT                  w  ppV\E        V^,          V^,          ,           4      ,          # \        V\Z        4      '       d-   VPT                  ^ ,          p\E        ^V^,          ,
          4      # \        V\\        4      '       d;   VPT                  ^ ,          p^\E        ^^V^,          ,          ,           4      ,          # \        V\^        4      '       d4   VPT                  ^ ,          p\E        ^^V^,          ,          ,
          4      # \        V\`        4      '       d   VPT                  ^ ,          p^V,          # R# )r   rN  r   r   FN)rJ  r   )1rR  rN  r   r   r   r   r   r   r   r>   r   r   r   rt   r1   r   r   r   rU   rf  r   r5   r   rJ  rF   r   r   r   rW   r   qr   r   r   r%   rV   r   ra   rb   r   r   r   r<   r   r   r   r   r   r   )r   r   rN  r   r   r   rJ  rG   r   r  r   table2ri   bnvalanvalbcst_table_somectsnvalr   sign_cosr   r   s   &&                     r4   r   cos.eval^  s   BA.===aee|uuuuQ%7%788
 #2q))!###55Lc''sRTz?"%%>>#&&CMMU$:r1%%''))t905B= S>"""00(
&&& ##u,66M'''{;t9$ ###JJJJ!A#&5$qL",DI:%Q37L",DI:% !;!9DAR461R46q#&q63q65~-# ;RTAXs2a4!8})DDDr6 qvvQ!q(" &(4C%hjj#6==??A:$QJ?Dt9Dt|#8a*A "QUr3s1v;&FGH#D1t8Q,$888:::s#DAqbD1vc!f}s1vc!f}44;;;55Lc4  88A;c4  AT!ad(^##c5!!88DAqT!Q$A+&&&c4  AAF
##c4  AT!a1f*%%%c4  AAadF
##c4  AQ3J !r6   c                	T   V ^ 8  g   V ^,          ^8X  d   \         P                  # \        V4      p\        V4      ^8  d/   VR,          pV) V^,          ,          W ^,
          ,          ,          # \         P                  V ^,          ,          W,          ,          \        V 4      ,          # r   r   r   s   &&* r4   r   cos.taylor_term  r   r6   c                	6  < V P                   ^ ,          pVe   VP                  \        V4      V4      pVP                  V^ 4      P                  \        P
                  \        P                  4      '       d   \        RV ,          4      h\        SV `%  WW4R7      # r   r   r   s   &&&&& r4   r   cos._eval_nseries  r   r6   c                	,   \         P                  p^ RIHp \	        V\
        V34      '       d8   VP                  VP                  ^ ,          4      P                  ! \        3/ VB p\        W,          4      \        V) V,          4      ,           ^,          # r   
r   r3   r   r   r1   r8   r;   r<   r   r#   )r@   r   r   r   r   s   &&,  r4   r   cos._eval_rewrite_as_exp   sh    OOLc13EFGG((388A;'//>v>CCE
S#a[(!++r6   c                	    \        V\        4      '       dH   \        P                  pVP                  ^ ,          pWC,          ^,          WC) ,          ^,          ,           # R# r   r   r  s   &&,  r4   r  cos._eval_rewrite_as_Pow  sC    c3AA46ArE!G##  r6   c                	@    \        V\        ^,          ,           RR7      # r  )r   r   r	  s   &&,r4   _eval_rewrite_as_sincos._eval_rewrite_as_sin  r  r6   c                	~    \        \        P                  V,          4      ^,          p^V,
          ^V,           ,          # r   r  r  s   &&, r4   r  cos._eval_rewrite_as_tan  s+    qvvcz?A%Hq8|,,r6   c                	X    \        V4      \        V4      ,          \        V4      ,          # rm   r  r	  s   &&,r4   r  cos._eval_rewrite_as_sincos  r  r6   c                	   \        \        P                  V,          4      ^,          p\        ^\	        \        \        V4      ^ 4      \        \        V^\        ,          4      ^ 4      4      3V^,
          V^,           ,          R34      # r   Tr  r  s   &&, r4   r  cos._eval_rewrite_as_cot  se    qvvcz?A%!SBsGQCQrTNA1FGH#a<(Q,7>@ 	@r6   c                	(    V P                   ! V3/ VB # rm   r%  r	  s   &&,r4   r"  cos._eval_rewrite_as_pow  s    ))#888r6   c                   V ^8  d   QhRR/# )r   r   r   rL   )r   s   "r4   r   cos.__annotate__  s     ), ), ),r6   c                	  a ^ RI Hp \        V4      oSf   R# \        S\        4      '       d   R# \        S\
        4      '       g   R# \        4       pSP                  V9   dM   V! SP                  VSP                  ,          ! 4       4      pSP                  R8  d   VP                  4       pV# SP                  ^,          '       g   S^,          p\        V\        ,          4      P                  ! \        3/ VB pV^,           ^,          p\        V4      ^,          '       d   RM^p	V	\        ^V,           ^,          4      ,          # \        SP                  4      p
V
'       d   T
pM<\!        SP                  4      P#                  4        UUu. uF  w  rW,          NK  	  ppp\%        V!  pV3R l\'        W4       4       p\'        V\)        R4      4       Uu. uF  q^,          V^ ,          \        ,          3NK!  	  pp\        \+        R V 4       4      4      P-                  4       P/                  V4      pV
'       d   \1        V
4      ^8X  d   V# VP                  ! \        3/ VB # u uppi u upi )r   r  Ni  c              3  `   <"   T F#  w  rSP                   \        W4      ,          x  K%  	  R # 5irm   )r   r   ).0r   r   rG   s   &  r4   	<genexpr>,cos._eval_rewrite_as_sqrt.<locals>.<genexpr>B  s%     M:L$!(**x~--:Ls   +.zc              3  2   "   T F  q^ ,          x  K  	  R# 5ir   rL   )r  r   s   & r4   r  r  D  s     'QttQs   r   )rR  rN  rF   r1   r   r   r)   r  r   rV   r   r   r   r%   r   r+   r-   itemsr*   zipr/   sumrT  r   r   )r@   r   r   rN  r  rvpico2r  r   r  FCdenomsr  eapartdecompXpclsrG   s   &&,               @r4   r%  cos._eval_rewrite_as_sqrt  s   BS>h(((H--"::'HJJxzz(B(DEBzzCYY[IzzA~~qLEurz?**4:6:DaA VaZZrQHdAH>2228::&F'0'<'B'B'DE'Dtqadd'DFE6"M#e:LM&)&2B32G&HI&HdAaDG_&HI3'Q''(::<AA!DSW\K||D+F++ F Js   I*%I0c                	&    ^\        V4      ,          # r   r/  r	  s   &&,r4   r0  cos._eval_rewrite_as_secJ  r,  r6   c                	P    ^\        V4      P                  ! \        3/ VB ,          # r   )r/  r   r)  r	  s   &&,r4   r*  cos._eval_rewrite_as_cscM  !    S!!#0000r6   c                	    ^ RI Hp \        \        \        V,          ^,          4      V! \
        P                  ) V4      ,          \        V^ 4      3R4      # r   r8  )r   Tr;  r9  r(   r%   r   r   r   r   r<  s   &&, r4   r=  cos._eval_rewrite_as_besseljP  sA    :bfQh 55r#qzB 	r6   c                	b    V P                  V P                  ^ ,          P                  4       4      # r@  rA  rC  s   &r4   rD  cos._eval_conjugateW  rF  r6   c                	    ^ RI HpHp V P                  ! RRV/VB w  rV\	        V4      V! V4      ,          \        V4      ) V! V4      ,          3# rH  )r   rJ  r   rX   r   r   rK  s   &&,    r4   rM   cos.as_real_imagZ  sF    D##777BR 3r7(48"344r6   c                	,   ^ RI Hp V P                  ^ ,          pRpVP                  '       d   VP	                  4       w  rE\        VRR7      P                  4       p\        VRR7      P                  4       p\        VRR7      P                  4       p\        VRR7      P                  4       p	W,          Wg,          ,
          # VP                  '       d9   VP                  RR7      w  rV
P                  '       d   V! V
\        V4      4      # \        V4      # )r   r  NFr  TrP  )rR  rN  r<   rb   rS  r   rT  r   r_   r   rU  )r@   rN   rN  r   r   r   rW  rX  r   rY  r   termss   &,          r4   rT  cos._eval_expand_trig_  s    Biil:::##%DAQ'99;BQ'99;BQ'99;BQ'99;B525= ZZZ++T+:LE!%U443xr6   c                	   ^ RI Hp V P                  ^ ,          pVP                  V^ 4      P	                  4       pV\
        ^,          ,           \
        ,          pVP                  '       dS   WW\
        ,          ,
          \
        ^,          ,           P                  V4      p\        P                  V,          V,          # V\        P                  J d2   TP                  T^ \        V4      P                  '       d   RMRR7      pV\        P                  \        P                  39   d
   V! R^4      # VP                   '       d   V P#                  V4      # T # r\  ra  rg  s	   &&&&     r4   rj  cos._eval_as_leading_termp  s    AiilXXa^""$"Q$YN<<<"*r!t#44Q7BMM1$b(("""1aBtH,@,@,@ScJB!**a0011r1%% "tyy}6$6r6   c                	P    V P                   ^ ,          P                  '       d   R# R# rm  rn  rC  s   &r4   ro  cos._eval_is_extended_real~  rq  r6   c                	T    V P                   ^ ,          pVP                  '       d   R# R# rm  rn  rs  s   & r4   rt  cos._eval_is_finite  s#    iil  r6   c                	    V P                   ^ ,          P                  '       g$   V P                   ^ ,          P                  '       d   R# R# rm  r  rC  s   &r4   r  cos._eval_is_complex  s2    99Q<(((yy|&&& 'r6   c                	    \        V P                  ^ ,          4      w  rVP                  '       d,   V'       d"   V\        P                  ,
          P
                  # R# R# r   r   r<   r>   r   r   r   rx  s   &  r4   r{  cos._eval_is_zero  s=    #DIIaL1<<<Gaff$000 $<r6   rL   rm   r   r@  rl   )"rn   ro   rp   rq   rr   r   r   r  r   r  r   r   r   r   r  r  r  r  r  r"  r%  r0  r*  r=  rD  rM   rT  rj  ro  rt  r  r{  rv   r  r  s   @r4   r   r   )  s    )V*5 I IV 
?  
?C,$/-*@
9),V135
"7
1 1r6   r   c                     a  ] tR tRtRtRR ltRR ltRR lt]R 4       t	]
]R 4       4       tR V 3R ll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R tR tR tR tR tR t R t!Rt"V ;t## )"r  i  aX  
The tangent function.

Returns the tangent of x (measured in radians).

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

See :class:`sin` for notes about automatic evaluation.

Examples
========

>>> from sympy import tan, pi
>>> from sympy.abc import x
>>> tan(x**2).diff(x)
2*x*(tan(x**2)**2 + 1)
>>> tan(1).diff(x)
0
>>> tan(pi/8).expand()
-1 + sqrt(2)

See Also
========

sin, csc, cos, sec, cot
asin, acsc, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Trigonometric_functions
.. [2] https://dlmf.nist.gov/4.14
.. [3] https://functions.wolfram.com/ElementaryFunctions/Tan

c                	.    V P                  \        V4      # rm   r   r   s   &&r4   r   
tan.period      ||B''r6   c                	b    V^8X  d   \         P                  V ^,          ,           # \        W4      hr   )r   r   r   r   s   &&r4   r   	tan.fdiff  s&    q=5547?"$T44r6   c                    \         # z'
Returns the inverse of this function.
r   r   s   &&r4   inversetan.inverse  	     r6   c                	   ^ RI Hp VP                  '       d   V\        P                  J d   \        P                  # VP
                  '       d   \        P                  # V\        P                  \        P                  39   d&   V! \        P                  \        P                  4      # V\        P                  J d   \        P                  # \        W4      '       Ed   VP                  VP                  rC\        V\        ,          4      pV\        P                  Jd   W5\        ,          ,
          pV\        P                  Jd   WE\        ,          ,
          p^ RIHp V! W44      P#                  V! \        ^,          \        \%        ^^4      ,          4      4      '       d&   V! \        P                  \        P                  4      # V! \'        V4      \'        V4      4      # VP)                  4       '       d   V ! V) 4      ) # \+        V4      pVe$   ^ RIHp \        P0                  V! V4      ,          # \3        V^4      p	V	Ee=   V	P4                  '       d   \        P                  # V	P6                  '       g   V	\        ,          p
W8w  d	   V ! V
4      # R# V	P6                  '       Ed   V	P8                  pV	P:                  V,          p^\=        ^^\=        ^4      ,          ^,          ,
          4      ^\=        ^^\=        ^4      ,          ,
          4      ^\=        ^^\=        ^4      ,          ^,          ,           4      ^\=        ^^\=        ^4      ,          ,           4      /pVR9   d2   ^
V,          V,          pV^8  d   ^
V,
          pW,          ) # W,          # V	P8                  ^,          '       g   V	\        ,          ^,          p
\?        V
4      \?        V
\        ^,          ,
          4      pp\        V\>        4      '       gE   \        V\>        4      '       g/   V^ 8X  d   \        P                  # ^V,          VV,          ,
          # \A        4       pVV9   dj   VV,          w  ppV ! V\        ,          V,          4      V ! V\        ,          V,          4      ppRVV39   d   R# VV,
          ^VV,          ,           ,          # V	\        PB                  ,           ^,          \        PB                  ,
          \        ,          p
\?        V
4      \?        V
\        ^,          ,
          4      pp\        V\>        4      '       g7   \        V\>        4      '       g!   V^ 8X  d   \        P                  # VV,          # W8w  d	   V ! V
4      # VPD                  '       dX   \G        V4      w  ppV'       dB   \'        V\        ,          4      pV\        P                  J d   \I        V4      ) # \'        V4      # VP
                  '       d   \        P                  # \        V\J        4      '       d   VPL                  ^ ,          # \        V\N        4      '       d   VPL                  w  ppVV,          # \        V\P        4      '       d4   VPL                  ^ ,          pV\=        ^V^,          ,
          4      ,          # \        V\R        4      '       d4   VPL                  ^ ,          p\=        ^V^,          ,
          4      V,          # \        V\T        4      '       d   VPL                  ^ ,          p^V,          # \        V\V        4      '       dB   VPL                  ^ ,          p^\=        ^^V^,          ,          ,
          4      V,          ,          # \        V\X        4      '       d;   VPL                  ^ ,          p\=        ^^V^,          ,          ,
          4      V,          # R# )r   r   r   N)tanhr{   r}   )-r   r   r   r   r   r>   rW   r   r   rt   r1   r   r   r$   r   r   r   r   r   r  r   r5   r   r  r3   rF   r   r   r  r   r%   r   r   r   rb   r   r  r   r<   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r  rG   r   r  r   table10r   cresultsresultr  ri   r  r  r  r   r   tanmr   s   &&                        r4   r   tan.eval  sm   A===aee|uuvvQ%7%788"1#5#5qzzBB!###55Lc''wwc"fA!,,,bDj!**$bDj13$11)BqD"XaQR^BS2TUU"1#5#5qzzBB"3s8SX66''))I:05B??4=00S!$"""vv'''{;t9$###JJJJN tA$q'	!O,tA$q'	M*tA$q'	!O,tA$q'	M*	 <1QA1uF '
{*&z)zzA~~#B;q=D'*4y#dRTk2BWG%gs33$.w$<$<"a<#$#4#44 y77?:: ;!!9DAq#&qtAv;AbDF5Eu~-#!EMAeO<<!AFF*a/!&&8"< $'t9c$A+.>!'3// *7C 8 8!| 000#GO,;t9$:::s#DAq1R4y1,,,F7Nq6M;;;66Mc4  88A;c5!!88DAqQ3Jc4  AT!ad(^##c4  AAqD>!##c4  AQ3Jc4  Ad1qAv:&q())c4  AAadF
#A%% !r6   c                	v   V ^ 8  g   V ^,          ^ 8X  d   \         P                  # \        V4      pV ^,
          ^,          ^V ^,           ,          rC\        V ^,           4      p\	        V ^,           4      p\         P
                  V,          V,          V^,
          ,          V,          V,          W,          ,          # r@  )r   rW   r   r   r   r   )r   r   r   ri   r  BFs   &&*    r4   r   tan.taylor_termJ  s     q5AEQJ66M
AUQJQUq!a% A!a% A==!#A%q1u-a/1!$66r6   c                	  < V P                   ^ ,          P                  V^ 4      ^,          \        ,          pV'       d9   VP                  '       d'   V P	                  \
        4      P                  WVR7      # \        SV `  WVR7      # r   r   r   )r<   rd  r   rU  r   r   r   r   )r@   r   r   r   r   r   r   s   &&&&& r4   r   tan._eval_nseriesY  sf    IIaLq!$Q&r)<<$2212EEw$Q$$77r6   c                	    \        V\        4      '       d\   \        P                  pVP                  ^ ,          pW4V) ,          WC,          ,
          ,          WC) ,          WC,          ,           ,          # R# r   r   r  s   &&,  r4   r  tan._eval_rewrite_as_Pow_  sN    c3AA!eadl#QUQT\22  r6   c                	b    V P                  V P                  ^ ,          P                  4       4      # r@  rA  rC  s   &r4   rD  tan._eval_conjugatee  rF  r6   c                	:   V P                   ! RR V/VB w  r4V'       d^   ^ RIHpHp \	        ^V,          4      V! ^V,          4      ,           p\        ^V,          4      V,          V! ^V,          4      V,          3# V P                  V4      \        P                  3# rK   rI  rL   	rX   r   rJ  r   r   r   r;   r   rW   r@   rK   rN   r!   r    rJ  r   denoms   &&,     r4   rM   tan.as_real_imagh  sw    ##777H"IQrT
*E"IeOT!B$Z%566IIbM166**r6   c                	    V P                   ^ ,          pRpVP                  '       Ed"   \        VP                   4      p. pVP                    F/  p\        VRR7      P	                  4       pVP                  V4       K1  	  \        R4      p\        V4       Uu. uF  p\        V4      NK  	  p	p^ ^ .p
\        V^,           4       FK  pV
^V^,          ,
          ;;,          \        W4      R	V^,          ^,          ,          ,          ,          uu&   KM  	  V
^ ,          V
^,          ,          P                  \        \        W4      4      4      # VP                  '       d   VP                  RR7      w  rVP                  '       d   V^8  dx   \         P"                  p\%        RRR7      p^W,          ,           V,          P'                  4       p\)        V4      \+        V4      ,          P                  V\        V4      3.4      # \        V4      # u upi 
r   NFr  YTrP  dummy)realr   )r<   rb   r   r  rT  r   r/   rangenextr.   r   listr  r_   r   rU  r   r3   r   rV   r    r!   )r@   rN   r   r   r   TXtxYgr   r  r   r   r  r   r  Ps   &,              r4   rT  tan._eval_expand_trigq  s   iil:::CHHABXXU+==?		"  "#&B$)!H.Hq$r(HA.AA1q5\!a!e)q 4bQUQJ5G GG "aD1I##DQ$455ZZZ++T+:LEEAIOO7.!#g%--/1be))As5z?*;<<3x /s   Hc                	F   \         P                  p^ RIHp \	        V\
        V34      '       d6   VP                  VP                  ^ ,          4      P                  \        4      p\        V) V,          4      \        W,          4      reW5V,
          ,          WV,           ,          # r   r  )r@   r   r   r   r   neg_exppos_exps   &&,    r4   r   tan._eval_rewrite_as_exp  sp    OOLc13EFGG((388A;'//4CtAv;CE
G#$g&788r6   c                	b    ^\        V4      ^,          ,          \        ^V,          4      ,          # r   r   r@   r   r   s   &&,r4   r  tan._eval_rewrite_as_sin  s!    Q{3qs8##r6   c                	`    \        V\        ^,          ,
          RR7      \        V4      ,          # r  r  r  s   &&,r4   r
  tan._eval_rewrite_as_cos  s     1r!t8e,SV33r6   c                	8    \        V4      \        V4      ,          # rm   r  r	  s   &&,r4   r  tan._eval_rewrite_as_sincos      3xC  r6   c                	&    ^\        V4      ,          # r   r  r	  s   &&,r4   r  tan._eval_rewrite_as_cot  r,  r6   c                	    \        V4      P                  ! \        3/ VB p\        V4      P                  ! \        3/ VB pW4,          # rm   )r   r   r/  r   )r@   r   r   sin_in_sec_formcos_in_sec_forms   &&,  r4   r0  tan._eval_rewrite_as_sec  =    c(**39&9c(**39&9..r6   c                	    \        V4      P                  ! \        3/ VB p\        V4      P                  ! \        3/ VB pW4,          # rm   )r   r   r)  r   )r@   r   r   sin_in_csc_formcos_in_csc_forms   &&,  r4   r*  tan._eval_rewrite_as_csc  r'  r6   c                	    V P                   ! \        3/ VB P                   ! \        3/ VB pVP                  \        4      '       d   R # V# rm   r   r   r!  r^   r@   r   r   r   s   &&, r4   r"  tan._eval_rewrite_as_pow  :    LL''//>v>55::r6   c                	    V P                   ! \        3/ VB P                   ! \        3/ VB pVP                  \        4      '       d   R # V# rm   r   r   r%   r^   r.  s   &&, r4   r%  tan._eval_rewrite_as_sqrt  :    LL''//??55::r6   c                	v    ^ RI Hp V! \        P                  V4      V! \        P                  ) V4      ,          # r7  r;  r9  r   r   r<  s   &&, r4   r=  tan._eval_rewrite_as_besselj  s(    :qvvs#GQVVGS$999r6   c                	   ^ RI Hp ^ RIHp V P                  ^ ,          pVP                  V^ 4      P                  4       p^V,          \        ,          pVP                  '       dG   Wh\        ,          ^,          ,
          P                  V4      p	VP                  '       d   V	# RV	,          # V\        P                  J d/   TP                  T^ V! V4      P                  '       d   RMRR7      pV\        P                  \        P                   39   d&   V! \        P                   \        P                  4      # VP"                  '       d   V P%                  V4      # T # )r   r   r!   r]  r^  r_  r   r   r   $sympy.functions.elementary.complexesr!   r<   r   rb  r   r   rc  r   r   rt   rd  re  r   r   rf  r;   
r@   r   r   r   r   r!   r   rh  r   ri  s
   &&&&      r4   rj  tan._eval_as_leading_term  s    A;iilXXa^""$bDG<<<"Q,//2B2-2-"""1aBtH,@,@,@ScJB!**a0011q111::>> "tyy}6$6r6   c                	<    V P                   ^ ,          P                  # r@  rn  rC  s   &r4   ro  tan._eval_is_extended_real  s    yy|,,,r6   c                	    V P                   ^ ,          pVP                  '       d5   V\        ,          \        P                  ,
          P
                  RJ d   R# R# R# r   FTNr<   is_realr   r   r   r   rs  s   & r4   _eval_is_realtan._eval_is_real  s<    iil;;;CFQVVO775@ A;r6   c                	    V P                   ^ ,          pVP                  '       d3   V\        ,          \        P                  ,
          P
                  RJ d   R# VP                  '       d   R# R# rA  )r<   rC  r   r   r   r   is_imaginaryrs  s   & r4   rt  tan._eval_is_finite  sH    iil;;;CFQVVO775@ r6   c                	~    \        V P                  ^ ,          4      w  rVP                  '       d   VP                  # R# r   rw  rx  s   &  r4   r{  tan._eval_is_zero  r}  r6   c                	    V P                   ^ ,          pVP                  '       d5   V\        ,          \        P                  ,
          P
                  RJ d   R# R# R# rA  rB  rs  s   & r4   r  tan._eval_is_complex  s<    iil;;;CFQVVO775@ A;r6   rL   rm   r   r@  rl   )$rn   ro   rp   rq   rr   r   r   r  r  r   r  r   r   r   r  rD  rM   rT  r   r  r
  r  r  r0  r*  r"  r%  r=  rj  ro  rD  rt  r{  r  rv   r  r  s   @r4   r  r    s    #J(5 & &B 7  7833+69$4!/
/
:7-
&
 r6   r  c                      ] tR tRtRtR R ltR!R ltR!R lt]R 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 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  i  aT  
The cotangent function.

Returns the cotangent of x (measured in radians).

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

See :class:`sin` for notes about automatic evaluation.

Examples
========

>>> from sympy import cot, pi
>>> from sympy.abc import x
>>> cot(x**2).diff(x)
2*x*(-cot(x**2)**2 - 1)
>>> cot(1).diff(x)
0
>>> cot(pi/12)
sqrt(3) + 2

See Also
========

sin, csc, cos, sec, tan
asin, acsc, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Trigonometric_functions
.. [2] https://dlmf.nist.gov/4.14
.. [3] https://functions.wolfram.com/ElementaryFunctions/Cot

Nc                	.    V P                  \        V4      # rm   r   r   s   &&r4   r   
cot.period  r  r6   c                	b    V^8X  d   \         P                  V ^,          ,
          # \        W4      hr   )r   r   r   r   s   &&r4   r   	cot.fdiff  s'    q===47**$T44r6   c                    \         # r  r   r   s   &&r4   r  cot.inverse  r  r6   c                	p   ^ RI Hp VP                  '       d   V\        P                  J d   \        P                  # VP
                  '       d   \        P                  # V\        P                  \        P                  39   d&   V! \        P                  \        P                  4      # V\        P                  J d   \        P                  # \        W4      '       d   \        V\        ^,          ,           4      ) # VP                  4       '       d   V ! V) 4      ) # \        V4      pVe%   ^ RIHp \        P                   ) V! V4      ,          # \#        V^4      pVEe   VP$                  '       d   \        P                  # VP&                  '       g   V\        ,          pWa8w  d	   V ! V4      # R# VP&                  '       Ed&   VP(                  R9   d   \        \        ^,          V,
          4      # VP(                  ^8  d   VP(                  ^,          '       g~   V\        ,          ^,          p\+        V4      \+        V\        ^,          ,
          4      r\        V\*        4      '       g-   \        V\*        4      '       g   ^V,          Wx,          ,           # VP(                  p	VP,                  V	,          p
\/        4       pW9   dd   W,          w  rV ! V
\        ,          V,          4      V ! V
\        ,          V,          4      rRW39   d   R# ^W,          ,           W,
          ,          # V\        P0                  ,           ^,          \        P0                  ,
          \        ,          p\+        V4      \+        V\        ^,          ,
          4      r\        V\*        4      '       g6   \        V\*        4      '       g    V^ 8X  d   \        P                  # Wx,          # Wa8w  d	   V ! V4      # VP2                  '       dX   \5        V4      w  ppV'       dB   \7        V\        ,          4      pV\        P                  J d   \7        V4      # \        V4      ) # VP
                  '       d   \        P                  # \        V\8        4      '       d   VP:                  ^ ,          # \        V\<        4      '       d   VP:                  ^ ,          p^V,          # \        V\>        4      '       d   VP:                  w  ppVV,          # \        V\@        4      '       d4   VP:                  ^ ,          p\C        ^V^,          ,
          4      V,          # \        V\D        4      '       d4   VP:                  ^ ,          pV\C        ^V^,          ,
          4      ,          # \        V\F        4      '       d;   VP:                  ^ ,          p\C        ^^V^,          ,          ,
          4      V,          # \        V\H        4      '       dB   VP:                  ^ ,          p^\C        ^^V^,          ,          ,
          4      V,          ,          # R# )r   r   N)cothr  )%r   r   r   r   r   r>   rt   r   r   r1   r  r   r   r5   r   rV  r3   rF   r   r   r  r   r   r   r   rb   r   r  r   r<   r   r   r   r%   r   r   r   )r   r   r   r   rV  rG   r   r  r  r  r   r  ri   r  r  r  r   r   cotmr   s   &&                  r4   r   cot.eval  sD   A===aee|uu{{{(((Q%7%788"1#5#5qzzBB!###55Lc''bd
O##''))I:05BOO#DM11S!$"""((('''{;t9$###::(r!tcz?*::>(**q..#B;q=D'*4y#dRTk2BW%gs33$.w$<$< y7?::JJJJN ;!9DA#&qtAv;AbDF5~-#Oem<<"QVV+q0AFF:B> $'t9c$A+.>!'3// *7C 8 8!| 000"?*;t9$:::s#DAq1R4y1,,,q6MF7N;;;$$$c4  88A;c4  AQ3Jc5!!88DAqQ3Jc4  AAqD>!##c4  AT!ad(^##c4  AAadF
#A%%c4  Ad1qAv:&q()) !r6   c                	   V ^ 8X  d   ^\        V4      ,          # V ^ 8  g   V ^,          ^ 8X  d   \        P                  # \        V4      p\        V ^,           4      p\	        V ^,           4      p\        P
                  V ^,           ^,          ,          ^V ^,           ,          ,          V,          V,          W,          ,          # r@  )r   r   rW   r   r   r   )r   r   r   r  r  s   &&*  r4   r   cot.taylor_term  s     6WQZ<Ua!eqj66M
A!a% A!a% A==AEA:.q1q5z9!;A=adBBr6   c                	*   V P                   ^ ,          P                  V^ 4      \        ,          pV'       d9   VP                  '       d'   V P	                  \
        4      P                  WVR7      # V P	                  \        4      P                  WVR7      # r  )r<   rd  r   rU  r   r   r   r  )r@   r   r   r   r   r   s   &&&&& r4   r   cot._eval_nseries  sj    IIaLq!$R'<<$2212EE||C ..qD.AAr6   c                	b    V P                  V P                  ^ ,          P                  4       4      # r@  rA  rC  s   &r4   rD  cot._eval_conjugate  rF  r6   c                	<   V P                   ! RR V/VB w  r4V'       d_   ^ RIHpHp \	        ^V,          4      V! ^V,          4      ,
          p\        ^V,          4      ) V,          V! ^V,          4      V,          3# V P                  V4      \        P                  3# r  r  r  s   &&,     r4   rM   cot.as_real_imag  sz    ##777H"IQrT
*E2YJu$d1R4j&677IIbM166**r6   c                	J   ^ RI Hp \        P                  p\	        V\
        V34      '       d8   VP                  VP                  ^ ,          4      P                  ! \        3/ VB p\        V) V,          4      \        W,          4      reWFV,           ,          We,
          ,          # r   r   )r@   r   r   r   r   r  r  s   &&,    r4   r   cot._eval_rewrite_as_exp  su    LOOc13EFGG((388A;'//>v>CtAv;CE
G#$g&788r6   c                	    \        V\        4      '       d]   \        P                  pVP                  ^ ,          pV) WC) ,          WC,          ,           ,          WC) ,          WC,          ,
          ,          # R# r   r   r  s   &&,  r4   r  cot._eval_rewrite_as_Pow  sP    c3AA2q"uqt|$aeadl33  r6   c                	b    \        ^V,          4      ^\        V4      ^,          ,          ,          # r   r  r  s   &&,r4   r  cot._eval_rewrite_as_sin  s!    1Q3xCFAI''r6   c                	`    \        V4      \        V\        ^,          ,
          RR7      ,          # r  r  r  s   &&,r4   r
  cot._eval_rewrite_as_cos  s     1vc!bd(U333r6   c                	8    \        V4      \        V4      ,          # rm   r   r   r	  s   &&,r4   r  cot._eval_rewrite_as_sincos  r  r6   c                	&    ^\        V4      ,          # r   r  r	  s   &&,r4   r  cot._eval_rewrite_as_tan  r,  r6   c                	    \        V4      P                  ! \        3/ VB p\        V4      P                  ! \        3/ VB pW4,          # rm   )r   r   r/  r   )r@   r   r   r%  r$  s   &&,  r4   r0  cot._eval_rewrite_as_sec  r'  r6   c                	    \        V4      P                  ! \        3/ VB p\        V4      P                  ! \        3/ VB pW4,          # rm   )r   r   r)  r   )r@   r   r   r*  r)  s   &&,  r4   r*  cot._eval_rewrite_as_csc  r'  r6   c                	    V P                   ! \        3/ VB P                   ! \        3/ VB pVP                  \        4      '       d   R # V# rm   r-  r.  s   &&, r4   r"  cot._eval_rewrite_as_pow  r0  r6   c                	    V P                   ! \        3/ VB P                   ! \        3/ VB pVP                  \        4      '       d   R # V# rm   r2  r.  s   &&, r4   r%  cot._eval_rewrite_as_sqrt  r4  r6   c                	v    ^ RI Hp V! \        P                  ) V4      V! \        P                  V4      ,          # r7  r6  r<  s   &&, r4   r=  cot._eval_rewrite_as_besselj  s(    :w$WQVVS%999r6   c                	   ^ RI Hp ^ RIHp V P                  ^ ,          pVP                  V^ 4      P                  4       p^V,          \        ,          pVP                  '       dH   Wh\        ,          ^,          ,
          P                  V4      p	VP                  '       d
   ^V	,          # V	) # V\        P                  J d/   TP                  T^ V! V4      P                  '       d   RMRR7      pV\        P                  \        P                   39   d&   V! \        P                   \        P                  4      # VP"                  '       d   V P%                  V4      # T # r   r   r9  r]  r^  r_  r:  r<  s
   &&&&      r4   rj  cot._eval_as_leading_term  s    A;iilXXa^""$bDG<<<"Q,//2B9991R4-2#-"""1aBtH,@,@,@ScJB!**a0011q111::>> "tyy}6$6r6   c                	<    V P                   ^ ,          P                  # r@  rn  rC  s   &r4   ro  cot._eval_is_extended_real      yy|,,,r6   c                	   V P                   ^ ,          pRpVP                  '       Ed"   \        VP                   4      p. pVP                    F/  p\        VRR7      P	                  4       pVP                  V4       K1  	  \        R4      p\        V4       Uu. uF  p\        V4      NK  	  p	p^ ^ .p
\        VR	R	4       FP  pWV,
          ^,          ;;,          \        W4      R	WH,
          ^,          ^,          ,          ,          ,          uu&   KR  	  V
^ ,          V
^,          ,          P                  \        \        W4      4      4      # VP                  '       d   VP                  RR7      w  rVP                  '       dx   V^8  dq   \         P"                  p\%        RRR7      pW,           V,          P'                  4       p\)        V4      \+        V4      ,          P                  V\        V4      3.4      # \        V4      # u upi r  )r<   rb   r   r  rT  r   r/   r  r  r.   r   r  r  r_   r   rU  r   r3   r   rV   r!   r    )r@   rN   r   r   r   CXr   r  r   r  r   r   r  r   r  r  s   &,              r4   rT  cot._eval_expand_trig  s   iil:::CHHABXXU+==?		"  "#&B$)!H.Hq$r(HA.AA1b"%q5A+."6{Q>N7O"OO &aD1I##DQ$455ZZZ++T+:LEEAIOO7.ee^++-1be))As5z?*;<<3x /s   Hc                	    V P                   ^ ,          pVP                  '       d   V\        ,          P                  RJ d   R# VP                  '       d   R# R# rA  )r<   rC  r   r   rG  rs  s   & r4   rt  cot._eval_is_finite  s@    iil;;;CF..%7 r6   c                	    V P                   ^ ,          pVP                  '       d    V\        ,          P                  RJ d   R# R# R# rA  r<   rC  r   r   rs  s   & r4   rD  cot._eval_is_real  3    iil;;;CF..%7 8;r6   c                	    V P                   ^ ,          pVP                  '       d    V\        ,          P                  RJ d   R# R# R# rA  r  rs  s   & r4   r  cot._eval_is_complex  r  r6   c                	    \        V P                  ^ ,          4      w  rV'       d6   VP                  '       d"   V\        P                  ,
          P
                  # R# R# r   r  )r@   ry  pimults   &  r4   r{  cot._eval_is_zero  s<    "499Q<0dlllQVVO/// #6r6   c                	    V P                   ^ ,          pVP                  W4      pW48w  d.   V\        ,          P                  '       d   \        P
                  # \        V4      # r@  )r<   r   r   r   r   rt   r  )r@   oldnewr   argnews   &&&  r4   
_eval_subscot._eval_subs  sG    iil##=fRi333$$$6{r6   rL   rm   r   r@  rl   )$rn   ro   rp   rq   rr   r   r   r  r  r   r  r   r   r   rD  rM   r   r  r  r
  r  r  r0  r*  r"  r%  r=  rj  ro  rT  rt  rD  r  r{  r  rv   rL   r6   r4   r  r    s    #J(5 f* f*P C  CB3+94(4!/
/
:7-4

0
r6   r  c                      ] tR tRt$ RtRt]P                  3tRt	R]
R&   RtR]
R&   ]R 4       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RR ltR tR tR tR tRR lt Rt!R# )ReciprocalTrigonometricFunctioni$  z@Base class for reciprocal functions of trigonometric functions. Nr   _is_even_is_oddc                	   VP                  4       '       d8   V P                  '       d
   V ! V) 4      # V P                  '       d   V ! V) 4      ) # \        V4      pVe   ^V,          P                  '       g   VP
                  '       d   VP                  pVP                  ^V,          ,          pWC8  d   V^,
          \        ,          pV ! V4      ) # ^V,          V8  dJ   ^V,
          \        ,          pV P                  '       d	   V ! V4      # V P                  '       d
   V ! V4      ) # \        VR4      '       d)   VP                  4       V 8X  d   VP                  ^ ,          # V P                  P                  V4      pVf   V# \        ;QJ d    R Wf) 3 4       F  '       g   K   RM	  RM! R Wf) 3 4       4      '       d   ^V,          P                  \         4      # \        ;QJ d    R Wf) 3 4       F  '       g   K   RM	  RM! R Wf) 3 4       4      '       d   ^V,          P                  \"        4      # ^V,          # )Nr  c              3  B   "   T F  p\        V\        4      x  K  	  R # 5irm   )r1   r   r  r   s   & r4   r  7ReciprocalTrigonometricFunction.eval.<locals>.<genexpr>P       5WAs##W   TFc              3  B   "   T F  p\        V\        4      x  K  	  R # 5irm   )r1   r   r  s   & r4   r  r  R  r  r  )r   r  r  rF   r   r   r  r   r   hasattrr  r<   _reciprocal_ofr   anyr   r/  r)  )r   r   rG   r  r   r   ts   &&     r4   r   $ReciprocalTrigonometricFunction.eval2  s   ''))|||C4y {{{SD	z!S> xZ+++$$$JJJJ!A#&5$qL",DI:%Q37L",D{{{"4y( #D	z)3	""s{{}';88A;##C(9HS5aW5SSS5aW555aC==%%S5aW5SSS5aW555aC==%%Q3Jr6   c                	h    V P                  V P                  ^ ,          4      p\        WA4      ! V/ VB # r@  )r  r<   getattr)r@   method_namer<   r   os   &&*, r4   _call_reciprocal0ReciprocalTrigonometricFunction._call_reciprocalW  s/    		!-q&777r6   c                	L    V P                   ! V.VO5/ VB pVe
   ^V,          # T# rm   )r  )r@   r  r<   r   r  s   &&*, r4   _calculate_reciprocal5ReciprocalTrigonometricFunction._calculate_reciprocal\  s1     !!+???mqs**r6   c                	p    V P                  W4      pVe!   W0P                  V4      8w  d
   ^V,          # R # R # rm   )r  r  )r@   r  r   r  s   &&& r4   _rewrite_reciprocal3ReciprocalTrigonometricFunction._rewrite_reciprocalb  s9     !!+3=Q"5"5c"::Q3J ;=r6   c                	z    \        V P                  ^ ,          4      pV P                  V4      P                  V4      # r@  )r
   r<   r  r   )r@   re   rf   s   && r4   rj   'ReciprocalTrigonometricFunction._periodi  s0    tyy|$""1%,,V44r6   c                	D    V P                  R V4      ) V ^,          ,          # )r   r  r   s   &&r4   r   %ReciprocalTrigonometricFunction.fdiffm  s!    **7H==dAgEEr6   c                	&    V P                  R V4      # )r   r  r	  s   &&,r4   r   4ReciprocalTrigonometricFunction._eval_rewrite_as_expp      ''(>DDr6   c                	&    V P                  R V4      # )r  r  r	  s   &&,r4   r  4ReciprocalTrigonometricFunction._eval_rewrite_as_Pows  r  r6   c                	&    V P                  R V4      # )r  r  r	  s   &&,r4   r  4ReciprocalTrigonometricFunction._eval_rewrite_as_sinv  r  r6   c                	&    V P                  R V4      # )r
  r  r	  s   &&,r4   r
  4ReciprocalTrigonometricFunction._eval_rewrite_as_cosy  r  r6   c                	&    V P                  R V4      # )r  r  r	  s   &&,r4   r  4ReciprocalTrigonometricFunction._eval_rewrite_as_tan|  r  r6   c                	&    V P                  R V4      # )r"  r  r	  s   &&,r4   r"  4ReciprocalTrigonometricFunction._eval_rewrite_as_pow  r  r6   c                	&    V P                  R V4      # r  r  r	  s   &&,r4   r%  5ReciprocalTrigonometricFunction._eval_rewrite_as_sqrt  s    ''(?EEr6   c                	b    V P                  V P                  ^ ,          P                  4       4      # r@  rA  rC  s   &r4   rD  /ReciprocalTrigonometricFunction._eval_conjugate  rF  r6   c                	v    ^V P                  V P                  ^ ,          4      ,          P                  ! V3/ VB # r   )r  r<   rM   )r@   rK   rN   s   &&,r4   rM   ,ReciprocalTrigonometricFunction.as_real_imag  s:    $%%diil33AA$ KDIK 	Kr6   c                	&    V P                   ! R/ VB # )rT  )rT  r  )r@   rN   s   &,r4   rT  1ReciprocalTrigonometricFunction._eval_expand_trig  s    ))GGGr6   c                	b    V P                  V P                  ^ ,          4      P                  4       # r@  )r  r<   ro  rC  s   &r4   ro  6ReciprocalTrigonometricFunction._eval_is_extended_real  s$    ""499Q<0GGIIr6   c                	v    ^V P                  V P                  ^ ,          4      ,          P                  WVR7      # )r   r   r   )r  r<   rj  )r@   r   r   r   s   &&&&r4   rj  5ReciprocalTrigonometricFunction._eval_as_leading_term  s1    $%%diil33JJ1^bJccr6   c                	h    ^V P                  V P                  ^ ,          4      ,          P                  # r   )r  r<   rf  rC  s   &r4   rt  /ReciprocalTrigonometricFunction._eval_is_finite  s&    $%%diil33>>>r6   c                	t    ^V P                  V P                  ^ ,          4      ,          P                  WV4      # r   )r  r<   r   r@   r   r   r   r   s   &&&&&r4   r   -ReciprocalTrigonometricFunction._eval_nseries  s-    $%%diil33BB1NNr6   rL   r   rl   r@  )"rn   ro   rp   rq   rr   r  r   rt   ru   r  __annotations__r  r  r   r  r  r  rj   r   r   r  r  r
  r  r"  r%  rD  rM   rT  ro  rj  rt  r   rv   rL   r6   r4   r  r  $  s    JN'')N HiGY" "H8
+5FEEEEEEF3KHJd?O Or6   r  c                      ] tR tRtRt]tRtRR ltR t	R t
R tR	 tR
 tR tRR ltR tR t]]R 4       4       tR tRtR# )r/  i  a/  
The secant function.

Returns the secant of x (measured in radians).

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

See :class:`sin` for notes about automatic evaluation.

Examples
========

>>> from sympy import sec
>>> from sympy.abc import x
>>> sec(x**2).diff(x)
2*x*tan(x**2)*sec(x**2)
>>> sec(1).diff(x)
0

See Also
========

sin, csc, cos, tan, cot
asin, acsc, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Trigonometric_functions
.. [2] https://dlmf.nist.gov/4.14
.. [3] https://functions.wolfram.com/ElementaryFunctions/Sec

TNc                	$    V P                  V4      # rm   rj   r   s   &&r4   r   
sec.period      ||F##r6   c                	b    \        V^,          4      ^,          pV^,           V^,
          ,          # r   r!  )r@   r   r   cot_half_sqs   &&, r4   r  sec._eval_rewrite_as_cot  s&    #a%j!ma+/22r6   c                	&    ^\        V4      ,          # r   r   r	  s   &&,r4   r
  sec._eval_rewrite_as_cos      #c(
r6   c                	X    \        V4      \        V4      \        V4      ,          ,          # rm   r  r	  s   &&,r4   r  sec._eval_rewrite_as_sincos      3xS#c(*++r6   c                	P    ^\        V4      P                  ! \        3/ VB ,          # r   )r   r   r   r	  s   &&,r4   r  sec._eval_rewrite_as_sin  !    #c(""31&112r6   c                	P    ^\        V4      P                  ! \        3/ VB ,          # r   )r   r   r  r	  s   &&,r4   r  sec._eval_rewrite_as_tan  r  r6   c                	@    \        \        ^,          V,
          RR7      # r  )r)  r   r	  s   &&,r4   r*  sec._eval_rewrite_as_csc      2a4#:..r6   c                	    V^8X  d>   \        V P                  ^ ,          4      \        V P                  ^ ,          4      ,          # \        W4      hr   )r  r<   r/  r   r   s   &&r4   r   	sec.fdiff  s9    q=tyy|$S1%666$T44r6   c                	    ^ RI Hp \        ^\        \        V,          4      \        ^4      ,          V! \
        P                  ) V4      ,          ,          \        V^ 4      3R4      # r  r  r<  s   &&, r4   r=  sec._eval_rewrite_as_besselj  sK    :DCL$q'*7AFF7C+@@A2c1:N 	r6   c                	    V P                   ^ ,          pVP                  '       d5   V\        ,          \        P                  ,
          P
                  RJ d   R# R# R# rA  )r<   r  r   r   r   r   rs  s   & r4   r  sec._eval_is_complex  s<    iil>>>s2v::eC D>r6   c                	(   V ^ 8  g   V ^,          ^8X  d   \         P                  # \        V4      pV ^,          p\         P                  V,          \	        ^V,          4      ,          \        ^V,          4      ,          V^V,          ,          ,          # r@  )r   rW   r   r   r   r   r   r   r   ks   &&* r4   r   sec.taylor_term  sf    
 q5AEQJ66M
A1A==!#E!A#J.y1~=a!A#hFFr6   c                	   ^ RI Hp ^ RIHp V P                  ^ ,          pVP                  V^ 4      P                  4       pV\        ^,          ,           \        ,          pVP                  '       dS   Wh\        ,          ,
          \        ^,          ,           P                  V4      p	\        P                  V,          V	,          # V\        P                  J d/   TP                  T^ V! V4      P                  '       d   RMRR7      pV\        P                  \        P                   39   d&   V! \        P                   \        P                  4      # VP"                  '       d   V P%                  V4      # T # rz  r   r   r;  r!   r<   r   rb  r   r   rc  r   r   rt   rd  re  r   r   rf  r;   r<  s
   &&&&      r4   rj  sec._eval_as_leading_term  s    A;iilXXa^""$"Q$YN<<<"*r!t#44Q7BMM1$b(("""1aBtH,@,@,@ScJB!**a0011q111::>> "tyy}6$6r6   rL   rm   r   )rn   ro   rp   rq   rr   r   r  r  r   r  r
  r  r  r  r*  r   r=  r  r  r   r   rj  rv   rL   r6   r4   r/  r/    si    !F NH$3,33/5 G  G7r6   r/  c                      ] tR tRtRt]tRtRR ltR t	R t
R tR	 tR
 tR tR tRR ltR t]]R 4       4       tR tRtR# )r)  i  a3  
The cosecant function.

Returns the cosecant of x (measured in radians).

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

See :func:`sin` for notes about automatic evaluation.

Examples
========

>>> from sympy import csc
>>> from sympy.abc import x
>>> csc(x**2).diff(x)
-2*x*cot(x**2)*csc(x**2)
>>> csc(1).diff(x)
0

See Also
========

sin, cos, sec, tan, cot
asin, acsc, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Trigonometric_functions
.. [2] https://dlmf.nist.gov/4.14
.. [3] https://functions.wolfram.com/ElementaryFunctions/Csc

TNc                	$    V P                  V4      # rm   r  r   s   &&r4   r   
csc.period/  r  r6   c                	&    ^\        V4      ,          # r   r  r	  s   &&,r4   r  csc._eval_rewrite_as_sin2  r  r6   c                	X    \        V4      \        V4      \        V4      ,          ,          # rm   rj  r	  s   &&,r4   r  csc._eval_rewrite_as_sincos5  r  r6   c                	b    \        V^,          4      p^V^,          ,           ^V,          ,          # r   r!  r  s   &&, r4   r  csc._eval_rewrite_as_cot8  s&    s1u:HaK!H*--r6   c                	P    ^\        V4      P                  ! \        3/ VB ,          # r   )r   r   r   r	  s   &&,r4   r
  csc._eval_rewrite_as_cos<  r  r6   c                	@    \        \        ^,          V,
          RR7      # r  r.  r	  s   &&,r4   r0  csc._eval_rewrite_as_sec?  r  r6   c                	P    ^\        V4      P                  ! \        3/ VB ,          # r   )r   r   r  r	  s   &&,r4   r  csc._eval_rewrite_as_tanB  r  r6   c                	    ^ RI Hp \        ^\        ,          4      ^\        V4      V! \        P
                  V4      ,          ,          ,          # r7  r:  r<  s   &&, r4   r=  csc._eval_rewrite_as_besseljE  s1    :AbDz1d3i(<<=>>r6   c                	    V^8X  d?   \        V P                  ^ ,          4      ) \        V P                  ^ ,          4      ,          # \        W4      hr   )r  r<   r)  r   r   s   &&r4   r   	csc.fdiffI  s<    q=		!%%c$))A,&777$T44r6   c                	    V P                   ^ ,          pVP                  '       d    V\        ,          P                  RJ d   R# R# R# rA  r  rs  s   & r4   r  csc._eval_is_complexO  r  r6   c                	   V ^ 8X  d   ^\        V4      ,          # V ^ 8  g   V ^,          ^ 8X  d   \        P                  # \        V4      pV ^,          ^,           p\        P                  V^,
          ,          ^,          ^^V,          ^,
          ,          ^,
          ,          \	        ^V,          4      ,          V^V,          ^,
          ,          ,          \        ^V,          4      ,          # r@  )r   r   rW   r   r   r   r  s   &&* r4   r   csc.taylor_termT  s     6WQZ<Ua!eqj66M
A1qAMMAE*1,a!A#'lQ.>?acN##$qsQw<009!A#? @r6   c                	   ^ RI Hp ^ RIHp V P                  ^ ,          pVP                  V^ 4      P                  4       pV\        ,          pVP                  '       dA   Wh\        ,          ,
          P                  V4      p	\        P                  V,          V	,          # V\        P                  J d/   TP                  T^ V! V4      P                  '       d   RMRR7      pV\        P                  \        P                   39   d&   V! \        P                   \        P                  4      # VP"                  '       d   V P%                  V4      # T # rz  r  r<  s
   &&&&      r4   rj  csc._eval_as_leading_terma  s    A;iilXXa^""$rE<<<"*--a0BMM1$b(("""1aBtH,@,@,@ScJB!**a0011q111::>> "tyy}6$6r6   rL   rm   r   )rn   ro   rp   rq   rr   r   r  r  r   r  r  r  r
  r0  r  r=  r   r  r  r   r   rj  rv   rL   r6   r4   r)  r)    si    !F NG$,.1/3?5
 	@  	@7r6   r)  c                  t    ] tR tRtRt]P                  3tRR lt]	R 4       t
RR ltR tR tR tR	 t]tR
tR# )r3  iq  a  
Represents an unnormalized sinc function:

.. math::

    \operatorname{sinc}(x) =
    \begin{cases}
      \frac{\sin x}{x} & \qquad x \neq 0 \\
      1 & \qquad x = 0
    \end{cases}

Examples
========

>>> from sympy import sinc, oo, jn
>>> from sympy.abc import x
>>> sinc(x)
sinc(x)

* Automated Evaluation

>>> sinc(0)
1
>>> sinc(oo)
0

* Differentiation

>>> sinc(x).diff()
cos(x)/x - sin(x)/x**2

* Series Expansion

>>> sinc(x).series()
1 - x**2/6 + x**4/120 + O(x**6)

* As zero'th order spherical Bessel Function

>>> sinc(x).rewrite(jn)
jn(0, x)

See also
========

sin

References
==========

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

c                	    V P                   ^ ,          pV^8X  d1   \        V4      V,          \        V4      V^,          ,          ,
          # \        W4      hr@  )r<   r   r   r   )r@   r   r   s   && r4   r   
sinc.fdiff  sB    IIaLq= q6!8c!fQTk))$T44r6   c                	   VP                   '       d   \        P                  # VP                  '       dZ   V\        P                  \        P
                  39   d   \        P                  # V\        P                  J d   \        P                  # V\        P                  J d   \        P                  # VP                  4       '       d
   V ! V) 4      # \        V4      pVe   VP                  '       d.   \        VP                   4      '       d   \        P                  # R # ^V,          P                  '       d4   \        P                  V\        P                  ,
          ,          V,          # R # R # rm   )r>   r   r   r   r   r   rW   r   rt   r   rF   r   r   r   r   )r   r   rG   s   && r4   r   	sinc.eval  s    ;;;55L===qzz1#5#566vvuu!###55L''))t9S>"""S[[))66M *H*(((}}x!&&'89#== )	  r6   c                	l    V P                   ^ ,          p\        V4      V,          P                  WV4      # r@  )r<   r   r   r  s   &&&&&r4   r   sinc._eval_nseries  s*    IIaLAq''d33r6   c                	     ^ RI Hp V! ^ V4      # )r   )jn)r;  r  )r@   r   r   r  s   &&, r4   _eval_rewrite_as_jnsinc._eval_rewrite_as_jn  s    5!Szr6   c                	    \        \        V4      V,          \        V\        P                  4      3\        P
                  \        P                  34      # rm   )r(   r   r   r   rW   r   truer	  s   &&,r4   r  sinc._eval_rewrite_as_sin  s2    #c(3,38155!&&/JJr6   c                	B   V P                   ^ ,          P                  '       d   R# \        V P                   ^ ,          4      w  rVP                  '       d"   \	        VP
                  VP                  .4      # VP                  '       d   VP
                  '       d   R# R# R# )r   TFN)r<   is_infiniter   r>   r   r   
is_nonzeror   rx  s   &  r4   r{  sinc._eval_is_zero  sp    99Q<####DIIaL1<<<g00'2D2DEFF>>>g000 1>r6   c                	    V P                   ^ ,          P                  '       g$   V P                   ^ ,          P                  '       d   R# R# rm  )r<   rU   rG  rC  s   &r4   rD  sinc._eval_is_real  s2    99Q<(((DIIaL,E,E,E -Fr6   rL   Nr   r@  )rn   ro   rp   rq   rr   r   rt   ru   r   r  r   r   r  r  r{  rD  rt  rv   rL   r6   r4   r3  r3  q  sR    3h '')N5 > >.4K $Or6   r3  c                      ] tR tRt$ Rt]P                  ]P                  ]P                  ]P                  3t
R]R&   ]]R 4       4       t]]R 4       4       t]]R 4       4       tRtR	# )
InverseTrigonometricFunctioni  z/Base class for inverse trigonometric functions.ztuple[Expr, ...]ru   c                 	
   / \        ^4      ^,          \        ^,          b\        ^4      ^,          \        ^,          b^\        ^4      ,          \        ^,          b\        ^\        ^4      ,
          ^,          4      \        ^,          b\        ^4      \        ^\        ^4      ,
          4      ,          ^,          \        ^,          b\        ^\        ^4      ,           ^,          4      \        \        ^^4      ,          b\        ^4      \        ^\        ^4      ,           4      ,          ^,          \        \        ^^4      ,          b\        P                  \        ^,          b\        ^\        ^4      ,
          4      ^,          \        ^,          b\        \        P                  \        ^4      ^,          ,
          4      \        ^,          b\        ^\        ^4      ,           4      ^,          \        \        ^^4      ,          b\        \        P                  \        ^4      ^,          ,           4      \        \        ^^4      ,          b\        ^4      ^,
          ^,          \        ^
,          b^\        ^4      ,
          ^,          \        ) ^
,          b\        ^4      ^,           ^,          \        \        ^^
4      ,          b\        ^4      ^,          \        ^4      ^,          ,
          \        ^,          b\        ^4      ) ^,          \        ^4      ^,          ,           \        ) ^,          b\        ^4      ^,
          \        ^4      ,          \        ^,          ^\        ^4      ,
          \        ^4      ,          \        ) ^,          \        ^4      ^,          \        ^4      ^,          ,           \        \        ^^4      ,          ^\        ^4      ,           \        ^4      ,          \        \        ^^4      ,          /C# )ry   )r%   r   r   r   r   rL   r6   r4   _asin_table(InverseTrigonometricFunction._asin_table  s   

GAIr!t
GAIr!t
 d1gIr!t
 !d1g+q!2a4	

 GDT!W%%a'A
 !d1g+q!2hq!n#4
 GDT!W%%a'HQN):
 FFBqD
 T!WaA
 $q'!)#$bd
 T!WaHQN!2
 $q'!)#$b!Q&7
 !Wq[!ORU
 a[!ObSV
 !Wq[!ORB/
  GAIQ	!2b5!
" !WHQJa"RCF#
$ !Wq[$q'!2b5a[$q'!B3r6GAIQ	!2hq"o#5a[$q'!2hq"o#5+
 	
r6   c                 	   \        ^4      ^,          \        ^,          ^\        ^4      ,          \        ^,          \        ^4      \        ^,          \        ^4      ^,
          \        ^,          ^\        ^4      ,
          \        ) ^,          ^\        ^4      ,           \        \        ^^4      ,          \        ^^\        ^4      ,          ,
          4      \        ^,          \        ^^\        ^4      ,          ,           4      \        \        ^^4      ,          \        ^^\        ^4      ,          ^,          ,
          4      \        ^
,          \        ^^\        ^4      ,          ^,          ,           4      \        \        ^^
4      ,          ^\        ^4      ,
          \        ^,          R\        ^4      ,           \        ) ^,          ^\        ^4      ,           \        \        ^^4      ,          /# )ry   r   r%   r   r   rL   r6   r4   _atan_table(InverseTrigonometricFunction._atan_table  s3    GAIr!td1gIr!tGRTGaKAQK"QQKHQN*QtAwYAQtAwYHQN!2QtAwYq[!2b5QtAwYq[!2hq"o#5QKBaL2#b&QKHQO+
 	
r6   c                 	   / ^\        ^4      ,          ^,          \        ^,          b\        ^4      \        ^,          b\        ^^\        ^4      ,          ^,          ,           4      \        ^,          b^\        \        ^^4      \        ^4      ^,          ,
          4      ,          \        ^,          b\        ^^\        ^4      ,          ^,          ,
          4      \        \        ^^4      ,          b^\        \        ^^4      \        ^4      ^,          ,           4      ,          \        \        ^^4      ,          b^\        ^,          b\        ^^\        ^4      ,          ,           4      \        ^,          b^\        ^\        ^4      ,
          4      ,          \        ^,          b\        ^^\        ^4      ,          ,
          4      \        \        ^^4      ,          b^\        ^\        ^4      ,           4      ,          \        \        ^^4      ,          b^\        ^4      ,           \        ^
,          b\        ^4      ^,
          \        \        ^^
4      ,          b\        ^4      ^,
          ) \        \        R^
4      ,          b\        ^4      \        ^4      ,           \        ^,          b\        ^4      \        ^4      ,
          \        \        ^^4      ,          b\        ^4      \        ^4      ,
          ) \        \        R^4      ,          b# )r   r,  rL   r6   r4   _acsc_table(InverseTrigonometricFunction._acsc_table$  sP   

d1gIaKA
GRT
 QtAwYq[!2a4
 d8Aq>DGAI-..1	

 QtAwYq[!2hq!n#4
 d8Aq>DGAI-..8Aq>0A
 r!t
 QtAwYA
 d1tAw;A
 QtAwYHQN!2
 d1tAw;HQN!2
 QKB
 GaKHQO+
 1gkNBxB//
 Gd1gr"u
  Gd1gr(1b/1!
" 1gQ "Xb"%5"5#
 	
r6   rL   N)rn   ro   rp   rq   rr   r   r   r   rW   rt   ru   r  r  r   r)  r-  r2  rv   rL   r6   r4   r'  r'    s}    9()q}}affaFWFW'XN$X
  
8 
  
& 
  
r6   r'  c                     a  ] tR tRtRtRR ltR tR tR t]	R 4       t
]]R 4       4       tR	 tRV 3R
 lltR tR tR t]tR tR tR tR tRR ltRtV ;t# )r   i>  a  
The inverse sine function.

Returns the arcsine of x in radians.

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

``asin(x)`` will evaluate automatically in the cases
$x \in \{\infty, -\infty, 0, 1, -1\}$ and for some instances when the
result is a rational multiple of $\pi$ (see the ``eval`` class method).

A purely imaginary argument will lead to an asinh expression.

Examples
========

>>> from sympy import asin, oo
>>> asin(1)
pi/2
>>> asin(-1)
-pi/2
>>> asin(-oo)
oo*I
>>> asin(oo)
-oo*I

See Also
========

sin, csc, cos, sec, tan, cot
acsc, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
.. [2] https://dlmf.nist.gov/4.23
.. [3] https://functions.wolfram.com/ElementaryFunctions/ArcSin

c                	    V^8X  d2   ^\        ^V P                  ^ ,          ^,          ,
          4      ,          # \        W4      hr   r%   r<   r   r   s   &&r4   r   
asin.fdiffi  s5    q=T!diilAo-...$T44r6   c                	    V P                   ! V P                  !  pVP                   V P                   8X  d(   VP                  ^ ,          P                  '       d   R# R# VP                  # r:   r;   r<   r=   r?   s   & r4   rB   asin._eval_is_rationalo  L    IItyy!66TYYvvay$$$ % == r6   c                	l    V P                  4       ;'       d    V P                  ^ ,          P                  # r@  )ro  r<   is_positiverC  s   &r4   _eval_is_positiveasin._eval_is_positivew  '    **,II11I1IIr6   c                	l    V P                  4       ;'       d    V P                  ^ ,          P                  # r@  )ro  r<   re  rC  s   &r4   _eval_is_negativeasin._eval_is_negativez  r@  r6   c                	   VP                   '       d   V\        P                  J d   \        P                  # V\        P                  J d&   \        P                  \        P
                  ,          # V\        P                  J d&   \        P                  \        P
                  ,          # VP                  '       d   \        P                  # V\        P                  J d   \        ^,          # V\        P                  J d   \        ) ^,          # V\        P                  J d   \        P                  # VP                  4       '       d   V ! V) 4      ) # VP                  '       d   V P                  4       pW9   d	   W!,          # \        V4      pVe$   ^ RIHp \        P
                  V! V4      ,          # VP                  '       d   \        P                  # \%        V\&        4      '       d   VP(                  ^ ,          pVP*                  '       do   V^\        ,          ,          pV\        8  d   \        V,
          pV\        ^,          8  d   \        V,
          pV\        ) ^,          8  d   \        ) V,
          pV# \%        V\,        4      '       dE   VP(                  ^ ,          pVP*                  '       d   \        ^,          \/        V4      ,
          # R# R# )r   N)asinh)r   r   r   r   r   r3   r>   rW   r   r   r   rt   r   	is_numberr)  r5   r   rE  r1   r   r<   is_comparabler   r   )r   r   
asin_tabler   rE  angs   &&    r4   r   	asin.eval}  s   ===aee|uu

"))!//99***zz!//11vv!t%s1u!###$$$''))I:===*J !&05C??5>11;;;66Mc3((1+C   qt8s(C A:s(C"Q;#)C
c3((1+C   !td3i'' !  r6   c                	   V ^ 8  g   V ^,          ^ 8X  d   \         P                  # \        V4      p\        V4      ^8  dI   V ^8  dB   VR,          pW0^,
          ^,          ,          W ^,
          ,          ,          V^,          ,          # V ^,
          ^,          p\	        \         P
                  V4      p\        V4      pWV,          W,          ,          V ,          # r   )r   rW   r   r   r   r   r   r   r   r   r   r  Rr  s   &&*    r4   r   asin.taylor_term  s     q5AEQJ66M
A>"a'AE"2&a%!|QAY/144UqL#AFFA.aLs14xz!r6   c                	   V P                   ^ ,          pVP                  V^ 4      P                  4       pV\        P                  J d!   V P                  VP                  V4      4      # VP                  '       d   VP                  V4      # V\        P                  ) \        P                  \        P                  39   d5   V P                  \        4      P                  WVR7      P                  4       # ^V^,          ,
          P                  '       d   TP                  Y'       d   TM^4      p\!        V4      P                  '       d1   VP                  '       d   \"        ) V P                  V4      ,
          # M~\!        V4      P$                  '       d0   VP$                  '       d   \"        V P                  V4      ,
          # M4V P                  \        4      P                  WVR7      P                  4       # V P                  V4      # r   r  )r<   r   rb  r   r   r;   rc  r>   r   rt   r   r"   rj  rV   re  r`  r    r   r=  r@   r   r   r   r   rh  ndirs   &&&&   r4   rj  asin._eval_as_leading_term  st   iilXXa^""$;99S00344:::&&q)) 155&!%%!2!233<<$::1d:SZZ\\AI"""771dd2D$x###>>>32.. "D%%%>>>		"-- " ||C(>>qRV>W^^``yy}r6   c                	T	  < ^ RI Hp V P                  ^ ,          P                  V^ 4      pV\        P
                  J Ed   \        RRR7      p\        \        P
                  V^,          ,
          4      P                  \        4      P                  V^ ^V,          4      p\        P
                  V P                  ^ ,          ,
          p	V	P                  V4      p
W,
          V
,          pVP                  V^ 4      '       g3   V^ 8X  d	   V! ^4      # \        ^,          V! \        V4      4      ,           # \        \        P
                  V,           4      P                  WVR7      pVP!                  4       \        V
4      ,          P#                  4       pVP!                  4       P                  W}4      P#                  4       P%                  4       V! W,          V4      ,           # V\        P&                  J Ed   \        RRR7      p\        \        P&                  V^,          ,           4      P                  \        4      P                  V^ ^V,          4      p\        P
                  V P                  ^ ,          ,           p	V	P                  V4      p
W,
          V
,          pVP                  V^ 4      '       g4   V^ 8X  d	   V! ^4      # \        ) ^,          V! \        V4      4      ,           # \        \        P
                  V,           4      P                  WVR7      pVP!                  4       \        V
4      ,          P#                  4       pVP!                  4       P                  W}4      P#                  4       P%                  4       V! W,          V4      ,           # \(        SV `=  WVR7      pV\        P*                  J d   V# ^V^,          ,
          P,                  '       d   V P                  ^ ,          P/                  Y'       d   TM^4      p\1        V4      P,                  '       d$   VP,                  '       d   \        ) V,
          #  V# \1        V4      P2                  '       d#   VP2                  '       d   \        V,
          #  V# V P                  \        4      P                  WW4R7      # V# r   )Or  T)positiver  r  )sympy.series.orderrV  r<   r   r   r   r   r   r   r"   nseriesrc  is_meromorphicr   r%   r   removeOrV   powsimpr   r   rt   re  r`  r    r=  r@   r   r   r   r   rV  arg0r  serarg1rf   rg   res1resrR  r   s   &&&&&          r4   r   asin._eval_nseries  s\   (yy|  A&155=cD)Aquuq!t|$,,S199!Q!DC55499Q<'D$$Q'AAA##Aq)) Avqt<2a4!DG*+<<	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MM1== cD)Aq}}q!t+,44S9AA!Q!LC55499Q<'D$$Q'AAA##Aq)) Avqt=B3q51T!W:+==	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MMg#A#61$$$JaK$$$99Q<##Att;D$x######39$ $ 
 D%%%###8O $ 
 ||C(66q$6RR
r6   c                	<    \         ^,          \        V4      ,
          # r   r   r   r  s   &&,r4   _eval_rewrite_as_acosasin._eval_rewrite_as_acos	      !td1g~r6   c           
     	p    ^\        V^\        ^V^,          ,
          4      ,           ,          4      ,          # r   )r   r%   r  s   &&,r4   _eval_rewrite_as_atanasin._eval_rewrite_as_atan	  s(    aT!ad(^+,---r6   c           	     	    \         P                  ) \        \         P                  V,          \        ^V^,          ,
          4      ,           4      ,          # r   r   r3   r"   r%   r  s   &&,r4   _eval_rewrite_as_logasin._eval_rewrite_as_log	  s3    AOOA$5QAX$F GGGr6   c           	     	p    ^\        ^\        ^V^,          ,
          4      ,           V,          4      ,          # r   )r   r%   r	  s   &&,r4   _eval_rewrite_as_acotasin._eval_rewrite_as_acot	  s)    q4CF
++S0111r6   c                	J    \         ^,          \        ^V,          4      ,
          # r   r   r   r	  s   &&,r4   _eval_rewrite_as_asecasin._eval_rewrite_as_asec	      !td1S5k!!r6   c                	&    \        ^V,          4      # r   )r   r	  s   &&,r4   _eval_rewrite_as_acscasin._eval_rewrite_as_acsc	      AcE{r6   c                	    V P                   ^ ,          pVP                  ;'       d    ^\        V4      ,
          P                  # r@  r<   rU   ra   is_nonnegativer@   r   s   & r4   ro  asin._eval_is_extended_real	  1    IIaL!!AAq3q6z&A&AAr6   c                    \         # r  r  r   s   &&r4   r  asin.inverse 	  	     
r6   rL   r   r@  )rn   ro   rp   rq   rr   r   rB   r>  rB  r  r   r  r   r   rj  r   rf  rj  rn  _eval_rewrite_as_tractablerq  ru  ry  ro  r  rv   r  r  s   @r4   r   r   >  s    (T5!JJ 4( 4(l "  "0*X.H "62"B r6   r   c                     a  ] tR tRtRtRR ltR t]R 4       t]	]
R 4       4       tR tR tR	 tRV 3R
 lltR t]tR tR tRR ltR tR tR tR tRtV ;t# )r   i'	  aF  
The inverse cosine function.

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

Returns the arc cosine of x (measured in radians).

``acos(x)`` will evaluate automatically in the cases
$x \in \{\infty, -\infty, 0, 1, -1\}$ and for some instances when
the result is a rational multiple of $\pi$ (see the eval class method).

``acos(zoo)`` evaluates to ``zoo``
(see note in :class:`sympy.functions.elementary.trigonometric.asec`)

A purely imaginary argument will be rewritten to asinh.

Examples
========

>>> from sympy import acos, oo
>>> acos(1)
0
>>> acos(0)
pi/2
>>> acos(oo)
oo*I

See Also
========

sin, csc, cos, sec, tan, cot
asin, acsc, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
.. [2] https://dlmf.nist.gov/4.23
.. [3] https://functions.wolfram.com/ElementaryFunctions/ArcCos

c                	    V^8X  d2   R\        ^V P                  ^ ,          ^,          ,
          4      ,          # \        W4      hr   r   r6  r   s   &&r4   r   
acos.fdiffS	  s5    q=d1tyy|Q.///$T44r6   c                	    V P                   ! V P                  !  pVP                   V P                   8X  d(   VP                  ^ ,          P                  '       d   R# R# VP                  # r:   r9  r?   s   & r4   rB   acos._eval_is_rationalY	  r;  r6   c                	>   VP                   '       d   V\        P                  J d   \        P                  # V\        P                  J d&   \        P                  \        P                  ,          # V\        P
                  J d&   \        P
                  \        P                  ,          # VP                  '       d   \        ^,          # V\        P                  J d   \        P                  # V\        P                  J d   \        # V\        P                  J d   \        P                  # VP                  '       dT   V P                  4       pW9   d   \        ^,          W!,          ,
          # V) V9   d   \        ^,          W!) ,          ,           # \        V4      pVe   \        ^,          \        V4      ,
          # VP                   '       dI   \#        VP$                  4      ^8X  d/   VP$                  ^ ,          R8X  d   VP$                  ^,          pRpMTpRp\'        V\(        4      '       dp   VP$                  ^ ,          pVP*                  '       dK   V'       d   \        V,
          pV^\        ,          ,          pV\        8  d   ^\        ,          V,
          pV# \'        V\,        4      '       dj   VP$                  ^ ,          pVP*                  '       dC   V'       d   \        ^,          \        V4      ,           # \        ^,          \        V4      ,
          # R# R# )r   NTFr   )r   r   r   r   r3   r   r>   r   r   rW   r   rt   rF  r)  r5   r   r_   r   r<   r1   r   rG  r   )r   r   rH  r   r   minusrI  s   &&     r4   r   	acos.evala	  s   ===aee|uu

"zz!//11***))!//99!tvv%	!###$$$===*J !tjo--#!tj...05a4$s)##:::#chh-1,!1B88A;DEDEdC  ))A,C   s(Cqt8B$*C
dC  ))A,C   a4$t*,,!td4j(( ! !r6   c                	   V ^ 8X  d   \         ^,          # V ^ 8  g   V ^,          ^ 8X  d   \        P                  # \        V4      p\	        V4      ^8  dI   V ^8  dB   VR,          pW0^,
          ^,          ,          W ^,
          ,          ,          V^,          ,          # V ^,
          ^,          p\        \        P                  V4      p\        V4      pV) V,          W,          ,          V ,          # r   )r   r   rW   r   r   r   r   r   rL  s   &&*    r4   r   acos.taylor_term	  s     6a4KUa!eqj66M
A>"a'AE"2&a%!|QAY/144UqL#AFFA.aLr!tADy{"r6   c                	   V P                   ^ ,          pVP                  V^ 4      P                  4       pV\        P                  J d!   V P                  VP                  V4      4      # V^8X  d@   \        ^4      \        \        P                  V,
          P                  V4      4      ,          # V\        P                  ) \        P                  39   d'   V P                  \        4      P                  WVR7      # ^V^,          ,
          P                  '       d   TP                  Y'       d   TM^4      p\        V4      P                  '       d7   VP                  '       d$   ^\         ,          V P                  V4      ,
          # Mt\        V4      P"                  '       d&   VP"                  '       d   V P                  V4      ) # M4V P                  \        4      P                  WVR7      P%                  4       # V P                  V4      # rP  )r<   r   rb  r   r   r;   rc  r%   r   rt   r   r"   rj  re  r`  r    r   r=  rV   rQ  s   &&&&   r4   rj  acos._eval_as_leading_term	  sv   iilXXa^""$;99S00344774 = =a @AAA155&!++,,<<$::1d:SSAI"""771dd2D$x###>>>R4$))B-// "D%%%>>> IIbM>) " ||C(>>qRV>W^^``yy}r6   c                	    V P                   ^ ,          pVP                  ;'       d    ^\        V4      ,
          P                  # r@  r}  r  s   & r4   ro  acos._eval_is_extended_real	  r  r6   c                	"    V P                  4       # rm   )ro  rC  s   &r4   _eval_is_nonnegativeacos._eval_is_nonnegative	  s    **,,r6   c                		  < ^ RI Hp V P                  ^ ,          P                  V^ 4      pV\        P
                  J Ed   \        RRR7      p\        \        P
                  V^,          ,
          4      P                  \        4      P                  V^ ^V,          4      p\        P
                  V P                  ^ ,          ,
          p	V	P                  V4      p
W,
          V
,          pVP                  V^ 4      '       g!   V^ 8X  d	   V! ^4      # V! \        V4      4      # \        \        P
                  V,           4      P                  WVR7      pVP                  4       \        V
4      ,          P!                  4       pVP                  4       P                  W}4      P!                  4       P#                  4       V! W,          V4      ,           # V\        P$                  J Ed   \        RRR7      p\        \        P$                  V^,          ,           4      P                  \        4      P                  V^ ^V,          4      p\        P
                  V P                  ^ ,          ,           p	V	P                  V4      p
W,
          V
,          pVP                  V^ 4      '       g,   V^ 8X  d	   V! ^4      # \&        V! \        V4      4      ,           # \        \        P
                  V,           4      P                  WVR7      pVP                  4       \        V
4      ,          P!                  4       pVP                  4       P                  W}4      P!                  4       P#                  4       V! W,          V4      ,           # \(        SV `9  WVR7      pV\        P*                  J d   V# ^V^,          ,
          P,                  '       d   V P                  ^ ,          P/                  Y'       d   TM^4      p\1        V4      P,                  '       d*   VP,                  '       d   ^\&        ,          V,
          #  V# \1        V4      P2                  '       d   VP2                  '       d   V) #  V# V P                  \        4      P                  WW4R7      # V# rU  )rX  rV  r<   r   r   r   r   r   r   r"   rY  rc  rZ  r%   r   r[  rV   r\  r   r   r   rt   re  r`  r    r=  r]  s   &&&&&          r4   r   acos._eval_nseries	  sL   (yy|  A&155=cD)Aquuq!t|$,,S199!Q!DC55499Q<'D$$Q'AAA##Aq)) Avqt51T!W:5	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MM1== cD)Aq}}q!t+,44S9AA!Q!LC55499Q<'D$$Q'AAA##Aq)) Avqt:2$q'
?:	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MMg#A#61$$$JaK$$$99Q<##Att;D$x######R4#:% $ 
 D%%%###4K $ 
 ||C(66q$6RR
r6   c           
     	    \         ^,          \        P                  \        \        P                  V,          \	        ^V^,          ,
          4      ,           4      ,          ,           # r   r   r   r3   r"   r%   r  s   &&,r4   rn  acos._eval_rewrite_as_log	  s@    !taoo!DQTN234 4 	4r6   c                	<    \         ^,          \        V4      ,
          # r   r   r   r  s   &&,r4   _eval_rewrite_as_asinacos._eval_rewrite_as_asin	  rh  r6   c           	     	    \        \        ^V^,          ,
          4      V,          4      \        ^,          ^V\        ^V^,          ,          4      ,          ,
          ,          ,           # r   )r   r%   r   r  s   &&,r4   rj  acos._eval_rewrite_as_atan	  sA    DQTN1$%AAd1QT6lN0B(CCCr6   c                    \         # r  r  r   s   &&r4   r  acos.inverse 
  r  r6   c           
     	    \         ^,          ^\        ^\        ^V^,          ,
          4      ,           V,          4      ,          ,
          # r   )r   r   r%   r	  s   &&,r4   rq  acos._eval_rewrite_as_acot
  s2    !taa$q36z"22C78888r6   c                	&    \        ^V,          4      # r   )r   r	  s   &&,r4   ru  acos._eval_rewrite_as_asec	
  r{  r6   c                	J    \         ^,          \        ^V,          4      ,
          # r   r   r   r	  s   &&,r4   ry  acos._eval_rewrite_as_acsc
  rw  r6   c                	D   V P                   ^ ,          pV P                  V P                   ^ ,          P                  4       4      pVP                  RJ d   V# VP                  '       d9   V^,           P                  '       d   V^,
          P
                  '       d   V# R# R# R# r:   )r<   r;   rB  rU   r~  is_nonpositive)r@   r  rs   &  r4   rD  acos._eval_conjugate
  s}    IIaLIIdiil,,./&HQU$:$:$:A?U?U?UH @V$:r6   rL   r   r@  )rn   ro   rp   rq   rr   r   rB   r  r   r  r   r   rj  ro  r  r   rn  r  r  rj  r  rq  ru  ry  rD  rv   r  r  s   @r4   r   r   '	  s    )V5! 4) 4)l #  # .B-*X4 "6D9" r6   r   c                    a  ] tR tRt$ RtR]R&   ]P                  ]P                  ) 3tRR lt	R t
R tR tR	 tR
 t]R 4       t]]R 4       4       tR tRV 3R lltR t]tV 3R ltRR ltR tR tR tR tR tRtV ;t # )r   i
  a  
The inverse tangent function.

Returns the arc tangent of x (measured in radians).

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

``atan(x)`` will evaluate automatically in the cases
$x \in \{\infty, -\infty, 0, 1, -1\}$ and for some instances when the
result is a rational multiple of $\pi$ (see the eval class method).

Examples
========

>>> from sympy import atan, oo
>>> atan(0)
0
>>> atan(1)
pi/4
>>> atan(oo)
pi/2

See Also
========

sin, csc, cos, sec, tan, cot
asin, acsc, acos, asec, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
.. [2] https://dlmf.nist.gov/4.23
.. [3] https://functions.wolfram.com/ElementaryFunctions/ArcTan

ztuple[Expr]r<   c                	v    V^8X  d)   ^^V P                   ^ ,          ^,          ,           ,          # \        W4      hr   r<   r   r   s   &&r4   r   
atan.fdiffC
  s0    q=a$))A,/)**$T44r6   c                	    V P                   ! V P                  !  pVP                   V P                   8X  d(   VP                  ^ ,          P                  '       d   R# R# VP                  # r:   r9  r?   s   & r4   rB   atan._eval_is_rationalI
  r;  r6   c                	<    V P                   ^ ,          P                  # r@  )r<   is_extended_positiverC  s   &r4   r>  atan._eval_is_positiveQ
  s    yy|000r6   c                	<    V P                   ^ ,          P                  # r@  )r<   is_extended_nonnegativerC  s   &r4   r  atan._eval_is_nonnegativeT
  s    yy|333r6   c                	<    V P                   ^ ,          P                  # r@  )r<   r>   rC  s   &r4   r{  atan._eval_is_zeroW
  s    yy|###r6   c                	<    V P                   ^ ,          P                  # r@  rn  rC  s   &r4   rD  atan._eval_is_realZ
  r~  r6   c                	F   VP                   '       d   V\        P                  J d   \        P                  # V\        P                  J d   \        ^,          # V\        P
                  J d   \        ) ^,          # VP                  '       d   \        P                  # V\        P                  J d   \        ^,          # V\        P                  J d   \        ) ^,          # V\        P                  J d'   ^ RIHp V! \        ) ^,          \        ^,          4      # VP                  4       '       d   V ! V) 4      ) # VP                  '       d   V P                  4       pW9   d	   W1,          # \!        V4      pVe$   ^ RIHp \        P&                  V! V4      ,          # VP                  '       d   \        P                  # \)        V\*        4      '       dT   VP,                  ^ ,          pVP.                  '       d/   V\        ,          pV\        ^,          8  d   V\        ,          pV# \)        V\0        4      '       df   VP,                  ^ ,          pVP.                  '       d?   \        ^,          \3        V4      ,
          pV\        ^,          8  d   V\        ,          pV# R# R# )r   r   N)atanh)r   r   r   r   r   r   r>   rW   r   r   rt   r   r   r   rF  r-  r5   r   r  r3   r1   r  r<   rG  r  r   )r   r   r   
atan_tabler   r  rI  s   &&     r4   r   	atan.eval]
  s   ===aee|uu

"!t***s1uvv!t%s1u!###Es1ubd++''))I:===*J !&05C??5>11;;;66Mc3((1+C   r	A:2IC
c3((1+C   dT#Y&A:2IC
	 !  r6   c                	    V ^ 8  g   V ^,          ^ 8X  d   \         P                  # \        V4      p\         P                  V ^,
          ^,          ,          W,          ,          V ,          # r@  )r   rW   r   r   r   r   r   s   &&*r4   r   atan.taylor_term
  sJ     q5AEQJ66M
A==AEA:.qt3A55r6   c                	4   V P                   ^ ,          pVP                  V^ 4      P                  4       pV\        P                  J d!   V P                  VP                  V4      4      # VP                  '       d   VP                  V4      # V\        P                  ) \        P                  \        P                  39   d5   V P                  \        4      P                  WVR7      P                  4       # ^V^,          ,           P                  '       d   TP                  Y'       d   TM^4      p\!        V4      P                  '       d9   \#        V4      P$                  '       d   V P                  V4      \&        ,
          # M\!        V4      P$                  '       d9   \#        V4      P                  '       d   V P                  V4      \&        ,           # M4V P                  \        4      P                  WVR7      P                  4       # V P                  V4      # rP  )r<   r   rb  r   r   r;   rc  r>   r3   rt   r   r"   rj  rV   re  r`  r!   r    r=  r   rQ  s   &&&&   r4   rj  atan._eval_as_leading_term
  s   iilXXa^""$;99S00344:::&&q))1??"AOOQ5F5FGG<<$::1d:SZZ\\AI"""771dd2D$x###b6%%%99R=2-- &D%%%b6%%%99R=2-- & ||C(>>qRV>W^^``yy}r6   c                	  < V P                   ^ ,          P                  V^ 4      pV\        P                  \        P                  \        P                  ,          39   d'   V P                  \        4      P                  WW4R7      # \        SV `  WVR7      pV P                   ^ ,          P                  Y'       d   TM^4      pV\        P                  J d    \        V4      ^ 8  d   V\        ,
          # V# ^V^,          ,           P                  '       d   \        V4      P                  '       d,   \        V4      P                  '       d   V\        ,
          #  V# \        V4      P                  '       d,   \        V4      P                  '       d   V\        ,           #  V# V P                  \        4      P                  WW4R7      # V# r   r  r  )r<   r   r   r3   r   r   r"   r   r   r`  rt   r!   r   re  r    r=  	r@   r   r   r   r   r^  rb  rR  r   s	   &&&&&   r4   r   atan._eval_nseries
  s[   yy|  A& AOOQ]]1??%BCC<<$221d2NNg#A#6yy|44Q71$$$$x!|RxJaK$$$$x###d8'''8O ( 
 D%%%d8'''8O ( 
 ||C(66q$6RR
r6   c                	   \         P                  ^,          \        \         P                  \         P                  V,          ,
          4      \        \         P                  \         P                  V,          ,           4      ,
          ,          # r   )r   r3   r"   r   r  s   &&,r4   rn  atan._eval_rewrite_as_log
  sP    q #aeeaooa.?&?"@!%%!//!++,#- . 	.r6   c                	  < V^ ,          \         P                  \         P                  39   dF   \        ^,          \	        ^V P
                  ^ ,          ,          4      ,
          P                  W1V4      # \        SV `!  WW44      # r@  )	r   r   r   r   r   r<   r   r   _eval_aseriesr@   r   args0r   r   r   s   &&&&&r4   r  atan._eval_aseries
  s]    8

A$6$677qD4$))A,//>>qTJJ7(1;;r6   c                    \         # r  rm  r   s   &&r4   r  atan.inverse
  r  r6   c           
     	    \        V^,          4      V,          \        ^,          \        ^\        ^V^,          ,           4      ,          4      ,
          ,          # r   r%   r   r   r	  s   &&,r4   r  atan._eval_rewrite_as_asin
  s:    CF|CAQtAQJ/?-?(@!@AAr6   c           	     	    \        V^,          4      V,          \        ^\        ^V^,          ,           4      ,          4      ,          # r   r%   r   r	  s   &&,r4   rf  atan._eval_rewrite_as_acos
  s1    CF|CQtAQJ'7%7 888r6   c                	&    \        ^V,          4      # r   rS  r	  s   &&,r4   rq  atan._eval_rewrite_as_acot
  r{  r6   c                	    \        V^,          4      V,          \        \        ^V^,          ,           4      4      ,          # r   r%   r   r	  s   &&,r4   ru  atan._eval_rewrite_as_asec
  s,    CF|CT!c1f*%5 666r6   c           	     	    \        V^,          4      V,          \        ^,          \        \        ^V^,          ,           4      4      ,
          ,          # r   r%   r   r   r	  s   &&,r4   ry  atan._eval_rewrite_as_acsc
  s5    CF|CAT!c1f*-=(>!>??r6   rL   r   r@  )!rn   ro   rp   rq   rr   r  r   r3   ru   r   rB   r>  r  r{  rD  r  r   r  r   r   rj  r   rn  r  r  r  r  rf  rq  ru  ry  rv   r  r  s   @r4   r   r   
  s    $L oo'78N5!14$- 2 2h 6  6.2. "6<B97@ @r6   r   c                     a  ] tR tRtRt]P                  ]P                  ) 3tRR ltR t	R t
R tR t]R 4       t]]R	 4       4       tR
 tRV 3R lltV 3R ltR t]tRR ltR tR tR tR tR tRtV ;t# )r   i
  aV  
The inverse cotangent function.

Returns the arc cotangent of x (measured in radians).

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

``acot(x)`` will evaluate automatically in the cases
$x \in \{\infty, -\infty, \tilde{\infty}, 0, 1, -1\}$
and for some instances when the result is a rational multiple of $\pi$
(see the eval class method).

A purely imaginary argument will lead to an ``acoth`` expression.

``acot(x)`` has a branch cut along $(-i, i)$, hence it is discontinuous
at 0. Its range for real $x$ is $(-\frac{\pi}{2}, \frac{\pi}{2}]$.

Examples
========

>>> from sympy import acot, sqrt
>>> acot(0)
pi/2
>>> acot(1)
pi/4
>>> acot(sqrt(3) - 2)
-5*pi/12

See Also
========

sin, csc, cos, sec, tan, cot
asin, acsc, acos, asec, atan, atan2

References
==========

.. [1] https://dlmf.nist.gov/4.23
.. [2] https://functions.wolfram.com/ElementaryFunctions/ArcCot

c                	v    V^8X  d)   R^V P                   ^ ,          ^,          ,           ,          # \        W4      hr  r  r   s   &&r4   r   
acot.fdiff  s0    q=q499Q<?*++$T44r6   c                	    V P                   ! V P                  !  pVP                   V P                   8X  d(   VP                  ^ ,          P                  '       d   R# R# VP                  # r:   r9  r?   s   & r4   rB   acot._eval_is_rational   r;  r6   c                	<    V P                   ^ ,          P                  # r@  )r<   r~  rC  s   &r4   r>  acot._eval_is_positive(  s    yy|***r6   c                	<    V P                   ^ ,          P                  # r@  )r<   re  rC  s   &r4   rB  acot._eval_is_negative+  s    yy|'''r6   c                	<    V P                   ^ ,          P                  # r@  rn  rC  s   &r4   ro  acot._eval_is_extended_real.  r~  r6   c                	   VP                   '       d   V\        P                  J d   \        P                  # V\        P                  J d   \        P                  # V\        P
                  J d   \        P                  # VP                  '       d   \        ^,          # V\        P                  J d   \        ^,          # V\        P                  J d   \        ) ^,          # V\        P                  J d   \        P                  # VP                  4       '       d   V ! V) 4      ) # VP                  '       dR   V P                  4       pW9   d<   \        ^,          W!,          ,
          pV\        ^,          8  d   V\        ,          pV# \        V4      pVe%   ^ RIHp \        P"                  ) V! V4      ,          # VP                  '       d   \        \        P$                  ,          # \'        V\(        4      '       dT   VP*                  ^ ,          pVP,                  '       d/   V\        ,          pV\        ^,          8  d   V\        ,          pV# \'        V\.        4      '       df   VP*                  ^ ,          pVP,                  '       d?   \        ^,          \1        V4      ,
          pV\        ^,          8  d   V\        ,          pV# R# R# )r   N)acoth)r   r   r   r   rW   r   r>   r   r   r   rt   r   rF  r-  r5   r   r  r3   r   r1   r  r<   rG  r  r   )r   r   r  rI  r   r  s   &&    r4   r   	acot.eval1  s   ===aee|uu

"vv***vv1u!t%s1u!###66M''))I:===*J dZ_,A:2IC
05COO#E'N22;;;aff9c3((1+C   r	A:2IC
c3((1+C   dT#Y&A:2IC
	 !  r6   c                	    V ^ 8X  d   \         ^,          # V ^ 8  g   V ^,          ^ 8X  d   \        P                  # \        V4      p\        P                  V ^,           ^,          ,          W,          ,          V ,          # r@  )r   r   rW   r   r   r  s   &&*r4   r   acot.taylor_termg  sZ     6a4KUa!eqj66M
A==AEA:.qt3A55r6   c                	l   V P                   ^ ,          pVP                  V^ 4      P                  4       pV\        P                  J d!   V P                  VP                  V4      4      # V\        P                  J d   ^V,          P                  V4      # V\        P                  ) \        P                  \        P                  39   d5   V P                  \        4      P                  WVR7      P                  4       # VP                  '       Ed   ^V^,          ,           P                  '       d   TP!                  Y'       d   TM^4      p\#        V4      P                  '       d9   \%        V4      P                  '       d   V P                  V4      \&        ,           # M\#        V4      P(                  '       d9   \%        V4      P(                  '       d   V P                  V4      \&        ,
          # M4V P                  \        4      P                  WVR7      P                  4       # V P                  V4      # rP  )r<   r   rb  r   r   r;   rc  rt   r3   rW   r   r"   rj  rV   rG  r=  r`  r!   r    r   re  rQ  s   &&&&   r4   rj  acot._eval_as_leading_termr  s   iilXXa^""$;99S00344"""cE**1--1??"AOOQVV<<<<$::1d:SZZ\\???BE	666771dd2D$x###b6%%%99R=2-- &D%%%b6%%%99R=2-- & ||C(>>qRV>W^^``yy}r6   c                	  < V P                   ^ ,          P                  V^ 4      pV\        P                  \        P                  \        P                  ,          39   d'   V P                  \        4      P                  WW4R7      # \        SV `  WVR7      pV\        P                  J d   V# V P                   ^ ,          P                  Y'       d   TM^4      pVP                  '       d    \        V4      ^ 8  d   V\        ,
          # V# VP                  '       d   ^V^,          ,           P                  '       d   \        V4      P                  '       d,   \!        V4      P                  '       d   V\        ,           #  V# \        V4      P"                  '       d,   \!        V4      P"                  '       d   V\        ,
          #  V# V P                  \        4      P                  WW4R7      # V# r  )r<   r   r   r3   r   r   r"   r   r   rt   r`  r>   r!   r   rG  r=  r    re  r  s	   &&&&&   r4   r   acot._eval_nseries  st   yy|  A& AOOQ]]1??%BCC<<$221d2NNg#A#61$$$Jyy|44Q7<<<$x!|RxJ!dAg+!:!:!:$x###d8'''8O ( 
 D%%%d8'''8O ( 
 ||C(66q$6RR
r6   c                	   < V^ ,          \         P                  \         P                  39   d4   \        ^V P                  ^ ,          ,          4      P                  W1V4      # \        SV `  WW44      # r@  )r   r   r   r   r<   r   r   r  r  s   &&&&&r4   r  acot._eval_aseries  sT    8

A$6$677$))A,'55aDAA7(1;;r6   c                	    \         P                  ^,          \        ^\         P                  V,          ,
          4      \        ^\         P                  V,          ,           4      ,
          ,          # r   )r   r3   r"   r  s   &&,r4   rn  acot._eval_rewrite_as_log  sH    q #a!//!*;&;"<!aooa''(#) * 	*r6   c                    \         # r  r!  r   s   &&r4   r  acot.inverse  r  r6   c           	     	    V\        ^V^,          ,          4      ,          \        ^,          \        \        V^,          ) 4      \        V^,          ) ^,
          4      ,          4      ,
          ,          # r   r  r	  s   &&,r4   r  acot._eval_rewrite_as_asin  sP    D36N"AT36']4a!+<<==? 	@r6   c                	    V\        ^V^,          ,          4      ,          \        \        V^,          ) 4      \        V^,          ) ^,
          4      ,          4      ,          # r   r  r	  s   &&,r4   rf  acot._eval_rewrite_as_acos  sA    4#q&>!$tS!VG}T36'A+5F'F"GGGr6   c                	&    \        ^V,          4      # r   r  r	  s   &&,r4   rj  acot._eval_rewrite_as_atan  r{  r6   c                	    V\        ^V^,          ,          4      ,          \        \        ^V^,          ,           V^,          ,          4      4      ,          # r   r  r	  s   &&,r4   ru  acot._eval_rewrite_as_asec  s9    4#q&>!$tQaZa,?'@"AAAr6   c           	     	    V\        ^V^,          ,          4      ,          \        ^,          \        \        ^V^,          ,           V^,          ,          4      4      ,
          ,          # r   r  r	  s   &&,r4   ry  acot._eval_rewrite_as_acsc  sB    4#q&>!2a4$tQaZa4G/H*I#IJJr6   rL   r   r@  )rn   ro   rp   rq   rr   r   r3   ru   r   rB   r>  rB  ro  r  r   r  r   r   rj  r   r  rn  r  r  r  rf  rj  ru  ry  rv   r  r  s   @r4   r   r   
  s    )T oo'78N5!+(- 3 3j 6  6.6<* "6@HBK Kr6   r   c                     a  ] tR tRtRt]R 4       tRR ltRR lt]	]
R 4       4       tR tRV 3R lltR	 tR
 t]tR tR tR tR tR tRtV ;t# )r   i  a&  
The inverse secant function.

Returns the arc secant of x (measured in radians).

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

``asec(x)`` will evaluate automatically in the cases
$x \in \{\infty, -\infty, 0, 1, -1\}$ and for some instances when the
result is a rational multiple of $\pi$ (see the eval class method).

``asec(x)`` has branch cut in the interval $[-1, 1]$. For complex arguments,
it can be defined [4]_ as

.. math::
    \operatorname{sec^{-1}}(z) = -i\frac{\log\left(\sqrt{1 - z^2} + 1\right)}{z}

At ``x = 0``, for positive branch cut, the limit evaluates to ``zoo``. For
negative branch cut, the limit

.. math::
    \lim_{z \to 0}-i\frac{\log\left(-\sqrt{1 - z^2} + 1\right)}{z}

simplifies to :math:`-i\log\left(z/2 + O\left(z^3\right)\right)` which
ultimately evaluates to ``zoo``.

As ``acos(x) = asec(1/x)``, a similar argument can be given for
``acos(x)``.

Examples
========

>>> from sympy import asec, oo
>>> asec(1)
0
>>> asec(-1)
pi
>>> asec(0)
zoo
>>> asec(-oo)
pi/2

See Also
========

sin, csc, cos, sec, tan, cot
asin, acsc, acos, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
.. [2] https://dlmf.nist.gov/4.23
.. [3] https://functions.wolfram.com/ElementaryFunctions/ArcSec
.. [4] https://reference.wolfram.com/language/ref/ArcSec.html

c                	   VP                   '       d   \        P                  # VP                  '       dc   V\        P                  J d   \        P                  # V\        P
                  J d   \        P                  # V\        P                  J d   \        # V\        P                  \        P                  \        P                  39   d   \        ^,          # VP                  '       dT   V P                  4       pW9   d   \        ^,          W!,          ,
          # V) V9   d   \        ^,          W!) ,          ,           # VP                  '       d   \        ^,          # VP                  '       dI   \        VP                   4      ^8X  d/   VP                   ^ ,          R8X  d   VP                   ^,          pRpMTpRp\#        V\$        4      '       dp   VP                   ^ ,          pVP&                  '       dK   V'       d   \        V,
          pV^\        ,          ,          pV\        8  d   ^\        ,          V,
          pV# \#        V\(        4      '       dj   VP                   ^ ,          pVP&                  '       dC   V'       d   \        ^,          \+        V4      ,            \        ^,          \+        V4      ,
          # R# R# )r   TFNr   )r>   r   rt   r   r   r   rW   r   r   r   r   rF  r2  r!  r_   r   r<   r1   r/  rG  r)  r   )r   r   
acsc_tabler   r  rI  s   &&    r4   r   	asec.eval  s   ;;;$$$===aee|uuvv%	1::q1113D3DEEa4K===*J !tjo--#!tj...???a4K:::#chh-1,!1B88A;DEDEdC  ))A,C   s(Cqt8B$*C
dC  ))A,C   qD4:%!td4j(( ! !r6   c                	    V^8X  dX   ^V P                   ^ ,          ^,          \        ^^V P                   ^ ,          ^,          ,          ,
          4      ,          ,          # \        W4      hr   r<   r%   r   r   s   &&r4   r   
asec.fdiff4  sK    q=diilAod1q1q/@+@&AABB$T44r6   c                    \         # r  r  r   s   &&r4   r  asec.inverse:  r  r6   c                	   V ^ 8X  d(   \         P                  \        ^V,          4      ,          # V ^ 8  g   V ^,          ^8X  d   \         P                  # \	        V4      p\        V4      ^8  dX   V ^8  dQ   VR,          pW0^,
          V ^,
          ,          ,          V^,          ,          ^V ^,          ^,          ,          ,          # V ^,          p\        \         P                  V4      V ,          p\        V4      V ,          ^,          V ,          ^,          p\         P                  ) V,          V,          W,          ,          ^,          # r   )	r   r3   r"   rW   r   r   r   r   r   rL  s   &&*    r4   r   asec.taylor_term@  s     6??3q1u:--Ua!eqj66M
A>"Q&1q5"2&UQqSM*QT111qy=AAF#AFFA.!3aL1$)A-2'!+a/!$6::r6   c                	<   V P                   ^ ,          pVP                  V^ 4      P                  4       pV\        P                  J d!   V P                  VP                  V4      4      # V^8X  d@   \        ^4      \        V\        P                  ,
          P                  V4      4      ,          # V\        P                  ) \        P                  39   d'   V P                  \        4      P                  WVR7      # VP                  '       Ed   ^V^,          ,
          P                  '       d   TP                  Y'       d   TM^4      p\!        V4      P"                  '       d&   VP                  '       d   V P                  V4      ) # M\!        V4      P                  '       d7   VP"                  '       d$   ^\$        ,          V P                  V4      ,
          # M4V P                  \        4      P                  WVR7      P'                  4       # V P                  V4      # rP  )r<   r   rb  r   r   r;   rc  r%   r   rW   r   r"   rj  rC  r=  r`  r    re  r   rV   rQ  s   &&&&   r4   rj  asec._eval_as_leading_termR  s|   iilXXa^""$;99S00344774quu = =a @AAA155&!&&!!<<$::1d:SS:::1r1u9111771dd2D$x###>>> IIbM>) "D%%%>>>R4$))B-// " ||C(>>qRV>W^^``yy}r6   c                	F  < ^ RI Hp V P                  ^ ,          P                  V^ 4      pV\        P
                  J EdV   \        RRR7      p\        \        P
                  V^,          ,           4      P                  \        4      P                  V^ ^V,          4      p\        P                  V P                  ^ ,          ,           p	V	P                  V4      p
W,
          V
,          p\        \        P
                  V,           4      P                  WVR7      pVP                  4       \        V
4      ,          P!                  4       pVP                  4       P                  W}4      P!                  4       P#                  4       V! W,          V4      ,           # V\        P                  J EdV   \        RRR7      p\        \        P                  V^,          ,
          4      P                  \        4      P                  V^ ^V,          4      p\        P                  V P                  ^ ,          ,
          p	V	P                  V4      p
W,
          V
,          p\        \        P
                  V,           4      P                  WVR7      pVP                  4       \        V
4      ,          P!                  4       pVP                  4       P                  W}4      P!                  4       P#                  4       V! W,          V4      ,           # \$        SV `9  WVR7      pV\        P&                  J d   V# VP(                  '       d   ^V^,          ,
          P*                  '       d   V P                  ^ ,          P-                  Y'       d   TM^4      p\/        V4      P0                  '       d   VP*                  '       d   V) #  V# \/        V4      P*                  '       d*   VP0                  '       d   ^\2        ,          V,
          #  V# V P                  \        4      P                  WW4R7      # V# rU  )rX  rV  r<   r   r   r   r   r   r   r"   rY  r   rc  r%   r   r[  rV   r\  r   rt   rC  r=  r`  r    re  r   r]  s   &&&&&          r4   r   asec._eval_nseriesi  s   (yy|  A&155=cD)Aquuq!t|$,,S199!Q!DC==499Q</D$$Q'AAA	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MM1== cD)Aq}}q!t+,44S9AA!Q!LC==499Q</D$$Q'AAA	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MMg#A#61$$$J<<<Qq[55599Q<##Att;D$x######4K $ 
 D%%%###R4#:% $ 
 ||C(66q$6RR
r6   c                	    V P                   ^ ,          pVP                  RJ d   R# \        V^,
          P                  V) ^,
          P                  34      # )r   F)r<   rU   r   r~  r  s   & r4   ro  asec._eval_is_extended_real  sF    IIaL&!a%//1"q&1H1HIJJr6   c                	    \         ^,          \        P                  \        \        P                  V,          \	        ^^V^,          ,          ,
          4      ,           4      ,          ,           # r   r  r	  s   &&,r4   rn  asec._eval_rewrite_as_log  s?    !taooc!//#*=Q3PQ6\@R*R&SSSSr6   c                	J    \         ^,          \        ^V,          4      ,
          # r   r  r	  s   &&,r4   r  asec._eval_rewrite_as_asin  rw  r6   c                	&    \        ^V,          4      # r   )r   r	  s   &&,r4   rf  asec._eval_rewrite_as_acos  r{  r6   c                	    \        V^,          4      V,          p\        ^,          ^V,
          ,          V\        \        V^,          ^,
          4      4      ,          ,           # r   r%   r   r   r@   r   r   sx2xs   &&, r4   rj  asec._eval_rewrite_as_atan  s@    AqDz!|!tQXd41q>&:!:::r6   c           	     	    \        V^,          4      V,          p\        ^,          ^V,
          ,          V\        ^\        V^,          ^,
          4      ,          4      ,          ,           # r   r%   r   r   r!  s   &&, r4   rq  asec._eval_rewrite_as_acot  sE    AqDz!|!tQXd1T!Q$(^+;&<!<<<r6   c                	<    \         ^,          \        V4      ,
          # r   r  r	  s   &&,r4   ry  asec._eval_rewrite_as_acsc      !td3ir6   rL   r   r@  )rn   ro   rp   rq   rr   r  r   r   r  r  r   r   rj  r   ro  rn  r  r  rf  rj  rq  ry  rv   r  r  s   @r4   r   r     s    9v .) .)`5 ;  ; .&PKT "6";=   r6   r   c                     a  ] tR tRtRt]R 4       tRR ltRR lt]	]
R 4       4       tR tRV 3R lltR	 t]tR
 tR tR tR tR tRtV ;t# )r   i  a  
The inverse cosecant function.

Returns the arc cosecant of x (measured in radians).

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

``acsc(x)`` will evaluate automatically in the cases
$x \in \{\infty, -\infty, 0, 1, -1\}$` and for some instances when the
result is a rational multiple of $\pi$ (see the ``eval`` class method).

Examples
========

>>> from sympy import acsc, oo
>>> acsc(1)
pi/2
>>> acsc(-1)
-pi/2
>>> acsc(oo)
0
>>> acsc(-oo) == acsc(oo)
True
>>> acsc(0)
zoo

See Also
========

sin, csc, cos, sec, tan, cot
asin, acos, asec, atan, acot, atan2

References
==========

.. [1] https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
.. [2] https://dlmf.nist.gov/4.23
.. [3] https://functions.wolfram.com/ElementaryFunctions/ArcCsc

c                	   VP                   '       d   \        P                  # VP                  '       dh   V\        P                  J d   \        P                  # V\        P
                  J d   \        ^,          # V\        P                  J d   \        ) ^,          # V\        P                  \        P                  \        P                  39   d   \        P                  # VP                  4       '       d   V ! V) 4      ) # VP                  '       d   \        P                  # VP                  '       d   V P                  4       pW9   d	   W!,          # \        V\         4      '       d   VP"                  ^ ,          pVP$                  '       do   V^\        ,          ,          pV\        8  d   \        V,
          pV\        ^,          8  d   \        V,
          pV\        ) ^,          8  d   \        ) V,
          pV# \        V\&        4      '       dE   VP"                  ^ ,          pVP$                  '       d   \        ^,          \)        V4      ,
          # R# R# )r   N)r>   r   rt   r   r   r   r   r   r   r   rW   r   r!  rF  r2  r1   r)  r<   rG  r/  r   )r   r   r
  rI  s   &&  r4   r   	acsc.eval  s   ;;;$$$===aee|uu!t%s1u1::q1113D3DEE66M''))I:???66M===*J !&c3((1+C   qt8s(C A:s(C"Q;#)C
c3((1+C   !td3i'' !  r6   c                	    V^8X  dX   RV P                   ^ ,          ^,          \        ^^V P                   ^ ,          ^,          ,          ,
          4      ,          ,          # \        W4      hr  r  r   s   &&r4   r   
acsc.fdiff  sK    q=tyy|QtA$))A,/0A,A'BBCC$T44r6   c                    \         # r  r(  r   s   &&r4   r  acsc.inverse  r  r6   c                	   V ^ 8X  dX   \         ^,          \        P                  \        ^4      ,          ,
          \        P                  \        V4      ,          ,           # V ^ 8  g   V ^,          ^8X  d   \        P                  # \        V4      p\        V4      ^8  dX   V ^8  dQ   VR,          pW0^,
          V ^,
          ,          ,          V^,          ,          ^V ^,          ^,          ,          ,          # V ^,          p\        \        P                  V4      V ,          p\        V4      V ,          ^,          V ,          ^,          p\        P                  V,          V,          W,          ,          ^,          # r   )
r   r   r3   r"   rW   r   r   r   r   r   rL  s   &&*    r4   r   acsc.taylor_term  s    6a4!//#a&001??3q63IIIUa!eqj66M
A>"Q&1q5"2&UQqSM*QT111qy=AAF#AFFA.!3aL1$)A-2*Q.599r6   c                	J   V P                   ^ ,          pVP                  V^ 4      P                  4       pV\        P                  J d!   V P                  VP                  V4      4      # V\        P                  ) \        P                  \        P                  39   d5   V P                  \        4      P                  WVR7      P                  4       # V\        P                  J d   ^V,          P                  V4      # VP                  '       Ed   ^V^,          ,
          P                  '       d   TP!                  Y'       d   TM^4      p\#        V4      P$                  '       d0   VP                  '       d   \&        V P                  V4      ,
          # M\#        V4      P                  '       d1   VP$                  '       d   \&        ) V P                  V4      ,
          # M4V P                  \        4      P                  WVR7      P                  4       # V P                  V4      # rP  )r<   r   rb  r   r   r;   rc  r   rW   r   r"   rj  rV   rt   rC  r=  r`  r    re  r   rQ  s   &&&&   r4   rj  acsc._eval_as_leading_term$  s   iilXXa^""$;99S00344155&!%%((<<$::1d:SZZ\\"""cE**1--:::1r1u9111771dd2D$x###>>>		"-- "D%%%>>>32.. " ||C(>>qRV>W^^``yy}r6   c                	N  < ^ RI Hp V P                  ^ ,          P                  V^ 4      pV\        P
                  J EdV   \        RRR7      p\        \        P
                  V^,          ,           4      P                  \        4      P                  V^ ^V,          4      p\        P                  V P                  ^ ,          ,           p	V	P                  V4      p
W,
          V
,          p\        \        P
                  V,           4      P                  WVR7      pVP                  4       \        V
4      ,          P!                  4       pVP                  4       P                  W}4      P!                  4       P#                  4       V! W,          V4      ,           # V\        P                  J EdV   \        RRR7      p\        \        P                  V^,          ,
          4      P                  \        4      P                  V^ ^V,          4      p\        P                  V P                  ^ ,          ,
          p	V	P                  V4      p
W,
          V
,          p\        \        P
                  V,           4      P                  WVR7      pVP                  4       \        V
4      ,          P!                  4       pVP                  4       P                  W}4      P!                  4       P#                  4       V! W,          V4      ,           # \$        SV `9  WVR7      pV\        P&                  J d   V# VP(                  '       d   ^V^,          ,
          P*                  '       d   V P                  ^ ,          P-                  Y'       d   TM^4      p\/        V4      P0                  '       d#   VP*                  '       d   \2        V,
          #  V# \/        V4      P*                  '       d$   VP0                  '       d   \2        ) V,
          #  V# V P                  \        4      P                  WW4R7      # V# rU  )rX  rV  r<   r   r   r   r   r   r   r"   rY  r   rc  r%   r   r[  rV   r\  r   rt   rC  r=  r`  r    re  r   r]  s   &&&&&          r4   r   acsc._eval_nseries;  s   (yy|  A&155=cD)Aquuq!t|$,,S199!Q!DC==499Q</D$$Q'AAA	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MM1== cD)Aq}}q!t+,44S9AA!Q!LC==499Q</D$$Q'AAA	?00d0CD<<>$q')113C;;=%%a-446>>@1QT1:MMg#A#61$$$J<<<Qq[55599Q<##Att;D$x######8O $ 
 D%%%###39$ $ 
 ||C(66q$6RR
r6   c           
     	    \         P                  ) \        \         P                  V,          \        ^^V^,          ,          ,
          4      ,           4      ,          # r   rm  r	  s   &&,r4   rn  acsc._eval_rewrite_as_logc  s8    AOOC$7$q1S!V8|:L$L MMMr6   c                	&    \        ^V,          4      # r   )r   r	  s   &&,r4   r  acsc._eval_rewrite_as_asinh  r{  r6   c                	J    \         ^,          \        ^V,          4      ,
          # r   re  r	  s   &&,r4   rf  acsc._eval_rewrite_as_acosk  rw  r6   c                	    \        V^,          4      V,          \        ^,          \        \        V^,          ^,
          4      4      ,
          ,          # r   r   r  s   &&,r4   rj  acsc._eval_rewrite_as_atann  s3    AqDz!|RTDadQh$8899r6   c           	     	    \        V^,          4      V,          \        ^,          \        ^\        V^,          ^,
          4      ,          4      ,
          ,          # r   r%  r	  s   &&,r4   rq  acsc._eval_rewrite_as_acotq  s:    CF|CAQtCFQJ/?-?(@!@AAr6   c                	<    \         ^,          \        V4      ,
          # r   rt  r	  s   &&,r4   ru  acsc._eval_rewrite_as_asect  r)  r6   rL   r   r@  )rn   ro   rp   rq   rr   r  r   r   r  r  r   r   rj  r   rn  r  r  rf  rj  rq  ru  rv   r  r  s   @r4   r   r     s|    (T *( *(X5 :  : .&PN "6":B   r6   r   c                  `   a  ] tR tRtRt]R 4       tR tR tR t	R t
R tR	 tV 3R
 ltRtV ;t# )r   ix  a	  
The function ``atan2(y, x)`` computes `\operatorname{atan}(y/x)` taking
two arguments `y` and `x`.  Signs of both `y` and `x` are considered to
determine the appropriate quadrant of `\operatorname{atan}(y/x)`.
The range is `(-\pi, \pi]`. The complete definition reads as follows:

.. math::

    \operatorname{atan2}(y, x) =
    \begin{cases}
      \arctan\left(\frac y x\right) & \qquad x > 0 \\
      \arctan\left(\frac y x\right) + \pi& \qquad y \ge 0, x < 0 \\
      \arctan\left(\frac y x\right) - \pi& \qquad y < 0, x < 0 \\
      +\frac{\pi}{2} & \qquad y > 0, x = 0 \\
      -\frac{\pi}{2} & \qquad y < 0, x = 0 \\
      \text{undefined} & \qquad y = 0, x = 0
    \end{cases}

Attention: Note the role reversal of both arguments. The `y`-coordinate
is the first argument and the `x`-coordinate the second.

If either `x` or `y` is complex:

.. math::

    \operatorname{atan2}(y, x) =
        -i\log\left(\frac{x + iy}{\sqrt{x^2 + y^2}}\right)

Examples
========

Going counter-clock wise around the origin we find the
following angles:

>>> from sympy import atan2
>>> atan2(0, 1)
0
>>> atan2(1, 1)
pi/4
>>> atan2(1, 0)
pi/2
>>> atan2(1, -1)
3*pi/4
>>> atan2(0, -1)
pi
>>> atan2(-1, -1)
-3*pi/4
>>> atan2(-1, 0)
-pi/2
>>> atan2(-1, 1)
-pi/4

which are all correct. Compare this to the results of the ordinary
`\operatorname{atan}` function for the point `(x, y) = (-1, 1)`

>>> from sympy import atan, S
>>> atan(S(1)/-1)
-pi/4
>>> atan2(1, -1)
3*pi/4

where only the `\operatorname{atan2}` function returns what we expect.
We can differentiate the function with respect to both arguments:

>>> from sympy import diff
>>> from sympy.abc import x, y
>>> diff(atan2(y, x), x)
-y/(x**2 + y**2)

>>> diff(atan2(y, x), y)
x/(x**2 + y**2)

We can express the `\operatorname{atan2}` function in terms of
complex logarithms:

>>> from sympy import log
>>> atan2(y, x).rewrite(log)
-I*log((x + I*y)/sqrt(x**2 + y**2))

and in terms of `\operatorname(atan)`:

>>> from sympy import atan
>>> atan2(y, x).rewrite(atan)
Piecewise((2*atan(y/(x + sqrt(x**2 + y**2))), Ne(y, 0)), (pi, re(x) < 0), (0, Ne(x, 0)), (nan, True))

but note that this form is undefined on the negative real axis.

See Also
========

sin, csc, cos, sec, tan, cot
asin, acsc, acos, asec, atan, acot

References
==========

.. [1] https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
.. [2] https://en.wikipedia.org/wiki/Atan2
.. [3] https://functions.wolfram.com/ElementaryFunctions/ArcTan2

c           	     	b   ^ RI Hp V\        P                  J dG   VP                  '       d   \
        # ^\
        ,          V! \        V4      4      ,          \
        ,
          # V\        P                  J d   \        P                  # VP                  '       dM   VP                  '       d;   VP                  '       d)   VP                  '       d   \        V4      p\        V4      pVP                  '       Ed   VP                  '       Ed   VP                  '       d   \        W,          4      # VP                  '       d^   VP                  '       d   \        W,          4      \
        ,
          # VP                   '       d   \        W,          4      \
        ,           # MsVP                  '       db   VP                  '       d   \
        ^,          # VP                  '       d   \
        ) ^,          # VP                  '       d   \        P"                  # VP                  '       d   VP$                  '       d)   \
        \        P&                  V! V4      ,
          ,          # VP                  '       d<   \)        \
        \        V4      ^ 8  3^ \+        V^ 4      3\        P"                  R34      # VP                  '       dw   VP                  '       dc   \        P,                  ) \/        V\        P,                  V,          ,           \1        V^,          V^,          ,           4      ,          4      ,          # R# R# )r   )	HeavisideTN)'sympy.functions.special.delta_functionsrE  r   r   r>   r   r!   r   rW   rG  rF  r    rU   r=  r   re  r~  r   is_extended_nonzeror   r(   r   r3   r"   r%   )r   r   r   rE  s   &&& r4   r   
atan2.eval  s   E"""yyy	R42a5)*R//!**_66M^^^1;;;1;;;1A1A!"4"4"4}}}ACy ===9r>)%%%9r>) &===a4K]]]3q5LYYY55L999$$$1559Q</00{{{ "beai"#R1X"#%%0 0 ;;;1;;;OO#CQ__Q&&QTAqD[(99%; ; ; ';r6   c           	     	    \         P                  ) \        V\         P                  V,          ,           \        V^,          V^,          ,           4      ,          4      ,          # r   rm  r@   r   r   r   s   &&&,r4   rn  atan2._eval_rewrite_as_log  s=    Q):%:DA1<M$M NNNr6   c                	   \        ^\        W\        V^,          V^,          ,           4      ,           ,          4      ,          \        V^ 4      3\        \        V4      ^ 8  3^ \        V^ 4      3\        P                  R34      # r  )r(   r   r%   r   r   r!   r   r   rJ  s   &&&,r4   rj  atan2._eval_rewrite_as_atan
  sf    !DQTAqD[(9$9!:;;R1XFbeaiR1X%%( 	(r6   c           
     	   VP                   '       d9   VP                   '       d'   \        W!\        P                  ,          ,           4      # V\        P                  V,          ,           pV^,          V^,          ,           p\        V\	        V4      ,          4      \        P                  \        \        V4      \	        \        V4      4      ,          4      ,          ,
          # r   )rU   arg_fr   r3   r%   r"   ra   )r@   r   r   r   r   r   s   &&&,  r4   _eval_rewrite_as_argatan2._eval_rewrite_as_arg  s    !"4"4"4q..//!!qD1a4KQtAwY!//#c!fT#a&\6I2J"JJJr6   c                	    V P                   ^ ,          P                  ;'       d    V P                   ^,          P                  # r@  rn  rC  s   &r4   ro  atan2._eval_is_extended_real  s,    yy|,,NN11N1NNr6   c                	    V P                  V P                  ^ ,          P                  4       V P                  ^,          P                  4       4      # r@  rA  rC  s   &r4   rD  atan2._eval_conjugate  s5    yy1//1499Q<3I3I3KLLr6   c                	    V P                   w  r#V^8X  d   W3^,          V^,          ,           ,          # V^8X  d    V) V^,          V^,          ,           ,          # \        W4      hr   r  )r@   r   r   r   s   &&  r4   r   atan2.fdiff  sS    yyq=dQTk?"]2q!tad{##$T44r6   c                	   < V P                   w  r#VP                  '       d$   VP                  '       d   \        SV `  V4      # R # R # rm   )r<   rU   r   _eval_evalf)r@   precr   r   r   s   &&  r4   rY  atan2._eval_evalf(  s=    yy!"4"4"47&t,, #5r6   rL   )rn   ro   rp   rq   rr   r  r   rn  rj  rP  ro  rD  r   rY  rv   r  r  s   @r4   r   r   x  sK    dL %; %;NO(KOM	5- -r6   r   Nr   )[
__future__r   sympy.core.addr   sympy.core.cacher   sympy.core.exprr   sympy.core.functionr   r   r	   r
   sympy.core.logicr   r   r   r   sympy.core.modr   sympy.core.numbersr   r   r   r   r   sympy.core.relationalr   r   sympy.core.singletonr   sympy.core.symbolr   r   sympy.core.sympifyr   (sympy.functions.combinatorial.factorialsr   r   %sympy.functions.combinatorial.numbersr   r   r;  r   rO  r    r!   &sympy.functions.elementary.exponentialr"   r#   #sympy.functions.elementary.integersr$   (sympy.functions.elementary.miscellaneousr%   r&   r'   $sympy.functions.elementary.piecewiser(   1sympy.functions.elementary._trigonometric_specialr)   r*   r+   sympy.logic.boolalgr,   sympy.ntheoryr-   sympy.polys.specialpolysr.   sympy.utilities.iterablesr/   r5   r8   r   r   rF   r   r   r  r  r  r/  r)  r3  r'  r   r   r   r   r   r   r   rL   r6   r4   <module>rs     s   "  $   Z Z F F  I I ( " + & O B E E ; 5 C C :) ) # # 3 63AKO AKH 	 	""JHVs
 sl	g1
 g1TQ
 Qh
z
 zz	uO&; uOpi7
) i7Xf7
) f7Rt$? t$xN
? N
bf' fRn' nbR@' R@jWK' WKtd ' d NG ' G Ts-( s-r6   