+
    ‹°³j+0  ã                   ó¶  € R t ^ RIHtHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHt ^ RIHtHtHt R t ! R	 R
]4      tR t ! R R]4      t]	! ^4      tR t ! R R]4      tR t ! R R]4      tR t ! R R]4      t]	! ^
4      tR t ! R R]4      t R t! ! R R]4      t"R t# ! R R]4      t$R  t% ! R! R"]4      t& ! R# R$]4      t' ! R% R&]4      t(R'# )(a#  
This module contains SymPy functions mathcin corresponding to special math functions in the
C standard library (since C99, also available in C++11).

The functions defined in this module allows the user to express functions such as ``expm1``
as a SymPy function for symbolic manipulation.

)ÚArgumentIndexErrorÚFunction)ÚRational)ÚPow)ÚS)ÚexpÚlog)Úsqrt)ÚBooleanFunctionÚtrueÚfalsec                 óB   € \        V 4      \        P                  ,
          # ©N©r   r   ÚOne©Úxs   &ÚY/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/codegen/cfunctions.pyÚ_expm1r      s   € Üˆq‹6”A—E‘E�>Ðó    c                   ó^   a € ] tR t^t o Rt^tR
R ltR tR t]t	]
R 4       tR tR tRtV tR	# )Úexpm1aÖ  
Represents the exponential function minus one.

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

The benefit of using ``expm1(x)`` over ``exp(x) - 1``
is that the latter is prone to cancellation under finite precision
arithmetic when x is close to zero.

Examples
========

>>> from sympy.abc import x
>>> from sympy.codegen.cfunctions import expm1
>>> '%.0e' % expm1(1e-99).evalf()
'1e-99'
>>> from math import exp
>>> exp(1e-99) - 1
0.0
>>> expm1(x).diff(x)
exp(x)

See Also
========

log1p
c                óL   € V^8X  d   \        V P                  !  # \        W4      h©ú0
Returns the first derivative of this function.
)r   Úargsr   ©ÚselfÚargindexs   &&r   ÚfdiffÚexpm1.fdiff4   s$   € ð �qŒ=Ü˜Ÿ	™	‘?Ð"ä$ TÓ4Ð4r   c                ó(   € \        V P                  !  # r   )r   r   ©r   Úhintss   &,r   Ú_eval_expand_funcÚexpm1._eval_expand_func=   ó   € Ü�t—y‘yÑ!Ð!r   c                óB   € \        V4      \        P                  ,
          # r   r   ©r   ÚargÚkwargss   &&,r   Ú_eval_rewrite_as_expÚexpm1._eval_rewrite_as_exp@   s   € Ü�3‹xœ!Ÿ%™%ÕÐr   c                óh   € \         P                  ! V4      pVe   V\        P                  ,
          # R # r   )r   Úevalr   r   )Úclsr)   Úexp_args   && r   r.   Ú
expm1.evalE   s(   € ä—(’(˜3“-ˆØÒØœQŸU™U•?Ð"ñ r   c                ó<   € V P                   ^ ,          P                  # ©é    )r   Úis_real©r   s   &r   Ú_eval_is_realÚexpm1._eval_is_realK   ó   € Ø�y‰y˜�|×#Ñ#Ð#r   c                ó<   € V P                   ^ ,          P                  # r3   )r   Ú	is_finiter6   s   &r   Ú_eval_is_finiteÚexpm1._eval_is_finiteN   s   € Ø�y‰y˜�|×%Ñ%Ð%r   © N©é   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Únargsr   r$   r+   Ú_eval_rewrite_as_tractableÚclassmethodr.   r7   r<   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      sI   ø‡ € ñð8 €Eô5ò"ò ð "6Ðàñ#ó ð#ò
$÷&ð &r   r   c                 óB   € \        V \        P                  ,           4      # r   )r   r   r   r   s   &r   Ú_log1prN   R   s   € Üˆq”1—5‘5�y‹>Ðr   c                   óp   a € ] tR t^Vt o Rt^tRR ltR tR t]t	]
R 4       tR tR tR tR	 tR
 tRtV tR# )Úlog1pa  
Represents the natural logarithm of a number plus one.

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

The benefit of using ``log1p(x)`` over ``log(x + 1)``
is that the latter is prone to cancellation under finite precision
arithmetic when x is close to zero.

Examples
========

>>> from sympy.abc import x
>>> from sympy.codegen.cfunctions import log1p
>>> from sympy import expand_log
>>> '%.0e' % expand_log(log1p(1e-99)).evalf()
'1e-99'
>>> from math import log
>>> log(1 + 1e-99)
0.0
>>> log1p(x).diff(x)
1/(x + 1)

See Also
========

expm1
c                ó    € V^8X  d>   \         P                  V P                  ^ ,          \         P                  ,           ,          # \        W4      hr   )r   r   r   r   r   s   &&r   r   Úlog1p.fdiffw   s6   € ð �qŒ=Ü—5‘5˜$Ÿ)™) A�,¬¯©Õ.Õ/Ð/ä$ TÓ4Ð4r   c                ó(   € \        V P                  !  # r   )rN   r   r"   s   &,r   r$   Úlog1p._eval_expand_func�   r&   r   c                ó   € \        V4      # r   )rN   r(   s   &&,r   Ú_eval_rewrite_as_logÚlog1p._eval_rewrite_as_log„   ó   € Ü�c‹{Ðr   c                óZ  € VP                   '       d!   \        V\        P                  ,           4      # VP                  '       g,   \        P
                  ! V\        P                  ,           4      # VP                  '       d*   \        \        V4      \        P                  ,           4      # R # r   )Úis_Rationalr   r   r   Úis_Floatr.   Ú	is_numberr   ©r/   r)   s   &&r   r.   Ú
log1p.eval‰   sd   € à�?�?ˆ?Ü�sœQŸU™U•{Ó#Ð#Ø——�Ü—8’8˜C¤!§%¡%�KÓ(Ð(Ø�]�]ˆ]Ü”x “}¤q§u¡uÕ,Ó-Ð-ñ r   c                óf   € V P                   ^ ,          \        P                  ,           P                  # r3   )r   r   r   Úis_nonnegativer6   s   &r   r7   Úlog1p._eval_is_real’   s   € Ø—	‘	˜!•œqŸu™uÕ$×4Ñ4Ð4r   c                ó°   € V P                   ^ ,          \        P                  ,           P                  '       d   R# V P                   ^ ,          P                  # )r4   F)r   r   r   Úis_zeror;   r6   s   &r   r<   Úlog1p._eval_is_finite•   s6   € Ø�I‰I�a�Lœ1Ÿ5™5Õ ×)×)Ð)ÙØ�y‰y˜�|×%Ñ%Ð%r   c                ó<   € V P                   ^ ,          P                  # r3   )r   Úis_positiver6   s   &r   Ú_eval_is_positiveÚlog1p._eval_is_positiveš   s   € Ø�y‰y˜�|×'Ñ'Ð'r   c                ó<   € V P                   ^ ,          P                  # r3   )r   rc   r6   s   &r   Ú_eval_is_zeroÚlog1p._eval_is_zero�   r9   r   c                ó<   € V P                   ^ ,          P                  # r3   )r   r`   r6   s   &r   Ú_eval_is_nonnegativeÚlog1p._eval_is_nonnegative    s   € Ø�y‰y˜�|×*Ñ*Ð*r   r>   Nr?   )rA   rB   rC   rD   rE   rF   r   r$   rV   rG   rH   r.   r7   r<   rg   rj   rm   rI   rJ   rK   s   @r   rP   rP   V   sX   ø‡ € ñð: €Eô5ò"òð "6Ðàñ.ó ð.ò5ò&ò
(ò$÷+ð +r   rP   c                 ó"   € \        \        V 4      # r   )r   Ú_Twor   s   &r   Ú_exp2rq   ¥   s   € ÜŒt�Q‹<Ðr   c                   óR   a € ] tR t^¨t o Rt^tRR ltR t]tR t	]
R 4       tRtV tR# )	Úexp2a�  
Represents the exponential function with base two.

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

The benefit of using ``exp2(x)`` over ``2**x``
is that the latter is not as efficient under finite precision
arithmetic.

Examples
========

>>> from sympy.abc import x
>>> from sympy.codegen.cfunctions import exp2
>>> exp2(2).evalf() == 4.0
True
>>> exp2(x).diff(x)
log(2)*exp2(x)

See Also
========

log2
c                óR   € V^8X  d   V \        \        4      ,          # \        W4      hr   )r   rp   r   r   s   &&r   r   Ú
exp2.fdiffÅ   s$   € ð �qŒ=ØœœD›	•>Ð!ä$ TÓ4Ð4r   c                ó   € \        V4      # r   )rq   r(   s   &&,r   Ú_eval_rewrite_as_PowÚexp2._eval_rewrite_as_PowÎ   ó   € Ü�S‹zÐr   c                ó(   € \        V P                  !  # r   )rq   r   r"   s   &,r   r$   Úexp2._eval_expand_funcÓ   ó   € Ü�d—i‘iÑ Ð r   c                ó@   € VP                   '       d   \        V4      # R # r   )r\   rq   r]   s   &&r   r.   Ú	exp2.evalÖ   s   € à�=�=ˆ=Ü˜“:Ðñ r   r>   Nr?   )rA   rB   rC   rD   rE   rF   r   rw   rG   r$   rH   r.   rI   rJ   rK   s   @r   rs   rs   ¨   s<   ø‡ € ñð2 €Eô5òð "6Ðò!ð ñó ör   rs   c                 ó@   € \        V 4      \        \        4      ,          # r   )r   rp   r   s   &r   Ú_log2r€   Ü   ó   € Üˆq‹6”#”d“)ÕÐr   c                   óX   a € ] tR t^àt o Rt^tR	R lt]R 4       tR t	R t
R t]tRtV tR# )
Úlog2aŒ  
Represents the logarithm function with base two.

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

The benefit of using ``log2(x)`` over ``log(x)/log(2)``
is that the latter is not as efficient under finite precision
arithmetic.

Examples
========

>>> from sympy.abc import x
>>> from sympy.codegen.cfunctions import log2
>>> log2(4).evalf() == 2.0
True
>>> log2(x).diff(x)
1/(x*log(2))

See Also
========

exp2
log10
c                óž   € V^8X  d=   \         P                  \        \        4      V P                  ^ ,          ,          ,          # \        W4      hr   )r   r   r   rp   r   r   r   s   &&r   r   Ú
log2.fdiffý   ó6   € ð �qŒ=Ü—5‘5œ#œd›) D§I¡I¨a¥LÕ0Õ1Ð1ä$ TÓ4Ð4r   c                óø   € VP                   '       d3   \        P                  ! V\        R 7      pVP                  '       d   V# R# VP
                  '       d$   VP                  \        8X  d   VP                  # R# R# ©)ÚbaseN)r\   r   r.   rp   Úis_AtomÚis_Powr‰   r   ©r/   r)   Úresults   && r   r.   Ú	log2.eval  óR   € à�=�=ˆ=Ü—X’X˜c¬Ô-ˆFØ�~�~ˆ~Ø�ñ à�Z�ZˆZ˜CŸH™H¬Ô,Ø—7‘7ˆNñ -‰Zr   c                óL   € V P                  \        4      P                  ! V/ VB # r   )Úrewriter   Úevalf)r   r   r*   s   &*,r   Ú_eval_evalfÚlog2._eval_evalf  s!   € Ø�|‰|œCÓ ×&Ò&¨Ð7°Ñ7Ð7r   c                ó(   € \        V P                  !  # r   )r€   r   r"   s   &,r   r$   Úlog2._eval_expand_func  r|   r   c                ó   € \        V4      # r   )r€   r(   s   &&,r   rV   Úlog2._eval_rewrite_as_log  ry   r   r>   Nr?   )rA   rB   rC   rD   rE   rF   r   rH   r.   r“   r$   rV   rG   rI   rJ   rK   s   @r   rƒ   rƒ   à   sA   ø‡ € ñð4 €Eô5ð ñó ðò8ò!òð "6Ör   rƒ   c                 ó    € W,          V,           # r   r>   )r   ÚyÚzs   &&&r   Ú_fmarœ     s   € Ø�3��7€Nr   c                   óB   a € ] tR tRt o Rt^tRR ltR tR	R ltRt	V t
R# )
Úfmai   a\  
Represents "fused multiply add".

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

The benefit of using ``fma(x, y, z)`` over ``x*y + z``
is that, under finite precision arithmetic, the former is
supported by special instructions on some CPUs.

Examples
========

>>> from sympy.abc import x, y, z
>>> from sympy.codegen.cfunctions import fma
>>> fma(x, y, z).diff(x)
y

c                óˆ   € VR9   d   V P                   ^V,
          ,          # V^8X  d   \        P                  # \        W4      h©r   )r@   é   )r   r   r   r   r   s   &&r   r   Ú	fma.fdiff6  s:   € ð �vÔØ—9‘9˜Q �\Õ*Ð*Ø˜Œ]Ü—5‘5ˆLä$ TÓ4Ð4r   c                ó(   € \        V P                  !  # r   )rœ   r   r"   s   &,r   r$   Úfma._eval_expand_funcB  s   € Ü�T—Y‘YÑÐr   Nc                ó   € \        V4      # r   )rœ   )r   r)   Úlimitvarr*   s   &&&,r   rG   Úfma._eval_rewrite_as_tractableE  s   € Ü�C‹yÐr   r>   r?   r   )rA   rB   rC   rD   rE   rF   r   r$   rG   rI   rJ   rK   s   @r   rž   rž      s%   ø‡ € ñð& €Eô	5ò ÷ò r   rž   c                 ó@   € \        V 4      \        \        4      ,          # r   )r   Ú_Tenr   s   &r   Ú_log10rª   L  r�   r   c                   óR   a € ] tR tRt o Rt^tR	R lt]R 4       tR t	R t
]
tRtV tR# )
Úlog10iP  zð
Represents the logarithm function with base ten.

Examples
========

>>> from sympy.abc import x
>>> from sympy.codegen.cfunctions import log10
>>> log10(100).evalf() == 2.0
True
>>> log10(x).diff(x)
1/(x*log(10))

See Also
========

log2
c                óž   € V^8X  d=   \         P                  \        \        4      V P                  ^ ,          ,          ,          # \        W4      hr   )r   r   r   r©   r   r   r   s   &&r   r   Úlog10.fdiffe  r†   r   c                óø   € VP                   '       d3   \        P                  ! V\        R 7      pVP                  '       d   V# R# VP
                  '       d$   VP                  \        8X  d   VP                  # R# R# rˆ   )r\   r   r.   r©   rŠ   r‹   r‰   r   rŒ   s   && r   r.   Ú
log10.evalo  r�   r   c                ó(   € \        V P                  !  # r   )rª   r   r"   s   &,r   r$   Úlog10._eval_expand_funcx  r&   r   c                ó   € \        V4      # r   )rª   r(   s   &&,r   rV   Úlog10._eval_rewrite_as_log{  rX   r   r>   Nr?   )rA   rB   rC   rD   rE   rF   r   rH   r.   r$   rV   rG   rI   rJ   rK   s   @r   r¬   r¬   P  s<   ø‡ € ñð$ €Eô5ð ñó ðò"òð "6Ör   r¬   c                 ó6   € \        V \        P                  4      # r   )r   r   ÚHalfr   s   &r   Ú_Sqrtr·   �  s   € Üˆq”!—&‘&‹>Ðr   c                   óB   a € ] tR tRt o Rt^tRR ltR tR t]t	Rt
V tR# )	ÚSqrti…  a¦  
Represents the square root function.

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

The reason why one would use ``Sqrt(x)`` over ``sqrt(x)``
is that the latter is internally represented as ``Pow(x, S.Half)`` which
may not be what one wants when doing code-generation.

Examples
========

>>> from sympy.abc import x
>>> from sympy.codegen.cfunctions import Sqrt
>>> Sqrt(x)
Sqrt(x)
>>> Sqrt(x).diff(x)
1/(2*sqrt(x))

See Also
========

Cbrt
c                óŠ   € V^8X  d3   \        V P                  ^ ,          \        R^4      4      \        ,          # \	        W4      h)r   éÿÿÿÿ©r   r   r   rp   r   r   s   &&r   r   Ú
Sqrt.fdiff¡  s6   € ð �qŒ=Ü�t—y‘y •|¤X¨b°!£_Ó5´dÕ:Ð:ä$ TÓ4Ð4r   c                ó(   € \        V P                  !  # r   )r·   r   r"   s   &,r   r$   ÚSqrt._eval_expand_funcª  r|   r   c                ó   € \        V4      # r   )r·   r(   s   &&,r   rw   ÚSqrt._eval_rewrite_as_Pow­  ry   r   r>   Nr?   ©rA   rB   rC   rD   rE   rF   r   r$   rw   rG   rI   rJ   rK   s   @r   r¹   r¹   …  s(   ø‡ € ñð2 €Eô5ò!òð "6Ör   r¹   c                 ó.   € \        V \        ^^4      4      # r?   )r   r   r   s   &r   Ú_CbrtrÄ   ³  s   € Üˆq”(˜1˜a“.Ó!Ð!r   c                   óB   a € ] tR tRt o Rt^tRR ltR tR t]t	Rt
V tR# )	ÚCbrti·  a­  
Represents the cube root function.

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

The reason why one would use ``Cbrt(x)`` over ``cbrt(x)``
is that the latter is internally represented as ``Pow(x, Rational(1, 3))`` which
may not be what one wants when doing code-generation.

Examples
========

>>> from sympy.abc import x
>>> from sympy.codegen.cfunctions import Cbrt
>>> Cbrt(x)
Cbrt(x)
>>> Cbrt(x).diff(x)
1/(3*x**(2/3))

See Also
========

Sqrt
c                ó˜   € V^8X  d:   \        V P                  ^ ,          \        \        ) ^,          4      4      ^,          # \	        W4      hr   r¼   r   s   &&r   r   Ú
Cbrt.fdiffÓ  s;   € ð �qŒ=Ü�t—y‘y •|¤X¬t¨e°A­gÓ%6Ó7¸Õ9Ð9ä$ TÓ4Ð4r   c                ó(   € \        V P                  !  # r   )rÄ   r   r"   s   &,r   r$   ÚCbrt._eval_expand_funcÝ  r|   r   c                ó   € \        V4      # r   )rÄ   r(   s   &&,r   rw   ÚCbrt._eval_rewrite_as_Powà  ry   r   r>   Nr?   rÂ   rK   s   @r   rÆ   rÆ   ·  s(   ø‡ € ñð2 €Eô5ò!òð "6Ör   rÆ   c                 óN   € \        \        V ^4      \        V^4      ,           4      # )r¡   )r	   r   )r   rš   s   &&r   Ú_hypotrÎ   æ  s   € Ü”�A�q“	œC  1›IÕ%Ó&Ð&r   c                   óB   a € ] tR tRt o Rt^tRR ltR tR t]t	Rt
V tR# )	Úhypotiê  a°  
Represents the hypotenuse function.

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

The hypotenuse function is provided by e.g. the math library
in the C99 standard, hence one may want to represent the function
symbolically when doing code-generation.

Examples
========

>>> from sympy.abc import x, y
>>> from sympy.codegen.cfunctions import hypot
>>> hypot(3, 4).evalf() == 5.0
True
>>> hypot(x, y)
hypot(x, y)
>>> hypot(x, y).diff(x)
x/hypot(x, y)

c                ó¼   € VR9   dL   ^V P                   V^,
          ,          ,          \        V P                  ! V P                   !  ,          ,          # \        W4      hr    )r   rp   Úfuncr   r   s   &&r   r   Úhypot.fdiff  sF   € ð �vÔØ�T—Y‘Y˜x¨�zÕ*Õ*¬D°·²¸D¿I¹IÑ1FÕ,FÕGÐGä$ TÓ4Ð4r   c                ó(   € \        V P                  !  # r   )rÎ   r   r"   s   &,r   r$   Úhypot._eval_expand_func  r&   r   c                ó   € \        V4      # r   )rÎ   r(   s   &&,r   rw   Úhypot._eval_rewrite_as_Pow  rX   r   r>   Nr?   rÂ   rK   s   @r   rÐ   rÐ   ê  s(   ø‡ € ñð. €Eô5ò"òð "6Ör   rÐ   c                   ó4   a € ] tR tRt o ^t]R 4       tRtV tR# )Úisnani  c                ój   € V\         P                  J d   \        # VP                  '       d   \        # R # r   )r   ÚNaNr   r\   r   r]   s   &&r   r.   Ú
isnan.eval  s#   € à”!—%‘%‹<ÜˆKØ�]�]ˆ]ÜˆLár   r>   N©	rA   rB   rC   rD   rF   rH   r.   rI   rJ   rK   s   @r   rÙ   rÙ     ó   ø‡ € Ø€Eàñó ör   rÙ   c                   ó4   a € ] tR tRt o ^t]R 4       tRtV tR# )Úisinfi$  c                óf   € VP                   '       d   \        # VP                  '       d   \        # R # r   )Úis_infiniter   r;   r   r]   s   &&r   r.   Ú
isinf.eval'  s!   € à�?�?ˆ?ÜˆKØ�]�]ˆ]ÜˆLár   r>   NrÝ   rK   s   @r   rà   rà   $  rÞ   r   rà   N))rE   Úsympy.core.functionr   r   Úsympy.core.numbersr   Úsympy.core.powerr   Úsympy.core.singletonr   Ú&sympy.functions.elementary.exponentialr   r   Ú(sympy.functions.elementary.miscellaneousr	   Úsympy.logic.boolalgr
   r   r   r   r   rN   rP   rp   rq   rs   r€   rƒ   rœ   rž   r©   rª   r¬   r·   r¹   rÄ   rÆ   rÎ   rÐ   rÙ   rà   r>   r   r   Ú<module>rë      sö   ðñ÷ =Ý 'Ý  Ý "ß ;Ý 9ß <Ñ <òô:&ˆHô :&òzôK+ˆHô K+ñZ 	ˆƒt€òô1ˆ8ô 1òhô96ˆ8ô 96òxô&ˆ(ô &ñR 	ˆƒu€òô.6ˆHô .6òbô+6ˆ8ô +6ò\"ô,6ˆ8ô ,6ò^'ô*6ˆHô *6ôZ
ˆOô 
ô
ˆOö 
r   