+
    € ’eù-  ã                   óø   € R t ^ RIHtHt . ROt ! R R]R7      t ! R	 R]4      t]P                  ]4        ! R
 R]4      t	]	P                  ]
4        ! R R]	4      t ! R R]4      t]P                  ]4       R# )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                   ó"   € ] tR t^%tRtRtRtRtR# )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__Ú__firstlineno__Ú__doc__Ú	__slots__Ú__hash__Ú__static_attributes__r
   ó    ÚYC:\Users\johnn\AppData\Local\hermes\tools\python-3.14.9+20261021-win32-x64\Lib\numbers.pyr   r   %   s   † ñð
 €Ið „Hr   )Ú	metaclassc                   óN  a € ] tR t^9t o RtRt]R 4       tR t]	]R 4       4       t
]	]R 4       4       t]R 4       t]R 4       t]R 4       t]R	 4       tR
 tR t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tRtV tR# )r   aN  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.
c                ó   € R# )z<Return a builtin complex instance. Called for complex(self).Nr
   ©Úselfs   &r   Ú__complex__ÚComplex.__complex__F   s   ‚ r   c                ó   € V ^ 8g  # )z)True if self != 0. Called for bool(self).r
   r   s   &r   Ú__bool__ÚComplex.__bool__J   s   € à�q‰yÐr   c                ó   € \         h)zHRetrieve the real component of this number.

This should subclass Real.
©ÚNotImplementedErrorr   s   &r   ÚrealÚComplex.realN   ó
   € ô "Ð!r   c                ó   € \         h)zMRetrieve the imaginary component of this number.

This should subclass Real.
r    r   s   &r   ÚimagÚComplex.imagW   r$   r   c                ó   € \         h)zself + otherr    ©r   Úothers   &&r   Ú__add__ÚComplex.__add__`   ó
   € ô "Ð!r   c                ó   € \         h)zother + selfr    r)   s   &&r   Ú__radd__ÚComplex.__radd__e   r-   r   c                ó   € \         h)z-selfr    r   s   &r   Ú__neg__ÚComplex.__neg__j   r-   r   c                ó   € \         h)z+selfr    r   s   &r   Ú__pos__ÚComplex.__pos__o   r-   r   c                ó   € W) ,           # )zself - otherr
   r)   s   &&r   Ú__sub__ÚComplex.__sub__t   s   € à�f�}Ðr   c                ó   € V ) V,           # )zother - selfr
   r)   s   &&r   Ú__rsub__ÚComplex.__rsub__x   s   € àˆu�u�}Ðr   c                ó   € \         h)zself * otherr    r)   s   &&r   Ú__mul__ÚComplex.__mul__|   r-   r   c                ó   € \         h)zother * selfr    r)   s   &&r   Ú__rmul__ÚComplex.__rmul__�   r-   r   c                ó   € \         h)z5self / other: Should promote to float when necessary.r    r)   s   &&r   Ú__truediv__ÚComplex.__truediv__†   r-   r   c                ó   € \         h)zother / selfr    r)   s   &&r   Ú__rtruediv__ÚComplex.__rtruediv__‹   r-   r   c                ó   € \         h)zDself ** exponent; should promote to float or complex when necessary.r    )r   Úexponents   &&r   Ú__pow__ÚComplex.__pow__�   r-   r   c                ó   € \         h)zbase ** selfr    )r   Úbases   &&r   Ú__rpow__ÚComplex.__rpow__•   r-   r   c                ó   € \         h)z7Returns the Real distance from 0. Called for abs(self).r    r   s   &r   Ú__abs__ÚComplex.__abs__š   r-   r   c                ó   € \         h)z$(x+y*i).conjugate() returns (x-y*i).r    r   s   &r   Ú	conjugateÚComplex.conjugateŸ   r-   r   c                ó   € \         h)zself == otherr    r)   s   &&r   Ú__eq__ÚComplex.__eq__¤   r-   r   r
   N)r   r   r   r   r   r   r   r   r   Úpropertyr"   r&   r+   r/   r2   r5   r8   r;   r>   rA   rD   rG   rK   rO   rR   rU   rX   r   Ú__classdictcell__©Ú__classdict__s   @r   r   r   9   sp  ø‡ € ñð €IàñKó ðKòð Øñ"ó ó ð"ð Øñ"ó ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"òòð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ö"r   c                   ó  a € ] tR t^¬t o RtRt]R 4       t]R 4       t]R 4       t	]R 4       t
]RR l4       tR tR	 t]R
 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tR t]R 4       t]R 4       tR tRtV tR# )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.
c                ó   € \         h)zLAny Real can be converted to a native float object.

Called for float(self).r    r   s   &r   Ú	__float__ÚReal.__float__·   ó
   € ô
 "Ð!r   c                ó   € \         h)a  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".
r    r   s   &r   Ú	__trunc__ÚReal.__trunc__¾   s
   € ô "Ð!r   c                ó   € \         h)z$Finds the greatest Integral <= self.r    r   s   &r   Ú	__floor__ÚReal.__floor__Ë   r-   r   c                ó   € \         h)z!Finds the least Integral >= self.r    r   s   &r   Ú__ceil__ÚReal.__ceil__Ð   r-   r   Nc                ó   € \         h)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    )r   Úndigitss   &&r   Ú	__round__ÚReal.__round__Õ   r$   r   c                ó"   € W,          W,          3# )z�divmod(self, other): The pair (self // other, self % other).

Sometimes this can be computed faster than the pair of
operations.
r
   r)   s   &&r   Ú
__divmod__ÚReal.__divmod__Þ   s   € ð •˜t�|Ð,Ð,r   c                ó"   € W,          W,          3# )z�divmod(other, self): The pair (other // self, other % self).

Sometimes this can be computed faster than the pair of
operations.
r
   r)   s   &&r   Ú__rdivmod__ÚReal.__rdivmod__æ   s   € ð •˜u�|Ð,Ð,r   c                ó   € \         h)z)self // other: The floor() of self/other.r    r)   s   &&r   Ú__floordiv__ÚReal.__floordiv__î   r-   r   c                ó   € \         h)z)other // self: The floor() of other/self.r    r)   s   &&r   Ú__rfloordiv__ÚReal.__rfloordiv__ó   r-   r   c                ó   € \         h)zself % otherr    r)   s   &&r   Ú__mod__ÚReal.__mod__ø   r-   r   c                ó   € \         h)zother % selfr    r)   s   &&r   Ú__rmod__ÚReal.__rmod__ý   r-   r   c                ó   € \         h)zJself < other

< on Reals defines a total ordering, except perhaps for NaN.r    r)   s   &&r   Ú__lt__ÚReal.__lt__  rb   r   c                ó   € \         h)zself <= otherr    r)   s   &&r   Ú__le__ÚReal.__le__	  r-   r   c                ó*   € \        \        V 4      4      # )z(complex(self) == complex(float(self), 0))ÚcomplexÚfloatr   s   &r   r   ÚReal.__complex__  s   € ä”u˜T“{Ó#Ð#r   c                ó   € V 5# )z&Real numbers are their real component.r
   r   s   &r   r"   Ú	Real.real  ó   € ð ˆuˆr   c                ó   € ^ # )z)Real numbers have no imaginary component.r
   r   s   &r   r&   Ú	Real.imag  ó   € ñ r   c                ó   € V 5# )zConjugate is a no-op for Reals.r
   r   s   &r   rU   ÚReal.conjugate  s	   € àˆuˆr   r
   ©N)r   r   r   r   r   r   r   r`   rd   rg   rj   rn   rq   rt   rw   rz   r}   r€   rƒ   r†   r   rZ   r"   r&   rU   r   r[   r\   s   @r   r   r   ¬   s,  ø‡ € ñð €Iàñ"ó ð"ð ñ
"ó ð
"ð ñ"ó ð"ð ñ"ó ð"ð ó"ó ð"ò-ò-ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ò
$ð ñó ðð ñó ð÷ð r   c                   ób   a € ] tR tRt o RtRt]]R 4       4       t]]R 4       4       t	R t
RtV tR# )r   i$  z›To Real, Rational adds numerator and denominator properties.

The numerator and denominator values should be in lowest terms,
with a positive denominator.
c                ó   € \         h)z3The numerator of a rational number in lowest terms.r    r   s   &r   Ú	numeratorÚRational.numerator-  s
   € ô "Ð!r   c                ó   € \         h)z\The denominator of a rational number in lowest terms.

This denominator should be positive.
r    r   s   &r   ÚdenominatorÚRational.denominator3  r$   r   c                ó`   € \        V P                  4      \        V P                  4      ,          # )zë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.

)Úintr—   rš   r   s   &r   r`   ÚRational.__float__=  s#   € ô �4—>‘>Ó"¤S¨×)9Ñ)9Ó%:Õ:Ð:r   r
   N)r   r   r   r   r   r   rZ   r   r—   rš   r`   r   r[   r\   s   @r   r   r   $  sQ   ø‡ € ñð €IàØñ"ó ó ð"ð Øñ"ó ó ð"÷;ð ;r   c                   ó(  a € ] tR tRt o RtRt]R 4       tR t]RR l4       t	]R 4       t
]R 4       t]R	 4       t]R
 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tR t]R 4       t]R 4       tRtV tR# )r   iH  zŽIntegral adds methods that work on integral numbers.

In short, these are conversion to int, pow with modulus, and the
bit-string operations.
c                ó   € \         h)z	int(self)r    r   s   &r   Ú__int__ÚIntegral.__int__Q  r-   r   c                ó   € \        V 4      # )z6Called whenever an index is needed, such as in slicing)r�   r   s   &r   Ú	__index__ÚIntegral.__index__V  s   € ä�4‹yÐr   Nc                ó   € \         h)a  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.
r    )r   rJ   Úmoduluss   &&&r   rK   ÚIntegral.__pow__Z  s
   € ô "Ð!r   c                ó   € \         h)zself << otherr    r)   s   &&r   Ú
__lshift__ÚIntegral.__lshift__e  r-   r   c                ó   € \         h)zother << selfr    r)   s   &&r   Ú__rlshift__ÚIntegral.__rlshift__j  r-   r   c                ó   € \         h)zself >> otherr    r)   s   &&r   Ú
__rshift__ÚIntegral.__rshift__o  r-   r   c                ó   € \         h)zother >> selfr    r)   s   &&r   Ú__rrshift__ÚIntegral.__rrshift__t  r-   r   c                ó   € \         h)zself & otherr    r)   s   &&r   Ú__and__ÚIntegral.__and__y  r-   r   c                ó   € \         h)zother & selfr    r)   s   &&r   Ú__rand__ÚIntegral.__rand__~  r-   r   c                ó   € \         h)zself ^ otherr    r)   s   &&r   Ú__xor__ÚIntegral.__xor__ƒ  r-   r   c                ó   € \         h)zother ^ selfr    r)   s   &&r   Ú__rxor__ÚIntegral.__rxor__ˆ  r-   r   c                ó   € \         h)zself | otherr    r)   s   &&r   Ú__or__ÚIntegral.__or__�  r-   r   c                ó   € \         h)zother | selfr    r)   s   &&r   Ú__ror__ÚIntegral.__ror__’  r-   r   c                ó   € \         h)z~selfr    r   s   &r   Ú
__invert__ÚIntegral.__invert__—  r-   r   c                ó*   € \        \        V 4      4      # )zfloat(self) == float(int(self)))rŠ   r�   r   s   &r   r`   ÚIntegral.__float__�  s   € ä”S˜“YÓÐr   c                ó   € V 5# )z"Integers are their own numerators.r
   r   s   &r   r—   ÚIntegral.numerator¡  rŽ   r   c                ó   € ^# )z!Integers have a denominator of 1.r
   r   s   &r   rš   ÚIntegral.denominator¦  r‘   r   r
   r”   )r   r   r   r   r   r   r   r¡   r¤   rK   rª   r­   r°   r³   r¶   r¹   r¼   r¿   rÂ   rÅ   rÈ   r`   rZ   r—   rš   r   r[   r\   s   @r   r   r   H  sE  ø‡ € ñð €Iàñ"ó ð"òð ó"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ð ñ"ó ð"ò
 ð ñó ðð ñó ör   N)r   r   r   r   r   )r   Úabcr   r   Ú__all__r   r   Úregisterr‰   r   rŠ   r   r   r�   r
   r   r   Ú<module>rÓ      s‰   ðñ@÷: (â
?€ô	�wõ 	ô(n"ˆfô n"ð` × Ñ �Ô ôsˆ7ô sðj ‡�ˆeÔ ô!;ˆtô !;ôHaˆxô aðF 	× Ñ �#Ö r   