403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/sympy/series/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/sympy/series/__pycache__/limits.cpython-310.pyc
o

�8Va�,�@s�ddlmZmZmZmZmZmZmZddlm	Z	ddl
mZddlm
Z
ddlmZmZddlmZddlmZddlmZd	d
lmZddd
�Zdd�ZGdd�de�ZdS)�)�S�Symbol�Add�sympify�Expr�	PoleError�Mul)�factor_terms)�	factorial)�gamma)�PolynomialError�factor)�Order)�ratsimp)�together�)�gruntz�+cCst||||�jdd�S)aQComputes the limit of ``e(z)`` at the point ``z0``.

    Parameters
    ==========

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

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

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

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

    Examples
    ========

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

    Notes
    =====

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

    See Also
    ========

     limit_seq : returns the limit of a sequence.
    F)�deep)�Limit�doit)�e�z�z0�dir�r�5/usr/lib/python3/dist-packages/sympy/series/limits.py�limits3rcs<ddlm�d}t|�tjur-t|�|d|�|tj|tjur!dnd�}t|t	�r+dS|S|j
s:|js:|js:|j
�rg}|jD]X}t||||�}|�tj�r�|jdur�t|t�rt|�}t|t�set|�}t|t�snt|�}t|t�r|t||||�SdSdSt|t	�r�dS|tjur�dS|�|�q?|�r|j|�}|tjur�|j
r�t�fdd�|D��r�g}	g}
tt|��D]}t||��r�|	�||�q�|
�|j|�q�t|
�dkr�t|
���}t||||�}|t|	�}|tju�rzt|�}
Wnt�yYdSw|
tju�s|
|k�rdSt|
|||�S|S)	a+Computes the limit of an expression term-wise.
    Parameters are the same as for the ``limit`` function.
    Works with the arguments of expression ``e`` one by one, computing
    the limit of each and then combining the results. This approach
    works only for simple limits, but it is fast.
    r��AccumBoundsNrr�-c3s�|]}t|��VqdS�N)�
isinstance)�.0�rrrrr�	<genexpr>fs�zheuristics.<locals>.<genexpr>) �sympy.calculus.utilr�absr�Infinityr�subs�Zeror"r�is_Mul�is_Add�is_Pow�is_Function�args�has�	is_finiterr	rrr
�
heuristics�NaN�append�func�any�range�len�simplifyrr)rrrr�rv�r�a�l�m�r2�e2�ii�e3�rat_errrr2Asd*
.�







&�r2c@s6eZdZdZddd�Zedd��Zdd�Zd	d
�ZdS)
rz�Represents an unevaluated limit.

    Examples
    ========

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

    rcCs�t|�}t|�}t|�}|tjurd}n|tjurd}|�|�r(td||f��t|t�r2t|�}n
t|t�s?t	dt
|���t|�dvrKtd|��t�
|�}||||f|_|S)Nr rz@Limits approaching a variable point are not supported (%s -> %s)z6direction must be of type basestring or Symbol, not %s)rr �+-z1direction must be one of '+', '-' or '+-', not %s)rrr(�NegativeInfinityr0�NotImplementedErrorr"�strr�	TypeError�type�
ValueErrorr�__new__�_args)�clsrrrr�objrrrrK�s0


�


��
z
Limit.__new__cCs8|jd}|j}|�|jdj�|�|jdj�|S)Nrr�)r/�free_symbols�difference_update�update)�selfr�isymsrrrrP�s

zLimit.free_symbolscCs�ddlm}m}|j\}}}}|j|j}}|�|�s)t|||�||�}	||	�St|||�}
t|||�}|tjurP|
tj	tj
fvrPt||d||�}	||	�S|tj
ur]|
tj	ur_tjSdSdS)Nr)�exp�logr)�sympyrUrVr/�baser0rr�Oner(rE�ComplexInfinity)rSrUrV�exprrr�_�br�res�ex_lim�base_limrrr�pow_heuristics�s

�zLimit.pow_heuristicsc	
s@ddlm�m�|j\}����tjurtd��|�dd�r6|jdi|��}�jdi|����jdi|���|�kr<�S|�	��sC|S�tj
urKtj
S|�	tjtjtjtj
�rY|S|j
rntt|j���g|jdd��R�Sd}t��dkryd}nt��d	kr�d
}������fdd���|�}|����r�t��tjur�|��d
��}n|�����}z|j�|d
�\}}Wn	ty�Yn1w|dkr�tjS|dkr�|St��dks�t|�d@s�tj�|�St��d	kr�tj�|�StjSt��tju�r|j�rt|�}|��d��}|}n|�����}z|j�|d
�\}}Wntttf�y@|j�r>|��}|du�r>|YSYntw|�	tjtjtj��rN|S|�	���s�|j�r[tjS|dk�rb|S|j�r�|j �r�t��d	k�su|j!�r|tj�|�St��dk�r�tj�|�StjSt��dk�r�tj�|�St��d	k�r�tj�|�tj"tj#|StjS�j$�r�|�%t&t'�}d}z<t��dk�r�t(|��d�}t(|��d	�}||k�r�td||f��nt(|����}|tj
u�s�|tj
u�r�t��W|Sttf�y|du�r�t)|����}|du�r|YSY|Sw)aPEvaluates the limit.

        Parameters
        ==========

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

        hints : optional keyword arguments
            To be passed to ``doit`` methods; only used if deep is True.
        r)�Abs�signz.Limits at complex infinity are not implementedrTrNrr ���cs�|js|St�fdd�|jD��}||jkr|j|�}t|��}t|��}|s)|rft|jd����}|jrBtd|jd����}|jrf|dkdkrV|rS|jdStjS|dkdkrf|rc|jdStj	S|S)Nc3s�|]}�|�VqdSr!r)r#�arg)�	set_signsrrr%�s�z0Limit.doit.<locals>.set_signs.<locals>.<genexpr>rrT)
r/�tupler5r"r�is_zero�is_extended_realr�NegativeOnerY)r[�newargs�abs_flag�	sign_flag�sig�rbrrfrcrrrrrf�s"



zLimit.doit.<locals>.set_signs)�cdirrDzMThe limit does not exist since left hand limit = %s and right hand limit = %sr)*rWrbrcr/rrZrF�getrr0r3r(rE�is_Orderrrr[rG�is_meromorphicr'r)�leadtermrJr*�intr+r	rr-ra�is_positive�is_negative�
is_integer�is_evenrjrY�is_extended_positive�rewriter
rrr2)	rS�hintsrrp�newe�coeff�exr;r=rrorr�s�



$�
��

���	�

��z
Limit.doitN�r)	�__name__�
__module__�__qualname__�__doc__rK�propertyrPrarrrrrrs

rNr�)�
sympy.corerrrrrrr�sympy.core.exprtoolsr	�(sympy.functions.combinatorial.factorialsr
�'sympy.functions.special.gamma_functionsr�sympy.polysrr
�sympy.series.orderr�sympy.simplify.ratsimpr�sympy.simplify.simplifyrrrr2rrrrr�<module>s$
6>

Youez - 2016 - github.com/yon3zu
LinuXploit