Current File : //proc/self/root/usr/lib/python3.12/__pycache__/fractions.cpython-312.pyc
�

�4h������dZddlmZddlZddlZddlZddlZddlZddlZdgZ	ejjZejjZejd��d��Zej"dej$ej&z�Zd
d	�Zd
�Zej"dej.ej$z�j0ZGd�dej4�Zy)z/Fraction, infinite-precision, rational numbers.���DecimalN�Fractioni@)�maxsizec��	t|dt�}ttt|��|z�}|dk\r|n|}|dk(rdS|S#t$r	t
}Y�$wxYw)N���r���)�pow�_PyHASH_MODULUS�hash�abs�
ValueError�_PyHASH_INF)�	numerator�denominator�dinv�hash_�results     � /usr/lib/python3.12/fractions.py�_hash_algorithmrse��2��;��O�4��(�T�#�i�.�)�D�0�1���1�n�U�5�&�F��2��2�)�6�)��+�����s�A�A�Aa�
    \A\s*                                  # optional whitespace at the start,
    (?P<sign>[-+]?)                        # an optional sign, then
    (?=\d|\.\d)                            # lookahead for digit or .digit
    (?P<num>\d*|\d+(_\d+)*)                # numerator (possibly empty)
    (?:                                    # followed by
       (?:\s*/\s*(?P<denom>\d+(_\d+)*))?   # an optional denominator
    |                                      # or
       (?:\.(?P<decimal>\d*|\d+(_\d+)*))?  # an optional fractional part
       (?:E(?P<exp>[-+]?\d+(_\d+)*))?      # and optional exponent
    )
    \s*\Z                                  # and optional whitespace to finish
c��|dk\r	|d|zz}n	|d|zz}t||dz	z|�\}}|dk(r
|dzdk(r|dz}|r|dkn|dk}|t|�fS)aMRound a rational number to the nearest multiple of a given power of 10.

    Rounds the rational number n/d to the nearest integer multiple of
    10**exponent, rounding to the nearest even integer multiple in the case of
    a tie. Returns a pair (sign: bool, significand: int) representing the
    rounded value (-1)**sign * significand * 10**exponent.

    If no_neg_zero is true, then the returned sign will always be False when
    the significand is zero. Otherwise, the sign reflects the sign of the
    input.

    d must be positive, but n and d need not be relatively prime.
    r�
�r	)�divmodr
)�n�d�exponent�no_neg_zero�q�r�signs       r�_round_to_exponentr"Js|���1�}�	�R��\���	�R�(��]����!�q�A�v�,��"�D�A�q��A�v�!�a�%�1�*�	�R����1�q�5�Q��U�D���Q��<��c��|dk(rddd|z
fStt|��t|�}}t|�t|�z
||kz}||z
}t|||�\}}tt|��|dzk(r
|dz}|dz
}|||fS)a�Round a rational number to a given number of significant figures.

    Rounds the rational number n/d to the given number of significant figures
    using the round-ties-to-even rule, and returns a triple
    (sign: bool, significand: int, exponent: int) representing the rounded
    value (-1)**sign * significand * 10**exponent.

    In the special case where n = 0, returns a significand of zero and
    an exponent of 1 - figures, for compatibility with formatting.
    Otherwise, the returned significand satisfies
    10**(figures - 1) <= significand < 10**figures.

    d must be positive, but n and d need not be relatively prime.
    figures must be positive.
    rFrr)�strr
�lenr")	rr�figures�str_n�str_d�mrr!�significands	         r�_round_to_figuresr,gs���"	�A�v��a��W��$�$��s�1�v�;��A��5�E��E�
�S��Z��5�E�>�2�A��7�{�H�*�1�a��:��D�+��3�{����!��+������A�
����h�&�&r#a�
    (?:
        (?P<fill>.)?
        (?P<align>[<>=^])
    )?
    (?P<sign>[-+ ]?)
    (?P<no_neg_zero>z)?
    (?P<alt>\#)?
    # A '0' that's *not* followed by another digit is parsed as a minimum width
    # rather than a zeropad flag.
    (?P<zeropad>0(?=[0-9]))?
    (?P<minimumwidth>0|[1-9][0-9]*)?
    (?P<thousands_sep>[,_])?
    (?:\.(?P<precision>0|[1-9][0-9]*))?
    (?P<presentation_type>[eEfFgG%])
c���eZdZdZdZd,�fd�	Zed��Zed��Ze�fd��Z	d�Z
d�Zd-d	�Ze
d
��Ze
d��Zd�Zd
�Zd�Zd�Zd�Zeeej,�\ZZd�Zeeej4�\ZZd�Zeeej<�\ZZ d�Z!ee!ejD�\Z#Z$d�Z%ee%ejL�\Z'Z(d�Z)ee)e*�\Z+Z,d�Z-ee-ej\�\Z/Z0d�Z1d�Z2d�Z3d�Z4d�Z5ejlfd�Z7d�Z8d�Z9d�Z:d.d �Z;d!�Z<d"�Z=d#�Z>d$�Z?d%�Z@d&�ZAd'�ZBd(�ZCd)�ZDd*�ZEd+�ZF�xZGS)/ra]This class implements rational numbers.

    In the two-argument form of the constructor, Fraction(8, 6) will
    produce a rational number equivalent to 4/3. Both arguments must
    be Rational. The numerator defaults to 0 and the denominator
    defaults to 1 so that Fraction(3) == 3 and Fraction() == 0.

    Fractions can also be constructed from:

      - numeric strings similar to those accepted by the
        float constructor (for example, '-2.3' or '1e10')

      - strings of the form '123/456'

      - float and Decimal instances

      - other Rational instances (including integers)

    ��
_numerator�_denominatorc�B��tt|�|�}|���t|�tur||_d|_|St|tj�r$|j|_|j|_|St|ttf�r|j�\|_|_|St|t�r�t j#|�}|�t%d|z��t	|j'd�xsd�}|j'd�}|rt	|�}n�d}|j'd�}|r6|j)dd�}d	t+|�z}||zt	|�z}||z}|j'd
�}|r"t	|�}|dk\r	|d	|zz}n	|d	|zz}|j'd�d
k(r�|}n�t-d��t|�tcxur
t|�urnnnrt|tj�rMt|tj�r3|j|jz|j|jz}}nt-d��|dk(rt/d|z��t1j2||�}	|dkr|	}	||	z}||	z}||_||_|S)a�Constructs a Rational.

        Takes a string like '3/2' or '1.5', another Rational instance, a
        numerator/denominator pair, or a float.

        Examples
        --------

        >>> Fraction(10, -8)
        Fraction(-5, 4)
        >>> Fraction(Fraction(1, 7), 5)
        Fraction(1, 35)
        >>> Fraction(Fraction(1, 7), Fraction(2, 3))
        Fraction(3, 14)
        >>> Fraction('314')
        Fraction(314, 1)
        >>> Fraction('-35/4')
        Fraction(-35, 4)
        >>> Fraction('3.1415') # conversion from numeric string
        Fraction(6283, 2000)
        >>> Fraction('-47e-2') # string may include a decimal exponent
        Fraction(-47, 100)
        >>> Fraction(1.47)  # direct construction from float (exact conversion)
        Fraction(6620291452234629, 4503599627370496)
        >>> Fraction(2.25)
        Fraction(9, 4)
        >>> Fraction(Decimal('1.47'))
        Fraction(147, 100)

        rz Invalid literal for Fraction: %r�num�0�denom�decimal�_�r�exprr!�-z2argument should be a string or a Rational instancez+both arguments should be Rational instances�Fraction(%s, 0))�superr�__new__�type�intr/r0�
isinstance�numbers�Rationalrr�floatr�as_integer_ratior%�_RATIONAL_FORMAT�matchr�group�replacer&�	TypeError�ZeroDivisionError�math�gcd)�clsrr�selfr*r4r5�scaler8�g�	__class__s          �rr<zFraction.__new__�s����>�X�s�+�C�0�����I��#�%�"+���$%��!����I�w�'7�'7�8�"+�"5�"5���$-�$9�$9��!����I��w�'7�8�5>�5O�5O�5Q�2����!2����I�s�+�$�*�*�9�5���9�$�%G�%.�&/�0�0������� 5�#�6�	�����(���"%�e�*�K�"#�K��g�g�i�0�G��")�/�/�#�r�":�� "�C��L� 0��$-��$5��G��$D�	�#�u�,���'�'�%�.�C��!�#�h���!�8�%��S��0�I�'�2��t�8�3�K��7�7�6�?�c�)�!*�
�I� �!9�:�:��)�_��
8�t�K�'8�
8����G�$4�$4�5��{�G�$4�$4�5��#�#�k�&=�&=�=��%�%�	�(=�(=�=�#�I�
�1�2�
2��!��#�$5�	�$A�B�B��H�H�Y��,����?���A��a��	�����#���'����r#c	��t|tj�r||�St|t�s1t	|j
�d|�dt
|�j
�d���|j|j��S)z�Converts a finite float to a rational number, exactly.

        Beware that Fraction.from_float(0.3) != Fraction(3, 10).

        z%.from_float() only takes floats, not � (�))	r?r@�IntegralrBrH�__name__r=�_from_coprime_intsrC)rL�fs  r�
from_floatzFraction.from_float#sm���a��)�)�*��q�6�M��A�u�%�� �\�\�1�d�1�g�.>�.>�@�A�
A�%�s�%�%�q�'9�'9�';�<�<r#c	��ddlm}t|tj�r|t|��}n=t||�s1t
|j�d|�dt|�j�d���|j|j��S)zAConverts a finite Decimal instance to a rational number, exactly.rrz).from_decimal() only takes Decimals, not rRrS)r5rr?r@rTr>rHrUr=rVrC)rL�decrs   r�from_decimalzFraction.from_decimal1st��	$��c�7�+�+�,��#�c�(�#�C��C��)�����s�D��I�$6�$6�8�9�
9�&�s�%�%�s�';�';�'=�>�>r#c�J��tt|�|�}||_||_|S)z�Convert a pair of ints to a rational number, for internal use.

        The ratio of integers should be in lowest terms and the denominator
        should be positive.
        )r;rr<r/r0)rLrr�objrPs    �rrVzFraction._from_coprime_ints=s*����H�c�*�3�/��"���&����
r#c� �|jdk(S)z*Return True if the Fraction is an integer.r�r0�rMs r�
is_integerzFraction.is_integerIs��� � �A�%�%r#c�2�|j|jfS)z�Return a pair of integers, whose ratio is equal to the original Fraction.

        The ratio is in lowest terms and has a positive denominator.
        r.r`s rrCzFraction.as_integer_ratioMs��
����!2�!2�3�3r#c��|dkrtd��|j|krt|�Sd\}}}}|j|j}}	||z}|||zz}	|	|kDrn|||||zz|	f\}}}}||||zz
}}�/||z
|z}
d|z||
|zzz|jkrtj	||�Stj	||
|zz||
|zz�S)aWClosest Fraction to self with denominator at most max_denominator.

        >>> Fraction('3.141592653589793').limit_denominator(10)
        Fraction(22, 7)
        >>> Fraction('3.141592653589793').limit_denominator(100)
        Fraction(311, 99)
        >>> Fraction(4321, 8765).limit_denominator(10000)
        Fraction(4321, 8765)

        rz$max_denominator should be at least 1)rrrr�)rr0rr/rV)rM�max_denominator�p0�q0�p1�q1rr�a�q2�ks           r�limit_denominatorzFraction.limit_denominatorTs��@�Q���C�D�D�����/��D�>�!�#���B��B����� 1� 1�1����1��A��A�b�D��B��O�#����R��"��W�b�0�N�B��B���a��!��e�q�A�
��R�
�"�$��
�Q�3��1�R�4��=�D�-�-�-��.�.�r�2�6�6��.�.�r�!�B�$�w��1�R�4��@�@r#c��|jS�N)r/�rjs rrzFraction.numerator�s���|�|�r#c��|jSror_rps rrzFraction.denominator�s���~�~�r#c�h�|jj�d|j�d|j�d�S)z
repr(self)�(z, rS)rPrUr/r0r`s r�__repr__zFraction.__repr__�s*��#�~�~�6�6�#����0A�0A�C�	Cr#c��|jdk(rt|j�S|j�d|j��S)z	str(self)r�/)r0r%r/r`s r�__str__zFraction.__str__�s4������!��t���'�'�"�o�o�t�/@�/@�A�Ar#c
��� �!�|st|�St|�}|�$td|�dt|�j����|d�*|d�%td|�dt|�j�d���|dxsd}|dxsd	}|d
dk(rdn|d
}t|d
�}t|d�}t|d�}t
|dxsd�}	|d�!t
|dxsd�}
|d}|dvxr|}|}
|dvrdnd}|dvr7|
}|dk(r|dz}t|j|j||�\}}d}|
}nY|dvrt|
d�n|
dz}t|j|j|�\}}}|dvxs|dkDxs||zd k}|r|dz
n|}|dk(rd}n|r|�||zd!��}nd}|d|dz�d"��}|rdn|}|dt|�|z
� |t|�|z
d}|r|jd�}|
r|sdnd#}||z|z}|r8|	t|�z
t|�z
}� j�!rd$|zd%zdzn|�� �!rIdt� �dz
d$zz}� d|dj� �!fd&�t!|t� �d$�D��z� � |z}||	t|�z
t|�z
z}|d	k(r||z|zS|d'k(r||z|zS|d(k(rt|�dz}|d||z|z||dzS||z|zS))zAFormat this fraction according to the given format specification.NzInvalid format specifier z for object of type �align�zeropadz0; can't use explicit alignment when zero-padding�fill� �>r!r9r7r�alt�minimumwidthr3�
thousands_sep�	precision�6�presentation_type�gG�EFG�E�ezfF%�%rdFr�eEr���z+03dr�.��c3�4�K�|]}��||dzz���y�w)r�N�)�.0�pos�leadingr�s  ��r�	<genexpr>z&Fraction.__format__.<locals>.<genexpr>s)�����4�����c�A�g� 6�6�4�s��<�^)r%�#_FLOAT_FORMAT_SPECIFICATION_MATCHERrr=rU�boolr>r"r/r0�maxr,r&�rstrip�zfill�join�range)"rM�format_specrEr{ry�pos_signr�alternate_formrzrr�r��
trim_zeros�
trim_point�exponent_indicatorr�negativer+�
scientific�	point_posr'�suffix�digitsr!�	frac_part�	separator�trailing�min_leading�	first_pos�body�padding�halfr�r�s"                                @@r�
__format__zFraction.__format__�s�����t�9��4�K�@���=��+�K�?�;&�&*�4�j�&9�&9�%<�>��
��7�^�
'�E�)�,<�,H��+�K�?�;&�&*�4�j�&9�&9�%<�=A�A��
�
�V�}�#����g��%�#���v��#�-�2�5��=���5��/�0���e�E�l�+���u�Y�'�(���5��0�7�C�8���o�.�
���k�*�1�c�2�	�!�"5�6��&�$�.�E�~�3E�
�'�'�
�$5��$>�S�C����%�!�z�H� �C�'��A�
��$6�����!2�!2�H�k�%K�!�H�k��J�!�I�%��,��I�q�!���]�
�
/@�����!2�!2�G�/=�+�H�k�8�"�T�)�,��a�<�,��g�%��+�
�
(2��!���y�I���#��F�
�*�+�H�y�,@��+F�G�F��F� ��)�a�-���1�2��
�s�H���2�3�v�;��2�3���3�v�;��2�4�5�	��!�(�(��-�I�$�Y�B�C�	��y�(�6�1���&��T��2�S��]�B�K��m�m�,9��K��1�$�q�(�{��G�
��S��\�A�-��2�2�I��j�y�)�B�G�G�4� ��C��L�!�<�4�-��G���!���,��T��2�S��Y�>�?���C�<��T�>�D�(�(�
�c�\��$�;��(�(�
�c�\��w�<�1�$�D��5�D�>�D�(�4�/�'�$�%�.�@�@��'�>�D�(�(r#c�������fd�}d�jzdz|_�j|_��fd�}d�jzdz|_�j|_||fS)a�Generates forward and reverse operators given a purely-rational
        operator and a function from the operator module.

        Use this like:
        __op__, __rop__ = _operator_fallbacks(just_rational_op, operator.op)

        In general, we want to implement the arithmetic operations so
        that mixed-mode operations either call an implementation whose
        author knew about the types of both arguments, or convert both
        to the nearest built in type and do the operation there. In
        Fraction, that means that we define __add__ and __radd__ as:

            def __add__(self, other):
                # Both types have numerators/denominator attributes,
                # so do the operation directly
                if isinstance(other, (int, Fraction)):
                    return Fraction(self.numerator * other.denominator +
                                    other.numerator * self.denominator,
                                    self.denominator * other.denominator)
                # float and complex don't have those operations, but we
                # know about those types, so special case them.
                elif isinstance(other, float):
                    return float(self) + other
                elif isinstance(other, complex):
                    return complex(self) + other
                # Let the other type take over.
                return NotImplemented

            def __radd__(self, other):
                # radd handles more types than add because there's
                # nothing left to fall back to.
                if isinstance(other, numbers.Rational):
                    return Fraction(self.numerator * other.denominator +
                                    other.numerator * self.denominator,
                                    self.denominator * other.denominator)
                elif isinstance(other, Real):
                    return float(other) + float(self)
                elif isinstance(other, Complex):
                    return complex(other) + complex(self)
                return NotImplemented


        There are 5 different cases for a mixed-type addition on
        Fraction. I'll refer to all of the above code that doesn't
        refer to Fraction, float, or complex as "boilerplate". 'r'
        will be an instance of Fraction, which is a subtype of
        Rational (r : Fraction <: Rational), and b : B <:
        Complex. The first three involve 'r + b':

            1. If B <: Fraction, int, float, or complex, we handle
               that specially, and all is well.
            2. If Fraction falls back to the boilerplate code, and it
               were to return a value from __add__, we'd miss the
               possibility that B defines a more intelligent __radd__,
               so the boilerplate should return NotImplemented from
               __add__. In particular, we don't handle Rational
               here, even though we could get an exact answer, in case
               the other type wants to do something special.
            3. If B <: Fraction, Python tries B.__radd__ before
               Fraction.__add__. This is ok, because it was
               implemented with knowledge of Fraction, so it can
               handle those instances before delegating to Real or
               Complex.

        The next two situations describe 'b + r'. We assume that b
        didn't know about Fraction in its implementation, and that it
        uses similar boilerplate code:

            4. If B <: Rational, then __radd_ converts both to the
               builtin rational type (hey look, that's us) and
               proceeds.
            5. Otherwise, __radd__ tries to find the nearest common
               base ABC, and fall back to its builtin type. Since this
               class doesn't subclass a concrete type, there's no
               implementation to fall back to, so we need to try as
               hard as possible to return an actual value, or the user
               will get a TypeError.

        c���t|t�r	�||�St|t�r�|t|��St|t�r�t|�|�St|t�r�t	|�|�St
Sro)r?rr>rB�complex�NotImplemented)rj�b�fallback_operator�monomorphic_operators  ��r�forwardz-Fraction._operator_fallbacks.<locals>.forwardesq����!�X�&�+�A�q�1�1��A�s�#�+�A�x��{�;�;��A�u�%�(��q��1�5�5��A�w�'�(����Q�7�7�%�%r#�__c�<��t|tj�r�t|�|�St|tj�r�t|�t|��St|tj�r�t|�t|��StSro)	r?r@rAr�RealrB�Complexr�r�)r�rjr�r�s  ��r�reversez-Fraction._operator_fallbacks.<locals>.reversessp����!�W�-�-�.�+�H�Q�K��;�;��A�w�|�|�,�(��q��5��8�<�<��A�w���/�(����W�Q�Z�@�@�%�%r#�__r)rU�__doc__)r�r�r�r�s``  r�_operator_fallbackszFraction._operator_fallbackssi���`
	&� �"3�"<�"<�<�t�C���.�6�6���		&�!�#4�#=�#=�=��D���.�6�6������r#c��|j|j}}|j|j}}tj||�}|dk(r"tj||z||zz||z�S||z}|||zz||zz}tj||�}	|	dk(rtj|||z�Stj||	z|||	zz�S)za + br�r/r0rJrKrrV�
rjr��na�da�nb�dbrO�s�t�g2s
          r�_addz
Fraction._add��������q�~�~�B�����q�~�~�B���H�H�R������6��.�.�r�B�w��b��/@�"�r�'�J�J��!�G���"��'�N�R�!�V�#��
�X�X�a��^��
��7��.�.�q�!�b�&�9�9��*�*�1��7�A��r��N�C�Cr#c��|j|j}}|j|j}}tj||�}|dk(r"tj||z||zz
||z�S||z}|||zz||zz
}tj||�}	|	dk(rtj|||z�Stj||	z|||	zz�S)za - brr�r�s
          r�_subz
Fraction._sub�r�r#c�.�|j|j}}|j|j}}tj||�}|dkDr
||z}||z}tj||�}|dkDr
||z}||z}tj||z||z�S)za * brr�)rjr�r�r�r�r��g1r�s        r�_mulz
Fraction._mul�s������q�~�~�B�����q�~�~�B��
�X�X�b�"�
��
��6��2�I�B��2�I�B�
�X�X�b�"�
��
��6��2�I�B��2�I�B��*�*�2��7�B��G�<�<r#c�r�|j|j}}|dk(rtd|z��|j|j}}tj||�}|dkDr
||z}||z}tj||�}|dkDr
||z}||z}||z||z}	}|	dkr||	}	}t
j
||	�S)za / brr:r)r/r0rIrJrKrrV)
rjr�r�r�r�r�r�r�rrs
          r�_divz
Fraction._div�s������q�~�~�B��
��7�#�$5��$:�;�;����q�~�~�B��
�X�X�b�"�
��
��6��2�I�B��2�I�B�
�X�X�b�"�
��
��6��2�I�B��2�I�B��B�w��R��1���q�5��2��r�q�A��*�*�1�a�0�0r#c�h�|j|jz|j|jzzS)za // b)rr�rjr�s  r�	_floordivzFraction._floordivs'�����a�m�m�+�������1L�M�Mr#c��|j|j}}t|j|z||jz�\}}|t|||z�fS)z(a // b, a % b))rrrr)rjr�r�r��div�n_mods      r�_divmodzFraction._divmodsK������
�
�B���A�K�K�"�,�b�1�;�;�.>�?�
��U��H�U�B��G�,�,�,r#c��|j|j}}t|j|z|j|zz||z�S)za % b)rrr)rjr�r�r�s    r�_modz
Fraction._mods;������
�
�B������r�)�a�k�k�B�.>�?��b��I�Ir#c�b�t|tj��r|jdk(r�|j}|dk\r0t
j
|j|z|j|z�S|jdkDr2t
j
|j|z|j|z�S|jdk(rtd|j|zz��t
j
|j|z|j|z�St|�t|�zSt|�|zS)z�a ** b

        If b is not an integer, the result will be a float or complex
        since roots are generally irrational. If b is an integer, the
        result will be rational.

        rrr:)r?r@rArrrrVr/r0rIrB)rjr��powers   r�__pow__zFraction.__pow__!s#���a��)�)�*��}�}��!������A�:�#�6�6�q�|�|�u�7L�78�~�~��7N�P�P��\�\�A�%�#�6�6�q�~�~�%��7O�78�|�|��v�7M�O�O��\�\�Q�&�+�,=�,-�N�N�u�f�,D�-E�F�F�$�6�6�����U�F�7R�9:���
�5�&�7P�R�R�
�Q�x�5��8�+�+���8�q�=� r#c�.�|jdk(r|jdk\r||jzSt|tj�r#t|j|j�|zS|jdk(r||jzS|t|�zS)za ** brr)	r0r/r?r@rArrrrB)r�rjs  r�__rpow__zFraction.__rpow__?s{���>�>�Q��1�<�<�1�#4�����$�$��a��)�)�*��A�K�K����7�1�<�<��>�>�Q������$�$��E�!�H�}�r#c�V�tj|j|j�S)z++a: Coerces a subclass instance to Fraction�rrVr/r0rps r�__pos__zFraction.__pos__Ms���*�*�1�<�<����H�Hr#c�X�tj|j|j�S)z-ar�rps r�__neg__zFraction.__neg__Qs���*�*�A�L�L�=�!�.�.�I�Ir#c�h�tjt|j�|j�S)zabs(a))rrVr
r/r0rps r�__abs__zFraction.__abs__Us"���*�*�3�q�|�|�+<�a�n�n�M�Mr#c��|jdkr!||j|jz�S||j|jz�S)zint(a)rr.)rj�_indexs  r�__int__zFraction.__int__YsC���<�<�!���Q�\�\�M�Q�^�^�;�<�=�=��!�,�,�!�.�.�8�9�9r#c��|jdkr|j|jzS|j|jzS)z
math.trunc(a)rr.rps r�	__trunc__zFraction.__trunc__`s9���<�<�!���l�l�]�a�n�n�4�5�5��<�<�1�>�>�1�1r#c�4�|j|jzS)z
math.floor(a)r.rps r�	__floor__zFraction.__floor__gs���|�|�q�~�~�-�-r#c�8�|j|jzS)zmath.ceil(a)r.rps r�__ceil__zFraction.__ceil__ks���,�,��!�.�.�0�1�1r#c�&�|�K|j}t|j|�\}}|dz|kr|S|dz|kDr|dzS|dzdk(r|S|dzSdt|�z}|dkDrt	t||z�|�St	t||z�|z�S)z?round(self, ndigits)

        Rounds half toward even.
        rdrrr)r0rr/r
r�round)rM�ndigitsr�floor�	remainder�shifts      r�	__round__zFraction.__round__ps���
�?��!�!�A�%�d�o�o�q�9��E�9��1�}�q� ����Q���"��q�y� ����a�����q�y� ��C��L� ���Q�;��E�$��,�/��7�7��E�$��,�/�%�7�8�8r#c�B�t|j|j�S)z
hash(self))rr/r0r`s r�__hash__zFraction.__hash__�s���t����0A�0A�B�Br#c��t|�tur |j|k(xr|jdk(St	|t
j�r4|j|jk(xr|j|jk(St	|t
j�r|jdk(r|j}t	|t�rCtj|�stj|�rd|k(S||j!|�k(St"S)za == brr�)r=r>r/r0r?r@rArrr��imag�realrBrJ�isnan�isinfrXr�r�s  r�__eq__zFraction.__eq__�s�����7�c�>��<�<�1�$�<����1�)<�<��a��)�)�*��L�L�A�K�K�/�4��N�N�a�m�m�3�
5��a����)�a�f�f��k����A��a����z�z�!�}��
�
�1�
��a�x���A�L�L��O�+�+�"�!r#c�f�t|tj�r7||j|jz|j
|jz�St|t�rKtj|�stj|�r	|d|�S|||j|��StS)acHelper for comparison operators, for internal use only.

        Implement comparison between a Rational instance `self`, and
        either another Rational instance or a float `other`.  If
        `other` is not a Rational instance or a float, return
        NotImplemented. `op` should be one of the six standard
        comparison operators.

        r�)
r?r@rAr/rr0rrBrJr�rrXr�)rM�other�ops   r�_richcmpzFraction._richcmp�s����e�W�-�-�.��d�o�o��(9�(9�9��'�'�%�/�/�9�;�
;��e�U�#��z�z�%� �D�J�J�u�$5��#�u�~�%��$����� 6�7�7�!�!r#c�B�|j|tj�S)za < b)r�operator�ltr�s  r�__lt__zFraction.__lt__�����z�z�!�X�[�[�)�)r#c�B�|j|tj�S)za > b)rr�gtr�s  r�__gt__zFraction.__gt__�r
r#c�B�|j|tj�S)za <= b)rr�ler�s  r�__le__zFraction.__le__�r
r#c�B�|j|tj�S)za >= b)rr�ger�s  r�__ge__zFraction.__ge__�r
r#c�,�t|j�S)za != 0)r�r/rps r�__bool__zFraction.__bool__�s���A�L�L�!�!r#c�J�|j|j|jffSro)rPr/r0r`s r�
__reduce__zFraction.__reduce__�s ��������$�2C�2C� D�E�Er#c�v�t|�tk(r|S|j|j|j�Sro�r=rrPr/r0r`s r�__copy__zFraction.__copy__��.����:��!��K��~�~�d�o�o�t�/@�/@�A�Ar#c�v�t|�tk(r|S|j|j|j�Sror)rM�memos  r�__deepcopy__zFraction.__deepcopy__�rr#)rN)i@Bro)HrU�
__module__�__qualname__r��	__slots__r<�classmethodrXr[rVrarCrm�propertyrrrtrwr�r�r�r�add�__add__�__radd__r��sub�__sub__�__rsub__r��mul�__mul__�__rmul__r��truediv�__truediv__�__rtruediv__r��floordiv�__floordiv__�
__rfloordiv__r�r�
__divmod__�__rdivmod__r��mod�__mod__�__rmod__r�r�r�r�r��indexr�r�r�r�r�r�rrr	r
rrrrrr�
__classcell__)rPs@rrr�s�����(/�I�g�R�=��=��	?��	?��	��	�&�4�7A�r��������C�
B�r)�hk �bD�,�D�(�,�,�?��G�X�D�,�D�(�,�,�?��G�X�=�,�D�(�,�,�?��G�X�1�(!4�D�(�:J�:J� K��K��N�#6�i��AR�AR�"S��L�-�-�2�'�6�B��J��J�
,�D�(�,�,�?��G�X�!�<�I�J�N�#�.�.�:�2�.�2�
9�4C�"�*"�,*�*�*�*�"�F�B�
Br#)F)r�r5r�	functoolsrJr@r�re�sys�__all__�	hash_info�modulusr�infr�	lru_cacher�compile�VERBOSE�
IGNORECASErDr"r,�DOTALL�	fullmatchr�rArr�r#r�<module>rGs���6������	�
��,��
�-�-�'�'���m�m��������w�'�*�(�*�@�2�:�:���Z�Z�"�-�-��!��"�:$'�R'1�b�j�j�2��Y�Y�����'�'�Y�$�$zB�w���zBr#
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!