+
    ij                     j    R t ^ RI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:`GMPYRationalField` class. )GMPYRationalSymPyRational
gmpy_numer
gmpy_denom	factorial)RationalField)CoercionFailed)publicc                      a  ] tR t^t o Rt]t]! ^ 4      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RtV tR# )GMPYRationalFieldzRational field based on GMPY's ``mpq`` type.

This will be the implementation of :ref:`QQ` if ``gmpy`` or ``gmpy2`` is
installed. Elements will be of type ``gmpy.mpq``.
QQ_gmpyc                    R # )N )selfs   &څ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/polys/domains/gmpyrationalfield.py__init__GMPYRationalField.__init__   s        c                    ^ RI Hp V! 4       # )z'Returns ring associated with ``self``. )GMPYIntegerRing)sympy.polys.domainsr   )r   r   s   & r   get_ringGMPYRationalField.get_ring   s    7  r   c                b    \        \        \        V4      4      \        \        V4      4      4      # )z!Convert ``a`` to a SymPy object. )r   intr   r   r   as   &&r   to_sympyGMPYRationalField.to_sympy"   s&    SA/ A/1 	1r   c                   VP                   '       d!   \        VP                  VP                  4      # VP                  '       d-   ^ RIHp \        \        \        VP                  V4      4      !  # \        RV,          4      h)z&Convert SymPy's Integer to ``dtype``. )RRz$expected ``Rational`` object, got %s)is_Rationalr   pqis_Floatr   r    mapr   to_rationalr   )r   r   r    s   && r   
from_sympyGMPYRationalField.from_sympy'   sX    ===QSS))ZZZ.S"..*;!<== !G!!KLLr   c                    \        V4      # )z.Convert a Python ``int`` object to ``dtype``. r   K1r   K0s   &&&r   from_ZZ_python GMPYRationalField.from_ZZ_python1       Ar   c                B    \        VP                  VP                  4      # )z3Convert a Python ``Fraction`` object to ``dtype``. )r   	numeratordenominatorr+   s   &&&r   from_QQ_python GMPYRationalField.from_QQ_python5   s    AKK77r   c                    \        V4      # )z,Convert a GMPY ``mpz`` object to ``dtype``. r*   r+   s   &&&r   from_ZZ_gmpyGMPYRationalField.from_ZZ_gmpy9   r0   r   c                    V# )z,Convert a GMPY ``mpq`` object to ``dtype``. r   r+   s   &&&r   from_QQ_gmpyGMPYRationalField.from_QQ_gmpy=   s    r   c                R    VP                   ^ 8X  d   \        VP                  4      # R# )z3Convert a ``GaussianElement`` object to ``dtype``. N)yr   xr+   s   &&&r   from_GaussianRationalField,GMPYRationalField.from_GaussianRationalFieldA   s!    33!8$$ r   c                N    \        \        \        VP                  V4      4      !  # )z.Convert a mpmath ``mpf`` object to ``dtype``. )r   r%   r   r&   r+   s   &&&r   from_RealField GMPYRationalField.from_RealFieldF   s    SbnnQ&7899r   c                8    \        V4      \        V4      ,          # )z=Exact quotient of ``a`` and ``b``, implies ``__truediv__``.  r*   r   r   bs   &&&r   exquoGMPYRationalField.exquoJ       Aa00r   c                8    \        V4      \        V4      ,          # )z6Quotient of ``a`` and ``b``, implies ``__truediv__``. r*   rE   s   &&&r   quoGMPYRationalField.quoN   rI   r   c                    V P                   # )z0Remainder of ``a`` and ``b``, implies nothing.  )zerorE   s   &&&r   remGMPYRationalField.remR   s    yyr   c                P    \        V4      \        V4      ,          V P                  3# )z6Division of ``a`` and ``b``, implies ``__truediv__``. )r   rN   rE   s   &&&r   divGMPYRationalField.divV   s    Aa0$));;r   c                    VP                   # )zReturns numerator of ``a``. )r2   r   s   &&r   numerGMPYRationalField.numerZ   s    {{r   c                    VP                   # )zReturns denominator of ``a``. )r3   r   s   &&r   denomGMPYRationalField.denom^   s    }}r   c                <    \        \        \        V4      4      4      # )zReturns factorial of ``a``. )r   gmpy_factorialr   r   s   &&r   r   GMPYRationalField.factorialb   s    N3q6233r   r   N)__name__
__module____qualname____firstlineno____doc__r   dtyperN   onetypetpaliasr   r   r   r'   r.   r4   r7   r:   r?   rB   rG   rK   rO   rR   rU   rX   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s      E8D
(C	cBE!
1
M8%
:11<4 4r   r   N)ra   sympy.polys.domains.groundtypesr   r   r   r   r   r[   !sympy.polys.domains.rationalfieldr   sympy.polys.polyerrorsr   sympy.utilitiesr	   r   r   r   r   <module>rn      s9    :  < 1 "W4 W4 W4r   