AlkantarClanX12

Your IP : 3.149.24.143


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/numbers.cpython-310.opt-1.pyc

o

6��fl(�@s�dZddlmZmZgd�ZGdd�ded�ZGdd�de�Ze�e�Gd	d
�d
e�Z	e	�e
�Gdd�de	�ZGd
d�de�Ze�e
�dS)z~Abstract Base Classes (ABCs) for numbers, according to PEP 3141.

TODO: Fill out more detailed documentation on the operators.�)�ABCMeta�abstractmethod)�Number�Complex�Real�Rational�Integralc@seZdZdZdZdZdS)rz�All numbers inherit from this class.

    If you just want to check if an argument x is a number, without
    caring what kind, use isinstance(x, Number).
    �N)�__name__�
__module__�__qualname__�__doc__�	__slots__�__hash__r	r	r	�./opt/alt/python310/lib64/python3.10/numbers.pyrsr)�	metaclassc@s�eZdZdZdZedd��Zdd�Zeedd���Z	eed	d
���Z
edd��Zed
d��Zedd��Z
edd��Zdd�Zdd�Zedd��Zedd��Zedd��Zedd��Zedd ��Zed!d"��Zed#d$��Zed%d&��Zed'd(��Zd)S)*rafComplex defines the operations that work on the builtin complex type.

    In short, those are: a conversion to complex, .real, .imag, +, -,
    *, /, **, abs(), .conjugate, ==, and !=.

    If it is given heterogeneous arguments, and doesn't have special
    knowledge about them, it should fall back to the builtin complex
    type as described below.
    r	cC�dS)z<Return a builtin complex instance. Called for complex(self).Nr	��selfr	r	r�__complex__-szComplex.__complex__cCs|dkS)z)True if self != 0. Called for bool(self).rr	rr	r	r�__bool__1�zComplex.__bool__cC�t�)zXRetrieve the real component of this number.

        This should subclass Real.
        ��NotImplementedErrorrr	r	r�real5�zComplex.realcCr)z]Retrieve the imaginary component of this number.

        This should subclass Real.
        rrr	r	r�imag>rzComplex.imagcCr)zself + otherr�r�otherr	r	r�__add__G�zComplex.__add__cCr)zother + selfrrr	r	r�__radd__Lr!zComplex.__radd__cCr)z-selfrrr	r	r�__neg__Qr!zComplex.__neg__cCr)z+selfrrr	r	r�__pos__Vr!zComplex.__pos__cCs
||S)zself - otherr	rr	r	r�__sub__[�
zComplex.__sub__cCs
||S)zother - selfr	rr	r	r�__rsub___r&zComplex.__rsub__cCr)zself * otherrrr	r	r�__mul__cr!zComplex.__mul__cCr)zother * selfrrr	r	r�__rmul__hr!zComplex.__rmul__cCr)z5self / other: Should promote to float when necessary.rrr	r	r�__truediv__mr!zComplex.__truediv__cCr)zother / selfrrr	r	r�__rtruediv__rr!zComplex.__rtruediv__cCr)zBself**exponent; should promote to float or complex when necessary.r)r�exponentr	r	r�__pow__wr!zComplex.__pow__cCr)zbase ** selfr)r�baser	r	r�__rpow__|r!zComplex.__rpow__cCr)z7Returns the Real distance from 0. Called for abs(self).rrr	r	r�__abs__�r!zComplex.__abs__cCr)z$(x+y*i).conjugate() returns (x-y*i).rrr	r	r�	conjugate�r!zComplex.conjugatecCr)z
self == otherrrr	r	r�__eq__�r!zComplex.__eq__N)r
rrr
rrrr�propertyrrr r"r#r$r%r'r(r)r*r+r-r/r0r1r2r	r	r	rr sP













rc@s�eZdZdZdZedd��Zedd��Zedd��Zed	d
��Z	ed&dd
��Z
dd�Zdd�Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zdd�Zed d!��Zed"d#��Zd$d%�ZdS)'rz�To Complex, Real adds the operations that work on real numbers.

    In short, those are: a conversion to float, trunc(), divmod,
    %, <, <=, >, and >=.

    Real also provides defaults for the derived operations.
    r	cCr)zTAny Real can be converted to a native float object.

        Called for float(self).rrr	r	r�	__float__��zReal.__float__cCr)aGtrunc(self): Truncates self to an Integral.

        Returns an Integral i such that:
          * i>0 iff self>0;
          * abs(i) <= abs(self);
          * for any Integral j satisfying the first two conditions,
            abs(i) >= abs(j) [i.e. i has "maximal" abs among those].
        i.e. "truncate towards 0".
        rrr	r	r�	__trunc__�szReal.__trunc__cCr)z$Finds the greatest Integral <= self.rrr	r	r�	__floor__�r!zReal.__floor__cCr)z!Finds the least Integral >= self.rrr	r	r�__ceil__�r!z
Real.__ceil__NcCr)z�Rounds self to ndigits decimal places, defaulting to 0.

        If ndigits is omitted or None, returns an Integral, otherwise
        returns a Real. Rounds half toward even.
        r)rZndigitsr	r	r�	__round__�rzReal.__round__cCs||||fS)z�divmod(self, other): The pair (self // other, self % other).

        Sometimes this can be computed faster than the pair of
        operations.
        r	rr	r	r�
__divmod__��zReal.__divmod__cCs||||fS)z�divmod(other, self): The pair (self // other, self % other).

        Sometimes this can be computed faster than the pair of
        operations.
        r	rr	r	r�__rdivmod__�r;zReal.__rdivmod__cCr)z)self // other: The floor() of self/other.rrr	r	r�__floordiv__�r!zReal.__floordiv__cCr)z)other // self: The floor() of other/self.rrr	r	r�
__rfloordiv__�r!zReal.__rfloordiv__cCr)zself % otherrrr	r	r�__mod__�r!zReal.__mod__cCr)zother % selfrrr	r	r�__rmod__�r!z
Real.__rmod__cCr)zRself < other

        < on Reals defines a total ordering, except perhaps for NaN.rrr	r	r�__lt__�r5zReal.__lt__cCr)z
self <= otherrrr	r	r�__le__�r!zReal.__le__cC�tt|��S)z(complex(self) == complex(float(self), 0))�complex�floatrr	r	rr��zReal.__complex__cC�|
S)z&Real numbers are their real component.r	rr	r	rr��z	Real.realcCr)z)Real numbers have no imaginary component.rr	rr	r	rr�r!z	Real.imagcCrG)zConjugate is a no-op for Reals.r	rr	r	rr1szReal.conjugate�N)r
rrr
rrr4r6r7r8r9r:r<r=r>r?r@rArBrr3rrr1r	r	r	rr�sB











rc@s<eZdZdZdZeedd���Zeedd���Zdd�Z	d	S)
rz6.numerator and .denominator should be in lowest terms.r	cCrrIrrr	r	r�	numeratorr!zRational.numeratorcCrrIrrr	r	r�denominatorr!zRational.denominatorcCst|j�t|j�S)afloat(self) = self.numerator / self.denominator

        It's important that this conversion use the integer's "true"
        division rather than casting one side to float before dividing
        so that ratios of huge integers convert without overflowing.

        )�intrJrKrr	r	rr4szRational.__float__N)
r
rrr
rr3rrJrKr4r	r	r	rrsrc@s�eZdZdZdZedd��Zdd�Zed&dd	��Zed
d��Z	edd
��Z
edd��Zedd��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zedd��Zd d!�Zed"d#��Zed$d%��ZdS)'rz�Integral adds methods that work on integral numbers.

    In short, these are conversion to int, pow with modulus, and the
    bit-string operations.
    r	cCr)z	int(self)rrr	r	r�__int__/r!zIntegral.__int__cCst|�S)z6Called whenever an index is needed, such as in slicing)rLrr	r	r�	__index__4rzIntegral.__index__NcCr)a4self ** exponent % modulus, but maybe faster.

        Accept the modulus argument if you want to support the
        3-argument version of pow(). Raise a TypeError if exponent < 0
        or any argument isn't Integral. Otherwise, just implement the
        2-argument version described in Complex.
        r)rr,�modulusr	r	rr-8s	zIntegral.__pow__cCr)z
self << otherrrr	r	r�
__lshift__Cr!zIntegral.__lshift__cCr)z
other << selfrrr	r	r�__rlshift__Hr!zIntegral.__rlshift__cCr)z
self >> otherrrr	r	r�
__rshift__Mr!zIntegral.__rshift__cCr)z
other >> selfrrr	r	r�__rrshift__Rr!zIntegral.__rrshift__cCr)zself & otherrrr	r	r�__and__Wr!zIntegral.__and__cCr)zother & selfrrr	r	r�__rand__\r!zIntegral.__rand__cCr)zself ^ otherrrr	r	r�__xor__ar!zIntegral.__xor__cCr)zother ^ selfrrr	r	r�__rxor__fr!zIntegral.__rxor__cCr)zself | otherrrr	r	r�__or__kr!zIntegral.__or__cCr)zother | selfrrr	r	r�__ror__pr!zIntegral.__ror__cCr)z~selfrrr	r	r�
__invert__ur!zIntegral.__invert__cCrC)zfloat(self) == float(int(self)))rErLrr	r	rr4{rFzIntegral.__float__cCrG)z"Integers are their own numerators.r	rr	r	rrJrHzIntegral.numeratorcCr)z!Integers have a denominator of 1.�r	rr	r	rrK�r!zIntegral.denominatorrI)r
rrr
rrrMrNr-rPrQrRrSrTrUrVrWrXrYrZr4r3rJrKr	r	r	rr&sF













rN)r
�abcrr�__all__rr�registerrDrrErrrLr	r	r	r�<module>s
p
uc