+
    -åûj  ã                   ó°   € R t ^ RIHt ^ RIHtHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHt ] ! R
 R]	]]4      4       t]! 4       tR# )z/Implementation of :class:`ComplexField` class. )Ú
SYMPY_INTS)ÚFloatÚI)ÚCharacteristicZero)ÚField©ÚQQ_I)ÚSimpleDomain)ÚDomainErrorÚCoercionFailed)Úpublic)Ú	MPContextc                   óH  a € ] tR t^t o RtRtR;ttRtRt	Rt
Rt^5t]R 4       t]R 4       t]R 4       t]R 4       tR(R
 lt]R 4       tR)R l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'R  t(R! t)R" t*R# t+R*R$ lt,R% t-R& t.R't/V t0R	# )+ÚComplexFieldz+Complex numbers up to the given precision. ÚCCTFc                ó4   € V P                   V P                  8H  # ©N)Ú	precisionÚ_default_precision©Úselfs   &Ú\C:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\sympy\polys\domains\complexfield.pyÚhas_default_precisionÚ"ComplexField.has_default_precision    s   € à�~‰~ ×!8Ñ!8Ñ8Ð8ó    c                ó.   € V P                   P                  # r   )Ú_contextÚprecr   s   &r   r   ÚComplexField.precision$   s   € à�}‰}×!Ñ!Ð!r   c                ó.   € V P                   P                  # r   )r   Údpsr   s   &r   r    ÚComplexField.dps(   s   € à�}‰}× Ñ Ð r   c                ó   € V P                   # r   )Ú
_tolerancer   s   &r   Ú	toleranceÚComplexField.tolerance,   s   € à�‰Ðr   Nc                ó¬  € \        4       pVf   Vf   V P                  Vn        M!Vf   Wn        MVf   W$n        M\	        R4      hW@n        VP                  V n        V P                  ^ 4      V n	        V P                  ^4      V n
        \        ^VP                  ,          ^È,          ^c4      V n        V P                  V P                  ,          V n        R # )NzCannot set both prec and dps)r   r   r   r    Ú	TypeErrorr   ÚmpcÚ_dtypeÚdtypeÚzeroÚoneÚmaxÚ
_max_denomr#   )r   r   r    ÚtolÚcontexts   &&&& r   Ú__init__ÚComplexField.__init__0   s    € ô “+ˆàŠ<˜CšKØ×2Ñ2ˆG�LØŠ[Ø�LØŠ\Ø�KäÐ:Ó;Ð;àŒà—k‘kˆŒØ—J‘J˜q“MˆŒ	Ø—:‘:˜a“=ˆŒô ˜a §¡�o°Õ4°bÓ9ˆŒØŸ(™( T§_¡_Õ4ˆŽr   c                ó   € V P                   # r   )r)   r   s   &r   ÚtpÚComplexField.tpI   s   € ð �{‰{Ðr   c                ó¨   € \        V\        4      '       d   \        V4      p\        V\        4      '       d   \        V4      pV P                  W4      # r   )Ú
isinstancer   Úintr)   )r   ÚxÚys   &&&r   r*   ÚComplexField.dtypeQ   s?   € ô �aœ×$Ò$Ü�A“ˆAÜ�aœ×$Ò$Ü�A“ˆAØ�{‰{˜1Ó Ð r   c                ód   € \        V\        4      ;'       d    V P                  VP                  8H  # r   )r7   r   r   )r   Úothers   &&r   Ú__eq__ÚComplexField.__eq__[   s$   € Ü˜%¤Ó.×TÐT°4·>±>ÀUÇ_Á_Ñ3TÐTr   c                ón   € \        V P                  P                  V P                  V P                  34      # r   )ÚhashÚ	__class__Ú__name__r)   r   r   s   &r   Ú__hash__ÚComplexField.__hash__^   s&   € Ü�T—^‘^×,Ñ,¨d¯k©k¸4¿>¹>ÐJÓKÐKr   c                ó¢   € \        VP                  V P                  4      \        \        VP                  V P                  4      ,          ,           # )z%Convert ``element`` to SymPy number. )r   Úrealr    r   Úimag©r   Úelements   &&r   Úto_sympyÚComplexField.to_sympya   s0   € ä�W—\‘\ 4§8¡8Ó,¬q´°w·|±|ÀTÇXÁXÓ1NÕ/NÕNÐNr   c                óì   € VP                  V P                  R7      pVP                  4       w  r4VP                  '       d$   VP                  '       d   V P	                  W44      # \        RV,          4      h)z%Convert SymPy's number to ``dtype``. )Únzexpected complex number, got %s)Úevalfr    Úas_real_imagÚ	is_Numberr*   r   )r   ÚexprÚnumberrG   rH   s   &&   r   Ú
from_sympyÚComplexField.from_sympye   sW   € à—‘˜dŸh™h�Ó'ˆØ×(Ñ(Ó*‰
ˆà�>�>ˆ>˜dŸnŸn˜nØ—:‘:˜dÓ)Ð)ä Ð!BÀTÕ!IÓJÐJr   c                ó$   € V P                  V4      # r   ©r*   ©r   rJ   Úbases   &&&r   Úfrom_ZZÚComplexField.from_ZZo   ó   € Ø�z‰z˜'Ó"Ð"r   c                ó6   € V P                  \        V4      4      # r   )r*   r8   rX   s   &&&r   Úfrom_ZZ_gmpyÚComplexField.from_ZZ_gmpyr   s   € Ø�z‰zœ#˜g›,Ó'Ð'r   c                ó$   € V P                  V4      # r   rW   rX   s   &&&r   Úfrom_ZZ_pythonÚComplexField.from_ZZ_pythonu   r\   r   c                ó~   € V P                  \        VP                  4      4      \        VP                  4      ,          # r   ©r*   r8   Ú	numeratorÚdenominatorrX   s   &&&r   Úfrom_QQÚComplexField.from_QQx   ó,   € Ø�z‰zœ#˜g×/Ñ/Ó0Ó1´C¸×8KÑ8KÓ4LÕLÐLr   c                óZ   € V P                  VP                  4      VP                  ,          # r   )r*   re   rf   rX   s   &&&r   Úfrom_QQ_pythonÚComplexField.from_QQ_python{   s"   € Ø�z‰z˜'×+Ñ+Ó,¨w×/BÑ/BÕBÐBr   c                ó~   € V P                  \        VP                  4      4      \        VP                  4      ,          # r   rd   rX   s   &&&r   Úfrom_QQ_gmpyÚComplexField.from_QQ_gmpy~   ri   r   c                ór   € V P                  \        VP                  4      \        VP                  4      4      # r   )r*   r8   r9   r:   rX   s   &&&r   Úfrom_GaussianIntegerRingÚ%ComplexField.from_GaussianIntegerRing�   s#   € Ø�z‰zœ#˜gŸi™i›.¬#¨g¯i©i«.Ó9Ð9r   c                ó6  € VP                   pVP                  pV P                  \        VP                  4      4      \        VP
                  4      ,          V P                  ^ \        VP                  4      4      \        VP
                  4      ,          ,           # ©é    )r9   r:   r*   r8   re   rf   )r   rJ   rY   r9   r:   s   &&&  r   Úfrom_GaussianRationalFieldÚ'ComplexField.from_GaussianRationalField„   sh   € Ø�I‰IˆØ�I‰IˆØ—
‘
œ3˜qŸ{™{Ó+Ó,¬s°1·=±=Ó/AÕAØ—
‘
˜1œc !§+¡+Ó.Ó/´#°a·m±mÓ2DÕDõEð 	Fr   c                ót   € V P                  VP                  V4      P                  V P                  4      4      # r   )rT   rK   rO   r    rX   s   &&&r   Úfrom_AlgebraicFieldÚ ComplexField.from_AlgebraicFieldŠ   s)   € Ø�‰˜tŸ}™}¨WÓ5×;Ñ;¸D¿H¹HÓEÓFÐFr   c                ó$   € V P                  V4      # r   rW   rX   s   &&&r   Úfrom_RealFieldÚComplexField.from_RealField�   r\   r   c                ó$   € V P                  V4      # r   rW   rX   s   &&&r   Úfrom_ComplexFieldÚComplexField.from_ComplexField�   r\   r   c                ó&   € \        RV ,          4      h)z)Returns a ring associated with ``self``. z#there is no ring associated with %s)r
   r   s   &r   Úget_ringÚComplexField.get_ring“   s   € äÐ?À$ÕFÓGÐGr   c                ó   € \         # )z2Returns an exact domain associated with ``self``. r   r   s   &r   Ú	get_exactÚComplexField.get_exact—   s   € äˆr   c                ó   € R# ©z.Returns ``False`` for any ``ComplexElement``. F© rI   s   &&r   Úis_negativeÚComplexField.is_negative›   ó   € ár   c                ó   € R# rˆ   r‰   rI   s   &&r   Úis_positiveÚComplexField.is_positiveŸ   rŒ   r   c                ó   € R# rˆ   r‰   rI   s   &&r   Úis_nonnegativeÚComplexField.is_nonnegative£   rŒ   r   c                ó   € R# rˆ   r‰   rI   s   &&r   Úis_nonpositiveÚComplexField.is_nonpositive§   rŒ   r   c                ó   € V P                   # )z Returns GCD of ``a`` and ``b``. )r,   ©r   ÚaÚbs   &&&r   ÚgcdÚComplexField.gcd«   s   € à�x‰xˆr   c                ó   € W,          # )z Returns LCM of ``a`` and ``b``. r‰   r—   s   &&&r   ÚlcmÚComplexField.lcm¯   s	   € à�sˆ
r   c                ó:   € V P                   P                  WV4      # )z+Check if ``a`` and ``b`` are almost equal. )r   Úalmosteq)r   r˜   r™   r$   s   &&&&r   r    ÚComplexField.almosteq³   s   € à�}‰}×%Ñ% a¨IÓ6Ð6r   c                ó   € R# )zAReturns ``True``. Every complex number has a complex square root.Tr‰   ©r   r˜   s   &&r   Ú	is_squareÚComplexField.is_square·   s   € ár   c                ó   € VR,          # )züReturns the principal complex square root of ``a``.

Explanation
===========
The argument of the principal square root is always within
$(-\frac{\pi}{2}, \frac{\pi}{2}]$. The square root may be
slightly inaccurate due to floating point rounding error.
g      à?r‰   r£   s   &&r   ÚexsqrtÚComplexField.exsqrt»   s   € ð �C�xˆr   )r   r)   r.   r#   r,   r+   )NNNrt   r   )1rC   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚrepÚis_ComplexFieldÚis_CCÚis_ExactÚis_NumericalÚhas_assoc_RingÚhas_assoc_Fieldr   Úpropertyr   r   r    r$   r1   r4   r*   r>   rD   rK   rT   rZ   r^   ra   rg   rk   rn   rq   rv   ry   r|   r   r‚   r…   rŠ   rŽ   r‘   r”   rš   r�   r    r¤   r§   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s.  ø‡ € á5à
€Cà"Ð"€O�eà€HØ€Là€NØ€OàÐàñ9ó ð9ð ñ"ó ð"ð ñ!ó ð!ð ñó ðô5ð2 ñó ðô!òUòLòOòKò#ò(ò#òMòCòMò:òFòGò#ò#òHòòòòòòòô7ò÷	ð 	r   r   N)r¬   Úsympy.external.gmpyr   Úsympy.core.numbersr   r   Ú&sympy.polys.domains.characteristiczeror   Úsympy.polys.domains.fieldr   Ú#sympy.polys.domains.gaussiandomainsr   Ú sympy.polys.domains.simpledomainr	   Úsympy.polys.polyerrorsr
   r   Úsympy.utilitiesr   Úmpmathr   r   r   r‰   r   r   Ú<module>rÁ      sR   ðÙ 5õ +ß 'Ý EÝ +Ý 4Ý 9ß >Ý "å ð ôs�5Ð,¨ló só ðsñj ƒ^‚r   