Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
ï»¿Ë â{|j&*ãó‚—dZddlZddlZ ddlZd„Zd„Zd„Zd„Zd„Z dZ d „Z d „Z d „Z d „Zd „Zd„Zy#e$rdZYŒ-wxYw)aþPython implementations of some algorithms for use by longobject.c. The goal is to provide asymptotically faster algorithms that can be used for operations on integers with many digits. In those cases, the performance overhead of the Python implementation is not significant since the asymptotic behavior is what dominates runtime. Functions provided by this module should be considered private and not part of any public API. Note: for ease of maintainability, please prefer clear code and avoid "micro-optimizations". This module will only be imported and used for integers with a huge number of digits. Saving a few microseconds with tricky or non-obvious code is not worth it. For people looking for maximum performance, they should use something like gmpy2.éNcóȇ‡‡‡‡‡ —tjЉd«ŠdŠiŠˆˆˆˆ fd„Š ˆˆˆˆ fd„Štj«5}tj|_tj |_tj|_d|jtj<|dkrd}| }nd}‰||j««}|r| }d d d «|S#1swYSxYw) z6Asymptotically fast conversion of an 'int' to Decimal.éé€c󪕗‰j|«x}€>|‰kr‰|z}n.|dz ‰vr‰|dz x}|z}n|dz }‰|«‰||z «z}|‰|<|S)zÀReturn D(2)**w and store the result. Also possibly save some intermediate results. In context, these are likely to be reused across various levels of the conversion to Decimal.é©Úget)ÚwÚresultÚtÚw2ÚBITLIMÚD2ÚmemÚw2pows €€€€ú /usr/lib64/python3.12/_pylong.pyrzint_to_decimal..w2pow+sxø€ð—g‘g˜a“jÐ ˆFÐ )Ø�FŠ{ؘQ™‘Ø�Q‘˜#‘Ø" 1 q¡5™z˜/˜!¨QÑ.‘à˜!‘V�ñ ˜r›¡U¨1¨r©6£]Ñ2�؈C�‰F؈ óc󀕗|‰kr‰|«S|dz }||z }|||zz }‰||«‰|||z «‰|«zzS©Nr©) Únr r ÚhiÚlorÚDÚinnerrs €€€€rrzint_to_decimal..inner>sWø€Ø �Š;Ù�Q“4ˆKØ �!‰VˆØ �"‰WˆØ �"˜‘(‰^ˆÙ�R˜‹}™u R¨¨R©Ó0±5¸³9Ñ<Ñ<Ð.innerds{ø€Ø �Š9Ü�q“6ˆMØ �!‰VˆØ �O‰O˜BÓ ˆØ ˆ9Ø"# R¡%¨2¡+Ð -ˆA� ˜B‘ܘ˜1“‰ˆˆBÙ�R˜˜R™Ó ¡5¨¨R£=×#6Ñ#6°rÓ#:Ñ:Ð:rgÿyŸPDÓ?rrÚ-ÚÚ0)r'Ú_decimalr.r*ÚintÚlstrip)rr ÚsignÚsrr2s @@rÚint_to_decimal_stringr;Ws•ù€à � ‰ ‹€A؈7‚{”xÐ+ô”> !Ó$Ó%Ð%õ ;ô" ˆAÐ"Ñ " QÑ &Ó'€AØ€K؈1‚uØ ˆBˆØ‰àˆÙ ˆa�‹ €A؈�tˆs‚{‘qð �H‰H�S‹MˆØ �!‰8€OrcóV‡‡‡‡‡—dŠiŠˆˆˆfd„Šˆˆˆˆfd„Љdt‰««S)z6Asymptotically fast conversion of a 'str' to an 'int'.ic󦕗‰j|«x}€<|‰krd|z}n,|dz ‰vr ‰|dz dz}n|dz }‰|«‰||z «z}|‰|<|S)zÌReturn 5**w and store the result. Also possibly save some intermediate results. In context, these are likely to be reused across various levels of the conversion to 'int'. r-rr)r r r ÚDIGLIMrÚw5pows €€€rr?z _str_to_int_inner..w5pow•ssø€ð —g‘g˜a“jÐ ˆFÐ )Ø�FŠ{ؘA™‘Ø�Q‘˜#‘ؘQ ™U™ a™‘à˜!‘V�ñ ˜r›¡U¨1¨r©6£]Ñ2�؈C�‰F؈ rcó�•—||z ‰krt‰||«S||zdzdz }‰||«‰||«‰||z «z||z zzSr)r7)ÚaÚbÚmidr>rr:r?s €€€€rrz _str_to_int_inner..innerªs]ø€Ø ˆq‰5�FŠ?Ü�q˜˜1�v“;Ð Ø�1‰u�q‰y˜QшÙ�S˜!‹}¡ q¨#£±°q¸3±w³Ñ!?ÀQÈÁWÑ MÑNÐNrr©Úlen)r:r>rrr?s`@@@@rÚ_str_to_int_innerrF„s-ü€ð€Fà €Cö÷*Oñ �”C˜“FÓ ÐrcóX—|j«jdd«}t|«S)zoAsymptotically fast version of PyLong_FromString(), conversion of a string of decimal digits into an 'int'.Ú_r4)ÚrstripÚreplacerF)r:s rÚint_from_stringrK³s'€ð �‰‹ ×ј3 Ó#€AÜ ˜QÓ Ðrcó®—tjd|«}|s td«‚t|j d««}|j d«dk(r| }|S)zBAsymptotically fast version of decimal string to 'int' conversion.z\s*([+-]?)([0-9_]+)\s*z&invalid literal for int() with base 10rrr3)ÚreÚmatchÚ ValueErrorrKÚgroup)r:ÚmÚvs rÚ str_to_intrS¾sR€ô �‰Ð*¨AÓ.€AÙ ÜÐAÓBÐBܘŸ™ › Ó#€A؇w�wˆqƒz�SÒØ ˆBˆØ €Hri có.—|j«|z tkr t||«S|dz}|r|dz}|dz}|dz }|dz }d|zdz }||z ||z}}t||z ||z |z||||«\}} t| ||z||||«\} } |r| dz} ||z| z| fS)aRDivide a 2n-bit nonnegative integer a by an n-bit positive integer b, using a recursive divide-and-conquer algorithm. Inputs: n is a positive integer b is a positive integer with exactly n bits a is a nonnegative integer such that a < 2**n * b Output: (q, r) such that a = b*q+r and 0 <= r < b. r)r'Ú _DIV_LIMITr/Ú_div3n2n) rArBrÚpadÚhalf_nÚmaskÚb1Úb2Úq1ÚrÚq2s rÚ_div2n1nr_ÒsÓ€ð ‡|�|ƒ~˜ÑœZÒ'Ü�a˜‹|ÐØ ˆa‰%€CÙ Ø ˆa‰ˆØ ˆa‰ˆØ ˆQ‰ˆØ �!‰V€FØ �‰K˜1Ñ €DØ �&‰[˜!˜d™(ˆ€BÜ �Q˜!‘V˜a 6™k¨TÑ1°1°b¸"¸fÓ E�E€BˆÜ �Q˜˜D™ ! R¨¨VÓ 4�E€BˆÙ Ø ˆa‰ˆØ �‰<˜"Ñ ˜aÐ Ðrcó¨—||z |k(rd|zdz |||zz |z}}nt|||«\}}||z|z||zz }|dkr|dz}||z }|dkrŒ||fS)zAHelper function for _div2n1n; not intended to be called directly.rr)r_)Úa12Úa3rBrZr[rÚqr]s rrVrVðs€€à ˆa�x�2‚~Ø�Q‘˜!‰|˜S B¨!¡G™_¨rÑ1ˆ1‰ä˜˜R Ó#‰ˆˆ1Ø ˆa‰�"‰˜˜B™Ñ€AØ ˆaŠ%Ø ˆQ‰ˆØ ˆQ‰ˆð ˆa‹%ð ˆaˆ4€Krcó~‡‡‡—dg|j«‰zdz ‰zzŠˆˆˆfd„Š|r‰|dt‰««‰S)aRDecompose non-negative int a into base 2**n Input: a is a non-negative integer Output: List of the digits of a in base 2**n in little-endian order, meaning the most significant digit is last. The most significant digit is guaranteed to be non-zero. If a is 0 then the output is an empty list. rrcó„•—|dz|k(r|‰|<y||zdz }||z ‰ z}||z }|||zz }‰|||«‰|||«yrr) ÚxÚLÚRrCÚshiftÚupperÚlowerÚa_digitsrrs €€€rrz_int2digits..inner scø€Ø ˆq‰5�AŠ:؈H�Q‰KØ Ø�1‰u˜‰lˆØ�q‘˜A‘ ˆØ�U‘ ˆØ�U˜e‘^Ñ$ˆÙ ˆe�Q˜ÔÙ ˆe�S˜!Õr)r'rE)rArrlrs `@@rÚ _int2digitsrmýsEú€ðˆs�q—|‘|“~¨Ñ)¨AÑ-°!Ñ3Ñ4€Hö ñ Ù ˆa�”C˜“MÔ"Ø €OrcóB‡‡‡—ˆˆˆfd„Љr‰dt‰««SdS)z€Combine base-2**n digits into an int. This function is the inverse of `_int2digits`. For more details, see _int2digits. cój•—|dz|k(r‰|S||zdz }||z ‰z}‰||«|z‰||«zSrr)rgrhrCriÚdigitsrrs €€€rrz_digits2int..inner!sNø€Ø ˆq‰5�AŠ:ؘ!‘9Ð Ø�1‰u˜‰lˆØ�q‘˜A‘ ˆÙ�c˜1“  Ñ&©%°°3«-Ñ7Ð7rrrD)rprrs``@rÚ _digits2intrqs"ú€ö 8ñ%+‰5�”C˜“KÓ Ð1°Ð1rcóð—|j«}t||«}d}g}t|«D])}t||z|z||«\}}|j |«Œ+|j «t ||«}||fS)z[Divide a non-negative integer a by a positive integer b, giving quotient and remainder.r)r'rmÚreversedr_ÚappendÚreverserq) rArBrrlr]Úq_digitsÚa_digitÚq_digitrcs rÚ _divmod_posry+s~€ð � ‰ ‹€Aܘ1˜aÓ €Hà €AØ€HܘHÖ%ˆÜ˜q A™v¨Ñ0°!°QÓ7‰ ˆ�Ø�‰˜Õ ð&ð ×ÑÔÜ�H˜aÓ €AØ ˆaˆ4€Krcó¢—|dk(rt‚|dkrt| | «\}}|| fS|dkrt||«\}}|||zfSt||«S)z�Asymptotically fast replacement for divmod, for 'int'. Its time complexity is O(n**1.58), where n = #bits(a) + #bits(b). r)ÚZeroDivisionErrorÚ int_divmodry)rArBrcr]s rr|r|<so€ð ˆA‚vÜÐØ ˆQŠÜ˜1˜"˜q˜bÓ!‰ˆˆ1Ø�1�"ˆuˆ Ø ˆQŠÜ˜1˜"˜aÓ ‰ˆˆ1؈r�1˜�r‘6ˆzÐä˜1˜aÓ Ð r)Ú__doc__rMrr6Ú ImportErrorr*r;rFrKrSrUr_rVrmrqryr|rrrÚrsrðñ >ó ÛðÛò =ò@*òZ,ò^ ò  ð"€ ò ò< òò> 2òó" !øðS òØ‚Hðús Œ4´>½>