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/testing/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

�8Va��@s�dZddlmZmZmZmZddlmZmZddl	m
Z
ddlmZm
Z
ddlmZddlmZddd�Zddd�Zddd�Zddd�Zddd�Zd
S)z  Helpers for randomized testing �)�uniform�Random�	randrange�randint)�is_sequence�as_int)�Tuple)�comp�I)�Symbol)�	nsimplify������FNcCsFt||�t||�}}|s|t|St|d|d�tt|d|d�S)a
    Return a random complex number.

    To reduce chance of hitting branch cuts or anything, we guarantee
    b <= Im z <= d, a <= Re z <= c

    When rational is True, a rational approximation to a random number
    is obtained within specified tolerance, if any.
    T)�rational�	tolerance)rr
r)�a�b�c�drr�A�B�r�8/usr/lib/python3/dist-packages/sympy/testing/randtest.py�random_complex_numbers
�r���ư>csxt|||�\}}}t|t�r|gn|j|jB}tt|����fdd�|D���}|�|���}	|�|���}
t|	|
|�S)a
    Test numerically that f and g agree when evaluated in the argument z.

    If z is None, all symbols will be tested. This routine does not test
    whether there are Floats present with precision higher than 15 digits
    so if there are, your results may not be what you expect due to round-
    off errors.

    Examples
    ========

    >>> from sympy import sin, cos
    >>> from sympy.abc import x
    >>> from sympy.testing.randtest import verify_numerically as tn
    >>> tn(sin(x)**2 + cos(x)**2, 1, x)
    True
    csg|]	}t������qSr)r)�.0�_�rrrrrr�
<listcomp>1sz&verify_numerically.<locals>.<listcomp>)	r�
isinstancer�free_symbols�list�zip�subs�nr	)�f�g�z�tolrrrr�reps�z1�z2rrr�verify_numericallys"r.cCsPddlm}t||||�}|�|��||�}	|||��|�}
t|	��|
��|�S)a�
    Test numerically that the symbolically computed derivative of f
    with respect to z is correct.

    This routine does not test whether there are Floats present with
    precision higher than 15 digits so if there are, your results may
    not be what you expect due to round-off errors.

    Examples
    ========

    >>> from sympy import sin
    >>> from sympy.abc import x
    >>> from sympy.testing.randtest import test_derivative_numerically as td
    >>> td(sin(x), x)
    True
    r)�
Derivative)�sympy.core.functionr/r�diffr%�doit_numericallyr	r&)r'r)r*rrrrr/�z0�f1�f2rrr�test_derivative_numerically7s
r6csV|durtSt|t�rt|�jSt|�r't|�}|��d|f�fdd�	��Std��)aGReturn a randrange generator. ``seed`` can be
        o None - return randomly seeded generator
        o int - return a generator seeded with the int
        o list - the values to be returned will be taken from the list
          in the order given; the provided list is not modified.

    Examples
    ========

    >>> from sympy.testing.randtest import _randrange
    >>> rr = _randrange()
    >>> rr(1000) # doctest: +SKIP
    999
    >>> rr = _randrange(3)
    >>> rr(1000) # doctest: +SKIP
    238
    >>> rr = _randrange([0, 5, 1, 3, 4])
    >>> rr(3), rr(3)
    (0, 1)
    Ncs�|dur	d|}}t|�t|�}}||}|dkrtd��z|��}Wnty/td��w||kr;|kr<|S�|||�S)Nrrz_randrange got empty rangez!_randrange sequence was too short�r�
ValueError�pop�
IndexError�rr�seq�w�x��giverrr@ms
��z_randrange.<locals>.givez!_randrange got an unexpected seed)rr!�intrrr#�reverser8��seedrr?r�
_randrangePs

rEcsT|durtSt|t�rt|�jSt|�r&t|�}|��|f�fdd�	��Std��)aIReturn a randint generator. ``seed`` can be
        o None - return randomly seeded generator
        o int - return a generator seeded with the int
        o list - the values to be returned will be taken from the list
          in the order given; the provided list is not modified.

    Examples
    ========

    >>> from sympy.testing.randtest import _randint
    >>> ri = _randint()
    >>> ri(1, 1000) # doctest: +SKIP
    999
    >>> ri = _randint(3)
    >>> ri(1, 1000) # doctest: +SKIP
    238
    >>> ri = _randint([0, 5, 1, 2, 4])
    >>> ri(1, 3), ri(1, 3)
    (1, 2)
    Ncsrt|�t|�}}||}|dkrtd��z|��}Wnty&td��w||kr2|kr3|S�|||�S)Nrz_randint got empty rangez_randint sequence was too shortr7r;r?rrr@�s��z_randint.<locals>.givez_randint got an unexpected seed)rr!rArrr#rBr8rCrr?r�_randint�s


rF)r
rrrFN)Nrr
rrr)rr
rrr)N)�__doc__�randomrrrr�sympy.core.compatibilityrr�sympy.core.containersr�sympy.core.numbersr	r
�sympy.core.symbolr�sympy.simplify.simplifyrrr.r6rErFrrrr�<module>s



1

Youez - 2016 - github.com/yon3zu
LinuXploit