+
    i(&                      a  0 t $ ^ RIHt ^ RI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 ^R	IHtHtHtHtHtHtHtH t!H"t#H$t%H&t'H(t)H*t+H,t-H.t/H0t1H2t3H4t5H6t7H8t9H:t;H<t=H>t?H@tAHBtC . ROtD. ROtER tFRtGR tHR tI]P                  P                  RR4      P                  4       tMRtNRtO]MR 9   d   ]H! ]M4      tN]Ne   RtMMRtM]MR!9   d   ]I! ]M4      tO]Oe   RtMMRtM]MR"9  d   ]! R4       RtM^^]! ]4      ,          ^,
          ,          ^,
          tPR]QR
&   ]MR8X  Ede   ]Of   Q hRtR]OtS^tTRtU]V]W! ]SP                  ^ 4      4      3tY]SP                  tZ]SP                  t\]SP$                  t]SP(                  t]SP,                  t]SP                  t]SP                  t]SPH                  t$]SP                  t]SP<                  t]SP@                  t ]SPD                  t"]SPL                  t&]SPP                  t(]SPT                  t*]SPX                  t,R t.]SP`                  t0]SPd                  t2]SPh                  t4]SPl                  t6]SPp                  t8]SPt                  t:]SPx                  t<]SP|                  t>]SP                  t@]SP                  tBR# ]MR8X  dp   ]Nf   Q h]NtRRtS^ tTRtU]V]RP                  3tY]RP                  tZ]RP                  t\]t]t]t]tR tR t$R tR tR t ]#t"]'t&])t(R t*]-t,R t.]1t0]3t2]5t4]7t6]9t8];t:]=t<]?t>]At@]CtBR# ]MR8X  dD   RtRRtS^ tTRtU]V3tY]VtZ]t\]t]t]t]t]t]%t$]t]t]!t ]#t"]'t&])t(]+t*]-t,]/t.]1t0]3t2]5t4]7t6]9t8];t:]=t<]?t>]At@]CtBR# Q h)#    )annotationsN)c_longsizeof)reduce)Type)warn)import_module)	PythonMPQ)	bit_scan1	bit_scan0remove	factorialsqrtsqrtremgcdlcmgcdext	is_squareinvertlegendrejacobi	kroneckerirootis_fermat_prpis_euler_prpis_strong_prpis_fibonacci_prpis_lucas_prpis_selfridge_prpis_strong_lucas_prpis_strong_selfridge_prpis_bpsw_prpis_strong_bpsw_prp
SYMPY_INTSc                V    V P                  R 4      R,          w  rV R V 2pV\        9   # ).:N   N)split_PYTHON_FLINT_VERSION_NEEDED)flint_versionmajorminor	flint_vers   &   s/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/external/gmpy.py_flint_version_okayr/   c   s5     &&s+B/LE'5'"I444    z2.0.0c                    V R9  d   R#  ^ RI p^ RI Hp \	        T4      '       d   T# T R 8X  d   R# \        RT R\
         R24       T#   \         d    T R8X  d   \        R4        R# i ; i)	autoflintN)__version__zjSYMPY_GROUND_TYPES was set to flint but python-flint is not installed. Falling back to other ground types.zUsing python-flint zp because SYMPY_GROUND_TYPES is set to flint but this version of SymPy is only tested with python-flint versions r&   r2   r3   )r3   r4   ImportErrorr   r/   r)   )sympy_ground_typesr3   _flint_versions   &  r.   
_get_flintr9   n   s    !227 >**	v	%">"2 3++G*HK 	L   ( B C	s   
A	 	A*)A*c                j    V R9  d   R# \        R\        RRR7      pV R 8w  d   Vf   \        R4       V# )r2   gmpy2Nversion)min_module_versionmodule_version_attrmodule_version_attr_call_argszBgmpy2 library is not installed, switching to 'python' ground typesr2   gmpyr;    )r	   _GMPY2_MIN_VERSIONr   )r7   rA   s   & r.   
_get_gmpy2rD      s?    !::5G )MD V#QRKr0   SYMPY_GROUND_TYPESr2   r3   rA   pythonzmSYMPY_GROUND_TYPES environment variable unrecognised. Should be 'auto', 'flint', 'gmpy', 'gmpy2' or 'python'.ztuple[Type, ...]c                X    V\         8:  d   \        P                  W4      # \        W4      # N)LONG_MAXrA   r   python_iroot)xns   &&r.   r   r      s%     =::a##A!!r0   c                H    \         P                  V 4      P                  4       # rH   )r3   fmpzisqrtrK   s   &r.   r   r     s    zz!}""$$r0   c                n    V ^ 8  d   R# \         P                  V 4      P                  4       ^,          ^ 8H  # )r   Fr3   rN   r   rP   s   &r.   r   r     s-    q5zz!}$$&q)Q..r0   c                H    \         P                  V 4      P                  4       # rH   rR   rP   s   &r.   r   r     s    zz!}$$&&r0   c                 r    \        \        P                  P                  V \        P                  ^ 4      4      # )r   )r   r3   rN   r   argss   *r.   r   r     !    ejjnndEJJqM::r0   c                 r    \        \        P                  P                  V \        P                  ^4      4      # )   )r   r3   rN   r   rU   s   *r.   r   r     rW   r0   c                    V^ 8:  g   V^,          '       g   \        R4      h\        P                  V 4      P                  V4      # )r   z#y should be an odd positive integer)
ValueErrorr3   rN   r   )rK   ys   &&r.   r   r     s6    6QBCCzz!}##A&&r0   c                    V\         8:  d2   \        P                  V 4      P                  V4      pW"V,          V 8H  3# \	        W4      # rH   )rI   r3   rN   rootrJ   )rK   rL   r\   s   && r.   r   r     s<    =

1""1%Adai<A!!r0   )GROUND_TYPESHAS_GMPYr$   MPQMPZr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   )z0.6z0.7z0.8z0.9z0.10r5   r@   )r3   rA   rF   )b__conditional_annotations__
__future__r   osctypesr   r   	functoolsr   typingr   warningsr   sympy.externalr	   	pythonmpqr
   ntheoryr   python_bit_scan1r   python_bit_scan0r   python_remover   python_factorialr   python_sqrtr   python_sqrtremr   
python_gcdr   
python_lcmr   python_gcdextr   python_is_squarer   python_invertr   python_legendrer   python_jacobir   python_kroneckerr   rJ   r   python_is_fermat_prpr   python_is_euler_prpr   python_is_strong_prpr   python_is_fibonacci_prpr   python_is_lucas_prpr   python_is_selfridge_prpr    python_is_strong_lucas_prpr!   python_is_strong_selfridge_prpr"   python_is_bpsw_prpr#   python_is_strong_bpsw_prp__all__r)   r/   rC   r9   rD   environgetlower_SYMPY_GROUND_TYPES_flint_gmpyrI   __annotations__r3   rA   r`   r_   inttypempzr$   rb   mpqra   facrO   	isqrt_remrN   fmpq)rc   s   @r.   <module>r      s   " " 	 !    (        :0n  D 5  2
  jjnn%96BHHJ 	 +++,F%$33*+E$&99 
C D" !F6N"Q&'1,  & EDHLtDHHQK()J
((C
((CII[[FI::DInnG
((C
((C[[F[[F}}H[[FI" &&M$$L&&M,,$$L,,22"::""K00G#EDHLuzz"J
**C
**C I IF I%/
';; FFH'
 !I" )M&L(M.&L.4<$K2H$EDHLJ
C
C I IF ID IG
C
CFFHF IE(M&L(M.&L.4<$K2 5r0   