+
    .åûj’  ã                   ó~   € R t ^ RIHt ^ RIHtHtHtHt	H
t
HtHt ^ RIHt ^ RIHt ^ RIHt ] ! R R]4      4       tR# )	z4Implementation of :class:`PythonIntegerRing` class. )Ú
int_valued)ÚPythonIntegerÚSymPyIntegerÚsqrtÚ	factorialÚpython_gcdexÚ
python_gcdÚ
python_lcm)ÚIntegerRing)ÚCoercionFailed)Úpublicc                   ó¬   a € ] tR t^t o Rt]t]! ^ 4      t]! ^4      tRt	R t
R tR tR tR tR tR	 tR
 tR tR tR tR tR tR tR tR tRtV tR# )ÚPythonIntegerRingz¶Integer ring based on Python's ``int`` type.

This will be used as :ref:`ZZ` if ``gmpy`` and ``gmpy2`` are not
installed. Elements are instances of the standard Python ``int`` type.
Ú	ZZ_pythonc                ó   € R# )z$Allow instantiation of this domain. N© )Úselfs   &ÚaC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\polys\domains\pythonintegerring.pyÚ__init__ÚPythonIntegerRing.__init__   s   ‚ ó    c                ó   € \        V4      # )z!Convert ``a`` to a SymPy object. )r   ©r   Úas   &&r   Úto_sympyÚPythonIntegerRing.to_sympy   s   € ä˜A‹Ðr   c                ó¾   € VP                   '       d   \        VP                  4      # \        V4      '       d   \        \	        V4      4      # \        RV,          4      h)z&Convert SymPy's Integer to ``dtype``. zexpected an integer, got %s)Ú
is_Integerr   Úpr   Úintr   r   s   &&r   Ú
from_sympyÚPythonIntegerRing.from_sympy!   sC   € à�<�<ˆ<Ü  §¡Ó%Ð%Ü˜�]Š]Ü ¤ Q£Ó(Ð(ä Ð!>ÀÕ!BÓCÐCr   c                ó$   € VP                  V4      # )z5Convert ``ModularInteger(int)`` to Python's ``int``. )Úto_int©ÚK1r   ÚK0s   &&&r   Úfrom_FF_pythonÚ PythonIntegerRing.from_FF_python*   s   € à�y‰y˜‹|Ðr   c                ó   € V# )z.Convert Python's ``int`` to Python's ``int``. r   r$   s   &&&r   Úfrom_ZZ_pythonÚ PythonIntegerRing.from_ZZ_python.   s   € àˆr   c                ó@   € VP                   ^8X  d   VP                  # R# ©z3Convert Python's ``Fraction`` to Python's ``int``. N©ÚdenominatorÚ	numeratorr$   s   &&&r   Úfrom_QQÚPythonIntegerRing.from_QQ2   ó   € à�=‰=˜AÔØ—;‘;Ðñ r   c                ó@   € VP                   ^8X  d   VP                  # R# r-   r.   r$   s   &&&r   Úfrom_QQ_pythonÚ PythonIntegerRing.from_QQ_python7   r3   r   c                ó6   € \        VP                  V4      4      # )z5Convert ``ModularInteger(mpz)`` to Python's ``int``. )r   r#   r$   s   &&&r   Úfrom_FF_gmpyÚPythonIntegerRing.from_FF_gmpy<   s   € ä˜RŸY™Y q›\Ó*Ð*r   c                ó   € \        V4      # )z,Convert GMPY's ``mpz`` to Python's ``int``. )r   r$   s   &&&r   Úfrom_ZZ_gmpyÚPythonIntegerRing.from_ZZ_gmpy@   s   € ä˜QÓÐr   c                ób   € VP                  4       ^8X  d   \        VP                  4       4      # R# )z,Convert GMPY's ``mpq`` to Python's ``int``. N)Údenomr   Únumerr$   s   &&&r   Úfrom_QQ_gmpyÚPythonIntegerRing.from_QQ_gmpyD   s%   € à�7‰7‹9˜Œ>Ü  §¡£Ó+Ð+ñ r   c                óP   € VP                  V4      w  r4V^8X  d   \        V4      # R# )z.Convert mpmath's ``mpf`` to Python's ``int``. N)Úto_rationalr   )r%   r   r&   r   Úqs   &&&  r   Úfrom_RealFieldÚ PythonIntegerRing.from_RealFieldI   s)   € à�~‰~˜aÓ ‰ˆà�Œ6Ü  Ó#Ð#ñ r   c                ó   € \        W4      # )z)Compute extended GCD of ``a`` and ``b``. )r   ©r   r   Úbs   &&&r   ÚgcdexÚPythonIntegerRing.gcdexP   s   € ä˜AÓ!Ð!r   c                ó   € \        W4      # )z Compute GCD of ``a`` and ``b``. )r   rH   s   &&&r   ÚgcdÚPythonIntegerRing.gcdT   ó   € ä˜!ÓÐr   c                ó   € \        W4      # )z Compute LCM of ``a`` and ``b``. )r	   rH   s   &&&r   ÚlcmÚPythonIntegerRing.lcmX   rO   r   c                ó   € \        V4      # )zCompute square root of ``a``. )Úpython_sqrtr   s   &&r   r   ÚPythonIntegerRing.sqrt\   s   € ä˜1‹~Ðr   c                ó   € \        V4      # )zCompute factorial of ``a``. )Úpython_factorialr   s   &&r   r   ÚPythonIntegerRing.factorial`   s   € ä Ó"Ð"r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚdtypeÚzeroÚoneÚaliasr   r   r    r'   r*   r1   r5   r8   r;   r@   rE   rJ   rM   rQ   r   r   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s~   ø‡ € ñð €EÙ�‹8€DÙ
�‹(€CØ€Eò3òòDòòòò
ò
+ò ò,ò
$ò"ò ò ò÷#ð #r   r   N)r]   Úsympy.core.numbersr   Úsympy.polys.domains.groundtypesr   r   r   rT   r   rW   r   r   r	   Úsympy.polys.domains.integerringr
   Úsympy.polys.polyerrorsr   Úsympy.utilitiesr   r   r   r   r   Ú<module>rj      sC   ðÙ :õ *÷÷ ñ õ 8Ý 1Ý "àôT#˜ó T#ó òT#r   