Edit File: numbers.cpython-38.opt-1.pyc
U ����@��d(����������������������@���s����d�Z�ddlmZmZ�dddddgZG�dd��ded �ZG�d d��de�Ze�e��G�dd��de�Z e �e ��G�dd��de �ZG�d d��de�Ze�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�������������������@���s���e�Zd�ZdZdZdZdS�)r���z�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/python38/lib64/python3.8/numbers.pyr������s���)� metaclassc�������������������@���s����e�Zd�ZdZdZedd���Zdd��Zeedd����Z eed d ����Z edd���Zed d���Zedd���Z edd���Zdd��Zdd��Zedd���Zedd���Zedd���Zedd���Zedd ���Zed!d"���Zed#d$���Zed%d&���Zed'd(���Zd)S�)*r���ab��Complex 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 ���c�����������������C���s���dS�)z<Return a builtin complex instance. Called for complex(self).Nr �����selfr ���r ���r����__complex__-���s����zComplex.__complex__c�����������������C���s���|�dkS�)z)True if self != 0. Called for bool(self).r���r ���r���r ���r ���r����__bool__1���s����zComplex.__bool__c�����������������C���s���t��dS�)zXRetrieve the real component of this number. This should subclass Real. N��NotImplementedErrorr���r ���r ���r����real5���s����zComplex.realc�����������������C���s���t��dS�)z]Retrieve the imaginary component of this number. This should subclass Real. Nr���r���r ���r ���r����imag>���s����zComplex.imagc�����������������C���s���t��dS�)zself + otherNr����r����otherr ���r ���r����__add__G���s����zComplex.__add__c�����������������C���s���t��dS�)zother + selfNr���r���r ���r ���r����__radd__L���s����zComplex.__radd__c�����������������C���s���t��dS�)z-selfNr���r���r ���r ���r����__neg__Q���s����zComplex.__neg__c�����������������C���s���t��dS�)z+selfNr���r���r ���r ���r����__pos__V���s����zComplex.__pos__c�����������������C���s ���|�|��S�)zself - otherr ���r���r ���r ���r����__sub__[���s����zComplex.__sub__c�����������������C���s ���|��|�S�)zother - selfr ���r���r ���r ���r����__rsub___���s����zComplex.__rsub__c�����������������C���s���t��dS�)zself * otherNr���r���r ���r ���r����__mul__c���s����zComplex.__mul__c�����������������C���s���t��dS�)zother * selfNr���r���r ���r ���r����__rmul__h���s����zComplex.__rmul__c�����������������C���s���t��dS�)z5self / other: Should promote to float when necessary.Nr���r���r ���r ���r����__truediv__m���s����zComplex.__truediv__c�����������������C���s���t��dS�)zother / selfNr���r���r ���r ���r����__rtruediv__r���s����zComplex.__rtruediv__c�����������������C���s���t��dS�)zBself**exponent; should promote to float or complex when necessary.Nr���)r����exponentr ���r ���r����__pow__w���s����zComplex.__pow__c�����������������C���s���t��dS�)zbase ** selfNr���)r����baser ���r ���r����__rpow__|���s����zComplex.__rpow__c�����������������C���s���t��dS�)z7Returns the Real distance from 0. Called for abs(self).Nr���r���r ���r ���r����__abs__����s����zComplex.__abs__c�����������������C���s���t��dS�)z$(x+y*i).conjugate() returns (x-y*i).Nr���r���r ���r ���r���� conjugate����s����zComplex.conjugatec�����������������C���s���t��dS�)z self == otherNr���r���r ���r ���r����__eq__����s����zComplex.__eq__N)r ���r���r���r ���r���r���r���r����propertyr���r���r���r���r���r���r ���r!���r"���r#���r$���r%���r'���r)���r*���r+���r,���r ���r ���r ���r���r��� ���sN��� c�������������������@���s����e�Zd�ZdZdZedd���Zedd���Zedd���Zed d ���Z ed&dd ��Z dd��Zdd��Zedd���Z edd���Zedd���Zedd���Zedd���Zedd���Zdd��Zed d!���Zed"d#���Zd$d%��ZdS�)'r���z�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 ���c�����������������C���s���t��dS�)zTAny Real can be converted to a native float object. Called for float(self).Nr���r���r ���r ���r���� __float__����s����zReal.__float__c�����������������C���s���t��dS�)aG��trunc(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". Nr���r���r ���r ���r���� __trunc__����s����zReal.__trunc__c�����������������C���s���t��dS�)z$Finds the greatest Integral <= self.Nr���r���r ���r ���r���� __floor__����s����zReal.__floor__c�����������������C���s���t��dS�)z!Finds the least Integral >= self.Nr���r���r ���r ���r����__ceil__����s����z Real.__ceil__Nc�����������������C���s���t��dS�)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. Nr���)r���Zndigitsr ���r ���r���� __round__����s����zReal.__round__c�����������������C���s���|�|�|�|�fS�)z�divmod(self, other): The pair (self // other, self % other). Sometimes this can be computed faster than the pair of operations. r ���r���r ���r ���r���� __divmod__����s����zReal.__divmod__c�����������������C���s���||��||��fS�)z�divmod(other, self): The pair (self // other, self % other). Sometimes this can be computed faster than the pair of operations. r ���r���r ���r ���r����__rdivmod__����s����zReal.__rdivmod__c�����������������C���s���t��dS�)z)self // other: The floor() of self/other.Nr���r���r ���r ���r����__floordiv__����s����zReal.__floordiv__c�����������������C���s���t��dS�)z)other // self: The floor() of other/self.Nr���r���r ���r ���r���� __rfloordiv__����s����zReal.__rfloordiv__c�����������������C���s���t��dS�)zself % otherNr���r���r ���r ���r����__mod__����s����zReal.__mod__c�����������������C���s���t��dS�)zother % selfNr���r���r ���r ���r����__rmod__����s����z Real.__rmod__c�����������������C���s���t��dS�)zRself < other < on Reals defines a total ordering, except perhaps for NaN.Nr���r���r ���r ���r����__lt__����s����zReal.__lt__c�����������������C���s���t��dS�)z self <= otherNr���r���r ���r ���r����__le__����s����zReal.__le__c�����������������C���s���t�t|���S�)z(complex(self) == complex(float(self), 0))�complex�floatr���r ���r ���r���r�������s����zReal.__complex__c�����������������C���s���|� �S�)z&Real numbers are their real component.r ���r���r ���r ���r���r�������s����z Real.realc�����������������C���s���dS�)z)Real numbers have no imaginary component.r���r ���r���r ���r ���r���r�������s����z Real.imagc�����������������C���s���|� �S�)zConjugate is a no-op for Reals.r ���r���r ���r ���r���r+�����s����zReal.conjugate)N)r ���r���r���r ���r���r���r.���r/���r0���r1���r2���r3���r4���r5���r6���r7���r8���r9���r:���r���r-���r���r���r+���r ���r ���r ���r���r�������s@��� c�������������������@���s<���e�Zd�ZdZdZeedd����Zeedd����Zdd��Z d S�) r���z6.numerator and .denominator should be in lowest terms.r ���c�����������������C���s���t��d�S��Nr���r���r ���r ���r���� numerator��s����zRational.numeratorc�����������������C���s���t��d�S�r=���r���r���r ���r ���r����denominator��s����zRational.denominatorc�����������������C���s���|�j�|�j�S�)a��float(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. )r>���r?���r���r ���r ���r���r.�����s����zRational.__float__N) r ���r���r���r ���r���r-���r���r>���r?���r.���r ���r ���r ���r���r�����s���c�������������������@���s����e�Zd�ZdZdZedd���Zdd��Zed&dd ��Zed d���Z edd ���Z edd���Zedd���Zedd���Z edd���Zedd���Zedd���Zedd���Zedd���Zedd���Zd d!��Zed"d#���Zed$d%���ZdS�)'r���z@Integral adds a conversion to int and the bit-string operations.r ���c�����������������C���s���t��dS�)z int(self)Nr���r���r ���r ���r����__int__+��s����zIntegral.__int__c�����������������C���s���t�|��S�)z6Called whenever an index is needed, such as in slicing)�intr���r ���r ���r���� __index__0��s����zIntegral.__index__Nc�����������������C���s���t��dS�)a4��self ** 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. Nr���)r���r&����modulusr ���r ���r���r'���4��s���� zIntegral.__pow__c�����������������C���s���t��dS�)z self << otherNr���r���r ���r ���r���� __lshift__?��s����zIntegral.__lshift__c�����������������C���s���t��dS�)z other << selfNr���r���r ���r ���r����__rlshift__D��s����zIntegral.__rlshift__c�����������������C���s���t��dS�)z self >> otherNr���r���r ���r ���r���� __rshift__I��s����zIntegral.__rshift__c�����������������C���s���t��dS�)z other >> selfNr���r���r ���r ���r����__rrshift__N��s����zIntegral.__rrshift__c�����������������C���s���t��dS�)zself & otherNr���r���r ���r ���r����__and__S��s����zIntegral.__and__c�����������������C���s���t��dS�)zother & selfNr���r���r ���r ���r����__rand__X��s����zIntegral.__rand__c�����������������C���s���t��dS�)zself ^ otherNr���r���r ���r ���r����__xor__]��s����zIntegral.__xor__c�����������������C���s���t��dS�)zother ^ selfNr���r���r ���r ���r����__rxor__b��s����zIntegral.__rxor__c�����������������C���s���t��dS�)zself | otherNr���r���r ���r ���r����__or__g��s����zIntegral.__or__c�����������������C���s���t��dS�)zother | selfNr���r���r ���r ���r����__ror__l��s����zIntegral.__ror__c�����������������C���s���t��dS�)z~selfNr���r���r ���r ���r���� __invert__q��s����zIntegral.__invert__c�����������������C���s���t�t|���S�)zfloat(self) == float(int(self)))r<���rA���r���r ���r ���r���r.���w��s����zIntegral.__float__c�����������������C���s���|� �S�)z"Integers are their own numerators.r ���r���r ���r ���r���r>���{��s����zIntegral.numeratorc�����������������C���s���dS�)z!Integers have a denominator of 1.����r ���r���r ���r ���r���r?������s����zIntegral.denominator)N)r ���r���r���r ���r���r���r@���rB���r'���rD���rE���rF���rG���rH���rI���rJ���rK���rL���rM���rN���r.���r-���r>���r?���r ���r ���r ���r���r���&��sD��� N)r ����abcr���r����__all__r���r����registerr;���r���r<���r���r���rA���r ���r ���r ���r����<module>���s���p u _