403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_long.cpython-315.opt-1.pyc
R
>lqjc��]PHs]QHGs]PHs]PHs]PHs]PHs\OOs	]\	*s
\
]*
s]Fs]s
]]]\
\
]*	QQ,s]s\]\	*2FD$s\O%\]*
2\]*sJ&	?\\Tt,tFDp&MJ	to\Tt,tFDp'MJ	to**
s\O&O(s\O&O,s\O&O0s\O&O4s]\*]\\*
]*
**
sQsQsQQ\O>2s \!Q6Xc\OD2P!P!ttohttoh)	�)�supportlUU�*UU�*l�*UU�*UU
c��[OO]*o[OOU*
o]U*o,QNoU]6XcQ!U]6c[	U'2'!UO2U*
oU]6c
V'*L&V*	[
UPU*&*2*oVdU]***
oVVU6H*U6�c[Q2g[O[U2U2!)z1
Correctly-rounded integer-to-float conversion.

�z%integer too large to convert to float)r�������rr�r)�sys�
float_info�mant_dig�max_exp�int_to_float�
bit_length�bool�
OverflowError�math�ldexp�float)�n�	PRECISION�	SHIFT_MAX�Q_MAX�ROUND_HALF_TO_EVEN_CORRECTION�shift�qs&      �#C:\Python315\\Lib\test\test_long.pyr
r
's������'�'�!�+�I����&�&��2�I�
��N�E�$?�!�	�A�v��	
�Q���a�R� � � �
�L�L�N�Y�&�E��q�y��V��q�z�T�!��e��n�:L�5M�&M�A��q�1�u�	-�-�A�
�U�
��i�'��C�D�D��:�:�e�A�h��&�&�c��V*]6o[U2[U2qU%f[Q2gU[U*6�c[Q2gUO	2UO	2*
oU]6�cU]U*U*6�fU]6c U]U'**U6�c
U]*
o[U[2[*
oU[U']2*U[U]2*q[V2vqV]U*U6�f]U*U6XcU]*]6Xc
U]*
o[OVT2oU%cU'!S!)z-Correctly-rounded true division for integers.zdivision by zeroz)int/int too large to represent as a float)�abs�ZeroDivisionError�DBL_MIN_OVERFLOWrr�max�DBL_MIN_EXP�DBL_MANT_DIG�divmodrr)�a�b�negative�d�expr�r�results&&      r�truedivr,Us���s�Q�w�H��q�6�3�q�6�q�
�� 2�3�3���q� � ��G�H�H�	
��������'�A��A�v�!�q�!�t�a�x�-�1�q�5�Q��Q�B��Y�!�^�	�Q����a��
��
,�C���S�D�!���a�3�s�A�;�.�q��!�<�D�A�	��s�Q�w�!�A�#��(�q�1�u��z�	�Q���
�Z�Z��
�F��F�7�*�F�*rc�~`�\sQs]ssnQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQs\O(Q2s\O(\O,Q=QQ5Q22sQsQsQs\O(\O,Q=QQ5Q22sQsQsQsQsQs Q>Qks!\O(Q2s"Qs#Q s$\OJQ!2s&\OJ\O,Q=QQ5Q"22s'Q#s(\OJ\O,Q=QQ5Q$22s)Q%s*Q&s+Q's,Q(s-Q)s.Q*s/\OJQ+2s0\OJQ,2s1\OJQ-2s2Q.s3Q/s4Q0s5Q1s6Q2s7Q3s8\OJQ42s9Q5s:Q6s;Q7s<Q8s=Q9s>Q:s?Q;s@Q<sAUsBP!)?�LongTestc���UOU]2U[*oU[*
]*o]o]o[[O2[]**2]*oVS6c�U]*	]*o[	VrU*
2oSO]St96*9%c
[6*Lt2VW*oVG*oU]*%cU]U*]*
*o[[O2[]**2oJ�SOX5t96*9%cU6*Lt2[O2Q6cU'oU!�r��?)�
assertGreater�SHIFT�int�random�min�
assertTrue)�self�ndigits�nbits_hi�nbits_lo�answer�nbitsr*�bitss&&      r�getran�LongTest.getran{s�����7�A�&��U�?���e�#�a�'��������
�
��5�1�9�-�.��2������F�a�<�D��t��-�.�D��O�O�A��.�.��.�/��L�E��^�F��1�u�u��A��I��?�3���F�M�M�O�u�q�y�1�2�A�����5�5�X�5�6��=�=�?�S� ��W�F��
rc���]o[U2FD0oU[*[O][2*oJ2	[O2Q6cU'oU!r0)�ranger3r5�randint�MASK)r9r<�is&  r�getran2�LongTest.getran2�sH�����w��A���o�����4�)@�@�F� ��=�=�?�S� ��W�F��
rc���UOoUOVQ59^tt^2[V2vqEV*V*qvV*V!*q�UV�Q2UVFQ2UVWQ2UVU*U*Q2U]6�c(SO]St96*9%cU6LtQ2L%SOX%t969%c]6*LtQ2PPP2P!)%fhP!9h)��x�yzmultiplication does not commutez(divmod returns different quotient than /z#divmod returns different mod than %zx != q*y + r after divmodzbad mod from divmod)�assertEqual�subTestr$r7)
r8rJrK�eqrr*�q2�r2�pab�pbas
&&&       r�check_division�LongTest.check_division�s���
�
�
��
�\�\�A�\�
#�
#��!�<�D�A��T�1�3���s�A�C���s�:�;��q�@�A��q�;�<��q�A�#��'�6�7��1�u�����Q�
�
��
�,A�B�����
�
��
�,A�B�$�
#�
#�
#�s$�A$C#�
C#�&%C#�
C#�#C4	�,C4	c�$�[[][]*22[[[[]*22*oUO	[]*2SFDJoUOU2oSFD/oUOU29%f]oUO
V52J1	JL	UO
QQ2UO
QQ2UO
QQ2UO
QQ2UO
Q	Q
2UO
QQ2UO
Q
Q2UO
QQ2UO
QQ2UO
QQ2UO
QQ2UO
QQ2P!)rl!Us/w��3alZW��3al+Q@{�d��B]Ol�Nl�O�Ol�Nl�t�e�o%g�q�Cgx<l�&�ghrsGlQ5��K�4+�o�-bklC�4+�o�-bkl��.#w�flD�&I-�Xl�Z��nSu9bl�c�v��
��<�Ilrd�FBu�'�pl�PhbIi|�$l1�m�{Wqi���8l�s~5^Fi�y�+l'H�
<{�Cl`<{�Cl�ED_5(�Nl�o�ybal=2zz6l�9�t�m)�listrB�	MAXDIGITS�KARATSUBA_CUTOFF�appendr?rS)r8�digits�lenxrJ�lenyrKs&     r�
test_division�LongTest.test_division�ss���e�A�y��{�+�,�t�E�:J�6F��6K�5M�0N�N���
�
�&��*�+��D����D�!�A����K�K��%�*�*����#�#�A�)���	
���8�/�	1����@�)�	+����@�)�	+����A�3�	5�	
���@�2�	4����@�3�	5�	
���N�I�6����/��;����.�	�:����.��?����.��?����,�n�=rc��[[]]22[[[[]
*22*oUO[]
*[]d*,2STt,tFDp"[*MJ	ooSFD�o]U*]*
oSFD�oVd6cJUOVFQ59^tt^2]U*]*
oVW*o]VF**]U**
]U**
]*o	UO
V�2PPP2J�	J�	P!ttoh)%fhJ�9h)r)�abits�bbits)rVrBrX�extendr3rMrL)
r8rZ�digitr>r`r%rar&rJrKs
&         r�test_karatsuba�LongTest.test_karatsuba�s���e�A�q�k�"�T�%�0@�0@�2�0E�+G�&H�H���
�
�'�"�,�.>��.D�E�F�+1�2�6�%��
�
�6��2��E��e��q� �A����=���\�\��\�;�;��e��q�(�A���A���
�.��u�*�&��u�*�&���A��$�$�Q�*�<�;����	3�<�;�;�s�,D1�AD6
�6E�?Ec
��UOoUOUQ59^tt^2UU]*]2UU]*U2UU]*U2UUP*U2UUP*P2UUP*U&2UV&&2UV*U2UV*U2UV*]2UV&*]2UV&*P2UV&*P2UU']U&*2UU'U]*
&2PPP2[][*2FD�o]U*oUOVUQ59^tt^2UV*U*	U2UV*V*	2UV*V*2UV'*V*	U*2UV'*V]*
&*2PPP2J�	P!)%fhK�9h)%fhJ�9h)�rJ)rJr�p2)rLrMrBr3)r8rJrNrrhs&&   r�check_bitop_identities_1�!LongTest.check_bitop_identities_1�s���
�
�
��
�\�\�A�\�
�
��q�1�u�a�L��q�1�u�a�L��q�1�u�a�L��q�2�v�q�M��q�2�v�r�N��q�2�v��r�N��q�2�#�J��q�u�a�L��q�u�a�L��q�u�a�L��q�2�v�q�M��q�2�v�r�N��q�2�v�r�N���r�1��r�6�N���r�Q�q�S�6�N�� �q��w��A��a��B�����2��.�.��1�6�Q�;��"��1�7�A�F�#��1�6�1�6�"��1�s�7�A�F�a�K�(��1�s�7�A�q�&�	�M�*�/�.� �!�
��$/�.�.�s%�C-G%�A<G8	�%G5	�.G5	�8H	
�H	
c�v�UOoUOVQ59^tt^2UV*V!*2UV*V!*2UV*V!*2UV*U*U2UV*U&U&*&2UV*U&U&*&2UV*V*V*&*2UV*V&*U&U**2UV*V*U&U&**2PPP2P!)%fhP!9h)rI�rLrM)r8rJrKrNs&&& r�check_bitop_identities_2�!LongTest.check_bitop_identities_2s���
�
�
��
�\�\�A�\�
#�
#��q�u�a�e���q�u�a�e���q�u�a�e���q�u�q�y�!���q�u���a�R��j�!��q�u���a�R��j�!��q�u�q�u�!�%��(�)��q�u�q�2�v�1�"�q�&�)�*��q�u�q�u�!��q�b��)�*�$�
#�
#�
#�s�C5D'�'D8	�0D8	c��UOoUOVUQ59^tt^2UV*U*VU**2UV*U*VU**2UV*U*VU**2UVU**V*V**2UVU**V*V**2PPP2P!)%fhP!9h))rJrK�zrl)r8rJrKrprNs&&&& r�check_bitop_identities_3�!LongTest.check_bitop_identities_3s���
�
�
��
�\�\�A�a�\�
(�
(�����{�A�Q��K�(�����{�A�Q��K�(�����{�A�Q��K�(��q��E�{�Q�U�q�u�-�.��q��E�{�Q�U�q�u�-�.�)�
(�
(�
(�s�B<C/�/D	�8D	c��[FDoUOU2J	[][]*2oSFDoUO	U2oUOU2SFDSoUO	U2oUOV2UO
VUO	V4*]*22JU	J�	P!�r)�specialrirBrWr?rmrq)r8rJrZr[r\rKs&     r�test_bitop_identities�LongTest.test_bitop_identitiess�����A��)�)�!�,���q�)�A�+�&���D����D�!�A��)�)�!�,����K�K��%���-�-�a�3��-�-�a�D�K�K���q�@P�4Q�R��rc	�,�,o]oU]6c]U'qU%c*[V2vqUO[U22J1UO2S9%f],oQPU]Q]Q]
P]Q-U**PO	QU22*!)r�-�0b�0o�0xc3�@�SF �DoQU*w�	J	P!3h)�0123456789abcdef�)�.0rEs& r�	<genexpr>�'LongTest.slow_format.<locals>.<genexpr>1s��f���f��)�!�,�,�f�s�)r$rYr4�reverse�join)r8rJ�baserZ�signr*s&&&   r�slow_format�LongTest.slow_format%s��������q�5��!��!���!�?�D�A��M�M�#�a�&�!��������A�3���5�D�z��4��D�"�b�"�d�3�D�9�:��w�w�=�f�=�=�>�	>rc
���][1][1]
[1]
[1][11FD�vq#UU2oUOVOQ59^tt^2UOV2oUOVE2PPP2UOUQ59^tt^2UO[U]2U2PPP2J�	P!)%fhKU9h)%fhJ�9h)r)rJ�mapper)�got)
�bin�oct�str�repr�hexrM�__name__r�rLr4)r8rJr�r�r��expecteds&&    r�check_format_1�LongTest.check_format_13s�����H�q�#�h��S�	�B��:��C�y�P�L�D���)�C�����/�/��:�:��+�+�A�4��� � ��/�;����#��&�&�� � ��S�!��a�0�'�&�Q�:�:��'�&�&�s$�#C		�C	�	C
�C
�C-
�%C-
c���[FDoUOU2J	[]
2FDDo[][]*2FD%oUO	U2oUOU2J'	JF	P!)�
)rur�rBrWr?)r8rJrEr[s&   r�test_format�LongTest.test_format<s[����A�����"���r��A��a��1��-���K�K��%���#�#�A�&�.�rc��QQ]
]d*1,oSFDZvq#QFDNoQFDDoVT*U*oSoUQ6XcU[IcU'oUO[U2U2JF	JP	J\	UO[[Q2UO[[Q2UO[[Q2UO[[Q2UO[[Q]2UO[[Q]2UO[Q]2]+2UO[Q	]2]2UO[Q
]2]S2UO[Q]2Q2UO[Q
]2]2UO[Q]2]S2UO[Q]2Q2UO[Q]2]2UO[Q]2]2UO[Q]2]2UO[Q]2]2UO[Q]2]2UO[[Q]2UO[[Q]2QQQQQ Q"Q!Q#Q$]]d*]]d*',oSFDo	UO[[QU	2J!	UO[[Q2P![cCJ�h9h)%�1�0ry�123L�123l�0Lz-37L�0x32L�1L�000�0o123�0x123�#�0b100z	 0O123   z 0X123  z 0B100 z+0z-0�00�08z-012395�42uこんにちは)�100000000000000000000l F�x:^V�e10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)��+ry)r�� �	z  		  is������i�l����������l����l����)�
ValueErrorrLr4�assertRaises)
r8�LL�s�vr��prefix�ss�vv�
invalid_basesr�s
&         r�	test_long�LongTest.test_longDs���'���C��(�
���D�A�$��7�F����*�B��B��s�{�q�
�':��R����(�(��R��"�5�
8�%��	
���*�c�6�2����*�c�6�2����*�c�4�0����*�c�6�2����*�c�7�B�7����*�c�4��4�����T�2���+�	
����U�A���*�����W�a��"�-�����W�a��#�.�����W�a��!�,�����[�!�,�b�1�����Z��+�S�1�����Y��*�A�.�����S�!��a�(�����T�1��q�)�����T�1��q�)�����T�1��q�)����*�c�4��3����*�c�9�a�8��!�5�&�(�!�5�&�(��S�&�1�c�6�'��
�
"�D����j�#�t�T�:�"�
	
���*�c�+K�L��O&����s�	K;�;	L�L�
Lc�\�QQ2oUO[[U22P!)c�(`�\sQsQsnQsQsUsP!)�*LongTest.test_conversion.<locals>.JustLong�c��]*!��*r�r8s&r�__long__�3LongTest.test_conversion.<locals>.JustLong.__long__�s��rr)r��
__module__�__qualname__�__firstlineno__r��__static_attributes__�__classdictcell__��
__classdict__s@r�JustLongr�s����
�
rr�)r��	TypeErrorr4)r8r�s& r�test_conversion�LongTest.test_conversion}s"��	�	�	
���)�S�(�*�5rc���[U2o[U2oQOVU2oUO	V#U2P![cQoKAh9h[cQoKHh9h)�overflowzAError in conversion of integer {} to float.  Got {}, expected {}.)rrr
�formatrL)r8r�actualr��msgs&&   r�check_float_conversion�LongTest.check_float_conversion�so��	 ��1�X�F�	"�#�A��H�&�&,�f�Q��&A�	�����3�/���	 ��F�	 ��
�	"�!�H�	"�s.�A�A�	A�
A�A�	A#�A#�"A#c
���,QNoSFD;oUO[U2U2UO[U'2U'2J=	QFDfvq#[]2FDQoUO[[]U*QU**22]U*QU**2JS	Jh	QFDfvq#[]2FDQoUO[[]U*QU**22]U*QU**2JS	Jh	[[2o][
*oVV*]*oUO[U2[2UO[U]*2[2UO[U]*
2[2UO
[[U2UO[]U*
2['2UO
[[U'2UO
[[U]*
2UO
[[U2UO
[[U]*2UO
[[]U*]*
2UO
[[]U*2UO
[[Vf*2[]d2FD�o]U*Q*]*o]U*Q*oUO[[U22U2]U*Q*o]U*Q*oUO[[U22U2J�	U]*
VU]*U]*
Vw]*U]*
Vf]*]U*]*
]U*Vf*,oUOU2[Q]2FD=o[Q	]�2FD)oUO]U]5**U*2J+	J?	SFD&o	UOU	2UOU	'2J(	P!)
r���)rrrl����l����l����r�r�l����l����r�l)�rr)rr����r�r���r�)�r����))rrr�)rrr�r�r�)r�r�r�)r�r�)�	r�)r�r�)��)r�r�)�
r�)��)�r�l������)rLrrBr4�DBL_MAX�DBL_MAX_EXPr�rrbrYr�)
r8�exact_valuesrJrK�p�int_dbl_max�	top_power�halfway�test_values�values
&         r�test_float_conversion�LongTest.test_float_conversion�sB��	"���A����U�1�X�q�)����U�A�2�Y���+��
M�D�A��2�Y��� � ��U�1�a�4��q��>�%:�!;�Q��T�5��7�^�L��M�3�D�A��2�Y��� � ��U�1�a�4��q��>�%:�!;�Q��T�5��7�^�L��3��'�l���{�N�	��*�Q�.������{�+�W�5�����{�1�}�-�w�7�����w�q�y�)�7�3����-���8�����q��y�)�G�8�4����-����9����-��	�!��<����-��	�:����-��	�!��<����-���)��A�
�>����-���)��<����-��	�0C�D��s��A��1��	�"�Q�&�A��1��	�"�A����S��q��]�A�.��1��	�"�A��1��u��A����S��q��]�A�.��
��M�;�A�
��A�I�w�!���a�K��a�K�
�i�K��M�1�Y�;�	�(;�	
��	���<�(��r�1��A��4��%���"�"�1�q��t�9�q�=�1�&��!�E��'�'��.��'�'���/�!rg�������?)�memusec�P�]U*oUO[[U2P!rt)r�rr�r8�sizer�s&& r�"test_float_conversion_huge_integer�+LongTest.test_float_conversion_huge_integer�s��
��I�����-���2rc	��Q+FD'oUO[[U22U2J)	Q,o]Q*oU'oQUQUQUQ[-o,QMQMQMQ	MQ
MQMQMQ
MQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQ MQ!MQ"MQ#MQ$MQ%MQ&MQ'MQ(MQ)MFDoUO	[
[Ve2J 	UO[U2[U2Q*2P!)-�@i0u�huge�mhuge�shuger�float(huge)�float(mhuge)z
complex(huge)zcomplex(mhuge)zcomplex(huge, 1)zcomplex(mhuge, 1)zcomplex(1, huge)zcomplex(1, mhuge)z	1. + hugez	huge + 1.z
1. + mhugez
mhuge + 1.z	1. - hugez	huge - 1.z
1. - mhugez
mhuge - 1.z	1. * hugez	huge * 1.z
1. * mhugez
mhuge * 1.z
1. // hugez
huge // 1.z1. // mhugezmhuge // 1.z	1. / hugez	huge / 1.z
1. / mhugez
mhuge / 1.z
1. ** hugez
huge ** 1.z1. ** mhugezmhuge ** 1.zmath.sin(huge)zmath.sin(mhuge)zmath.sqrt(huge)zmath.sqrt(mhuge)z(float(shuge) should not equal int(shuge))g���r��?r�X123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345123451234512345)rLrr4rr�r�eval�assertNotEqual)r8rJrrr�	namespace�tests&      r�test_float_overflow�LongTest.test_float_overflow�s���*�A����U�3�q�6�]�A�.�+����E�z������T�7�E�7�E�6�4�P�	��]��N��$��&6��'��)<��(��*=��!�	�#.�	�0<�	�>J�	�
!��
#.��
0<��
>J��!�
�#.�
�0<�
�>J�
�"��$0��2?��AN��!��#.��0<��>J��"��$0��2?��AN��&��(9��'��);��D� 
���m�T�4�C�!�(	
���E�%�L�#�e�*�6�	8rc��[O[O2o[[	]
22,QN*FDbo]
U*o[OU2oUOVB2V!*o[OU2oUOVe2Jd	]Q*'Q]1FDMoUO[[OU2UO[[OU2JO	P!)r��')�d��rr)	r�log10�erVrB�assertAlmostEqual�logr�r�)r8�LOG10Er)r�rr�r�bads&       r�	test_logs�LongTest.test_logss������D�F�F�#����b�	�?�%7�7�7�C��#�I�E��J�J�u�%�E��"�"�5�.��|�H��(�(�5�/�C��"�"�3�1�8��%�Z�=�"�a�'�C����j�$�(�(�C�8����j�$�*�*�c�:�(rc��`
�UOoU
1QkQ2n
,QNoQFD`oUOUQ*
UQ*
V3Q*UQ*[U]*
2[U2[U]*2,2Jb	UO]]][O[[O2,2[Q2oUO]]]]Q*U]*
V3]*,2SOSTt,tFDpD'MJ	to2SFD�oR
U2oSFD�oR
U2oVW6�VW6*
oUO
VFUQ59^tt^2VF6�VF6*
o	UV�2UVF6HU]6H2UVF6gU]6g2UVF6U]62UVF6*U]6*2UVF6�U]6�2UVF6�U]6�2PPP2J�	J�	P!ttoh)%fhJ�9h)	c�T:`�\sQsQsnQsU1QksQsQsQsQs	Qs
Q	sUsP!)
�)LongTest.test_mixed_compares.<locals>.Rat�c���[U[2%cVm]UmP![U[2%c�[
O[U22vq#]o]oU%cC[
OV$2o[U2oVT*U*oV&*oV4*oJJU]6�cVS*o]oLSo]U'*oU]6cU'oVpmV�mP![QU*2g)rzcan't deal with %r)
�
isinstancer4rr(rr�frexprrr�)	r8r��fr�CHUNK�toprcrr(s	&&       r�__init__�2LongTest.test_mixed_compares.<locals>.Rat.__init__s����e�S�)�)�"�F��D�F���u�-�-��:�:�c�%�j�1�D�A��E��C�� �J�J�q�0�� #�A���"�|�u�4���
���
���A�v��H�������!��G���q�y��B���F��F�$�$8�5�$@�A�Arc��:�[UR2%f	RU2oUOUO*UOUO*q2V#6�V#6*
!)N)r$rr()r8�otherrJrK�Rats&&  �r�_cmp__�0LongTest.test_mixed_compares.<locals>.Rat._cmp__DsI���!�%��-�-���J�E��v�v����'����%�'�'�)9�1���!�%�(�(rc�,�UOU2]6H!�r�r.�r8r,s&&r�__eq__�0LongTest.test_mixed_compares.<locals>.Rat.__eq__I����{�{�5�)�Q�.�.rc�,�UOU2]6�!r1r2r3s&&r�__ge__�0LongTest.test_mixed_compares.<locals>.Rat.__ge__Kr6rc�,�UOU2]6�!r1r2r3s&&r�__gt__�0LongTest.test_mixed_compares.<locals>.Rat.__gt__M����{�{�5�)�A�-�-rc�,�UOU2]6*!r1r2r3s&&r�__le__�0LongTest.test_mixed_compares.<locals>.Rat.__le__Or6rc�,�UOU2]6!r1r2r3s&&r�__lt__�0LongTest.test_mixed_compares.<locals>.Rat.__lt__Qr=r)r(r)
r�r�r�r�r)r.r4r8r;r?rBr�r�)r�r-s@�rr-r!s/����&
B�P
)�

/�
/�
.�
/�
.�
.rr-r�Zb���tig333333�?i N)rJrK�Rcmp)rg����MbP?g�G�z��?rg�?g@��x�DrD)g�BgCg@C)rLrbr4r	�maxsizerrM)r8rN�cases�trJ�RxrK�RyrE�xycmpr-s&         @r�test_mixed_compares�LongTest.test_mixed_comparess����
�
�
��7	.�7	.�r8��+�A��L�L�!�c�'�1�s�7�A�3�w��C���a��c�(�C��F�C��!��H�6�
7�+�	���a��A�s�{�{�E�#�+�+�,>�?�@�
��J��
���a��A�q�E�z�1�Q�3��Q�3�7�8�
���%�(�%�Q�b�%�(�)��A��Q��B�����V����B�G�,���\�\�A��\�6�6��U�q�u�-�E��t�O��q�v�t�q�y�)��q�v�t�q�y�)��q�u�d�Q�h�'��q�v�t�q�y�)��q�u�d�Q�h�'��q�v�t�q�y�)�7�6����)�7�6�6�s�
G�A*G 
� G1�)G1c��]U*o[OOoUOV26HP
2UOV26gP	2UOV26P	2UOV26*P	2UOV26�P
2UOV26�P
2[	Q2oUOV26HP
2UOV26gP	2UOV26P
2UOV26*P
2UOV26�P	2UOV26�P	2[	Q2oUOV26HP
2UOV26gP	2UOV26P
2UOV26*P
2UOV26�P
2UOV26�P
2=PU*o[OO'oUOV26HP
2UOV26gP	2UOV26P
2UOV26*P
2UOV26�P	2UOV26�P	2[	Q2oUOV26HP
2UOV26gP	2UOV26P	2UOV26*P	2UOV26�P
2UOV26�P
2[	Q2oUOV26HP
2UOV26gP	2UOV26P
2UOV26*P
2UOV26�P
2UOV26�P
2P!)r�inf�nan�-inf)r	r
r!�assertIsr)r8rr�r&s&&  r� test_mixed_compares_huge_integer�)LongTest.test_mixed_compares_huge_integeros���
��I���N�N�����
�
�a�f�e�$��
�
�a�f�d�#��
�
�a�e�T�"��
�
�a�f�d�#��
�
�a�e�U�#��
�
�a�f�e�$��%�L���
�
�a�f�e�$��
�
�a�f�d�#��
�
�a�e�U�#��
�
�a�f�e�$��
�
�a�e�T�"��
�
�a�f�d�#��%�L���
�
�a�f�e�$��
�
�a�f�d�#��
�
�a�e�U�#��
�
�a�f�e�$��
�
�a�e�U�#��
�
�a�f�e�$�
�
�D�L��
�^�^�
�
����
�
�a�f�e�$��
�
�a�f�d�#��
�
�a�e�U�#��
�
�a�f�e�$��
�
�a�e�T�"��
�
�a�f�d�#��&�M���
�
�a�f�e�$��
�
�a�f�d�#��
�
�a�e�T�"��
�
�a�f�d�#��
�
�a�e�U�#��
�
�a�f�e�$��%�L���
�
�a�f�e�$��
�
�a�f�d�#��
�
�a�e�U�#��
�
�a�f�e�$��
�
�a�e�U�#��
�
�a�f�e�$rc��UO[QQ2Q2UO[QQ2Q2UO[QQ2Q2UO[QQ2Q2UO[]Q2Q2UO[PQ2Q	2UO[]Q
2Q2UO[PQ
2Q2UO[]Q
2Q2UO[PQ
2Q2UO[]Q2Q2UO[PQ2Q2UO[]Q2Q2UO[PQ2Q	2UO[]Q2Q2UO[]Q2Q2UO[QQ2Q2UO[QQQ2Q2UO[QQ2Q2UO[QQQ2Q2UO[QQ2Q2UO[QQQ2Q2UO[QRQ2Q
2UO[QRQ2Q
2UO[[Q]2Q2Q2UO[[Q]2Q2Q2UO[[Q]2'Q2Q2UO[[Q]2'Q2Q2UO[[QQ 2UO[QQ!2Q"2UO[QQ#2Q$2UO[]Q%2Q2UO[QRQ%2Q
2UO[QQ%2Q&2UO[QQQ%2Q'2UO[QQ(2Q&2UO[QQQ(2Q'2UO[QQ)2Q*2UO[QQQ)2Q'2UO[QQ+2Q,2UO[QQQ+2Q'2UO[[QQ-2UO[QQ.2Q/2UO[]Q02Q12UO[QRQ02Q22UO[QQ02Q32UO[QQQ02Q42UO[QQ52Q32UO[QQQ52Q42UO[QQ62Q72UO[QQQ62Q42UO[QQ82Q92UO[QQQ82Q42UO[[QQ:2UO[Q;Q<2Q=2UO[[]Q>2UO[[]Q?2UO[[]Q@2UO[[]QA2UO[QB[]QC2UO[QB[]QD2UO[QB[]QE2UO[QB[]QF2UO[QG[]QH2UO[QI[]QJ2[
[QK2[QL2]*2Tt,tFDo[U2MJ	to[
[QM2[QN2]*2Tt,tFDo[U2MJ	to*FD�oUQO7cJUO[[]U2UO[[]U2UO[[PU2UO[[]]d*U2UO[[]]d*'U2J�	QPFD;oQSFD1oUO[V22[[U2U22J3	J=	P!ttohttoh)Ti�[r(�	123456789�,z123,456,789�_�123_456_789ryr�z-1z-3z  1z -1z+3z +1z 3r�z 1rJ�3�Xi��4d2z-4d2�8xz     4d2z    -4d2�be�BEz-bez-BE���Iz,x�_x�	4996_02d2�_X�	4996_02D2�o�2322z-2322z-oz oz 2322z+oz+2322z,o�_o�
111_4540_1322r&�11z-11�10011010010z-10011010010z-bz bz 10011010010z+bz+10011010010z,b�90�_b�11_0000_0011_1001z1.3�_cz,cz+czCannot specify bothz_,z,_z_,dz,_dzCannot specify ',' with 's'z,szCannot specify '_' with 's'�_sr%rp�A�ZzbcdoxXeEfFgGn%zeEfFgG%i.������)rrrr���r`i.�i�)
rLr�r4r�r��assertRaisesRegexrB�ord�chrr)r8rJ�format_specr�s&   r�test__format__�LongTest.test__format__�s	������	�3�/��=�����	�3�/��=�����	�3�/��?�����	�3�/��?�	
�����3���-������C��$�/������4��%�0������D�)�5�1������4��%�0������D�)�5�1������4��%�0������D�)�5�1������3���.������C��$�/�	
�����3���-������3���-������c�*�E�2������s�+�V�4������d�+�Z�8������t�,�j�9������c�*�E�2������s�+�V�4������C��$�/������C��$�/������D�"�
�s�3�T�:������D�"�
�s�3�T�:������T�2����4�e�<������T�2����4�e�<����*�f�j�$�?�����
�D�1�;�?�����
�D�1�;�?�	
�����3���-������C��$�/������c�*�F�3������s�+�W�5������d�+�V�4������t�,�g�6������d�+�W�5������t�,�g�6������d�+�W�5������t�,�g�6����*�f�j�$�?�����
�D�1�?�C�	
�����3���.������C��%�0������c�*�M�:������s�+�^�<������d�+�]�;������t�,�n�=������d�+�^�<������t�,�n�=������d�+�^�<������t�,�n�=����*�f�j�$�?������t�,�.A�B�	
���*�f�a��7����*�f�a��6����*�f�a��6����*�f�a��6�	
���z�+@�&�!�T�R����z�+@�&�!�T�R����z�+@�&�!�U�S����z�+@�&�!�U�S����z�+H�&�RS�UY�Z����z�+H�&�RS�UY�Z�.3�3�s�8�S��X�a�Z�-H�I�-H��S��V�-H�I�-2�3�s�8�S��X�a�Z�-H�I�-H��S��V�-H�I�J�J�K��"2�2��!�!�*�f�a��E��!�!�*�f�a��E��!�!�*�f�b�+�F��!�!�*�f�a��f�k�J��!�!�*�f��3��i��M�J�%�K�G��� � ���!;�!'��e��k�!B�D�H�%��J��Is�4c�2cc���UO[[[Q22UO[[[Q22UO[[[Q22P!)rOrQrP)r�rr4rr�r�s&r�test_nan_inf�LongTest.test_nan_infsD�����-��e�E�l�;����-��e�F�m�<����*�c�5��<�8rc��UO[29^tt^2]]*oPPP2UO]]2UO]]2UOQQ2UOQQ2UO]]2UO]]2UO]]2UO]]2P!)%fhK�9h)r���rr�r�rrL�r8rXs& r�test_mod_division�LongTest.test_mod_divisions���
�
�
�0�
1�
1��A��A�2�	
����!�$�����1�%�����2�&�����B�'������#�����!�$�����!�$�����1�%�2�
1�s�
C�C	�C	c��]Q*oU'oUOV*Q2UOV"*Q2UOV*Q2UOV!*Q2UO]U*Q2UO]U*Q2UO]U*Q2UO]U*Q2UOQU*U]*	*U*Q2UOQU*U]*	*U*Q2UOQU*U]*	*U*Q2UOQU*U]*	*U*Q2UOV]**Q2UOQU*U*Q2QUQ	U-oQ
FDoUO[[VC2J 	QFD(o[VS2oUOUQQ
U*2J*	QFDoUO[[Vs2J 	P!)ri@�rr�gԄ@r1i@Brrzexpected underflow to 0 from %rr
gԄ�)rr	zhuge / 1zhuge / 2z	huge / -1z	huge / -2zmhuge / 100zmhuge / 200)z1 / hugez2 / hugez	-1 / hugez	-2 / hugez100 / mhugez200 / mhuge)zhuge / 0z	mhuge / 0)rLr�rr
r)r8rrrr��	underflowr+�zeros&       r�test_true_division�LongTest.test_true_divisions����E�z����������c�*�������,������t�,������t�,�����T��3�'�����T��3�'�����U��C�(�����U��C�(����#��*���	�2�d�:�E�B����#��+��!��4��=�u�E����#��*���	�2�e�;�V�D����#��+��!��4��<�f�E�������+�S�1����'�D�.�D�0�'�:��T�7�E�2�	�7�H�
���m�T�8�G�7�
7�I��)�/�F����V�S�>��J�
L�7�.�D����/��t�G�.rc�<�UO[29^tt^2]]*oPPP2UO]]2UOPP2UOPP2UO]]2UO]]2UOQQ2UOQQ2UO]]2UO]]2UOQQ2UOQQ2UO]]2P!)%fhK�9h)rr�rr�s& r�
test_floordiv�LongTest.test_floordiv7s���
�
�
�0�
1�
1��Q��A�2�	
�����#�����"�%�����"�%�����1�%�����A�&�����2�&�����2�&�����!�$�����A�&�����2�&�����2�&�����!�$�!2�
1�s�
D�D	�D	c
��U%c1[[U2[U22][*6cP![[	V22o[V*2oUOVEQOVVE22P![
cQoKE[cQoKSh9h[
cQoKT[cQoKbh9h)z�Verify that the result of a/b is correctly rounded, by
comparing it with a pure Python implementation of correctly
rounded division.  b should be nonzero.r��zerodivisionz7Incorrectly rounded division {}/{}: expected {}, got {})	r!rr#r�r,rrrLr�)r8r%r&�
skip_smallr�r�s&&&&  r�
check_truediv�LongTest.check_truedivJs����#�c�!�f�c�!�f�-��<��?��	&��G�A�M�*�H�	!��q�u�+�C�	
����)/�/5�v�a�H�/J�	L���	"�!�H� �	&�%�H�	&��
�	��C� �	!� �C�	!�sG�B�B&�	B#�B#�B#�B#�"B#�&	C�0C�5C�>C�Cc�
�UO]{]2UOQ]2UO]]2UO]Q
2UO]]2UOQ][**Q2UOQQ][[*
**2UOQ]]d**Q2UOQQ]]Q**2][[[[[*
1oSFD�o[	U]*
U]*2FD�oUOQ][U]2**Q][U']2**2UOQ][U]2**Q][U']2**2J�	J�	]]]]Q]]d*PQQQQ])]2*'1FD`o[	Q]
2FDLoUOU[*U*U2UOU[*U*U'2JN	Jb	[	]�2FD\oUO][*]*Q*]]�**]U**][*Q*2J^	UO]Q2UOQQ2[	Q	2FDQoUO]
U]**]
U*2UO]
U*]
U]**2JS	]]]]]]]] Q]]d*PQQQQ])]2*'1FDBo[	Q]
2FD.oUO][*U*U*U2J0	JD	[	Q]2FDoUOU]Q
*2J	Q]
]d*]
Q	*1FD�o[	Q	2FD�o[O]U2o[OU]U*]*2o	UOV�2UOU'U	2UOV�'2UOU'U	'2J�	J�	[	Q2FD�o
[OQ	2o[O]Q	2o[O]U*2o
[O]]U*2oUOV�2UOV�'2UOU
'U2UOU
'U'2J�	P!)�{rkiNFíi0&iCi�
l�E,J_l�J�bri4ri8���rrige~l90r���i��i������i��ld(	)	r�r�r#r"rBr!r r5�	randrange)r8�basesr�r)�mrrE�Mr%r&rX�a_bits�b_bitsrJrKs&              r�$test_correctly_rounded_true_division�-LongTest.test_correctly_rounded_true_divisionhsT��	
���3��"����4��#����1�a� ����1�b�!����1�a� ����;��K��7��?����5�&�1�|�k�/I�+J�"J�K����5��C��<��/����;��a��e��4��L�+��k�L�8�:���D��T�B�Y��r�	�2���"�"�5��C��Q�K��#7��q�#�s�d�A�,��9N�O��"�"�5��C��Q�K��#7��q�#�s�d�A�,��9N�O�3���Q��2�u�a��f��b�"�c�6�B��F�7�4�A��3��^���"�"�1�%5�#5��#9�1�=��"�"�1�%5�#5��#9�A�2�>�$�4��s��A�
����<��!� 3�U�:�1�c�6�A�A�q�D�H��l�?�5�0�
2�
�	
���1�d�#�	
���0�2G�H��t��A����r�A�a�C�y�"�a�%�0����r�1�u�b�1�Q�3�i�0��
�Q��1�a��R��U�A�s�F��b�"�c�6�B��F�7�4�A��3��^���"�"�1�l�?�1�#4�q�#8�!�<�$�4��s�B��A����q�!�T�'�*� ��"�c�'�2�t�8�,�A��4�[���$�$�Q��*���$�$�Q��!��A��.���"�"�1�(��"�"�A�2�q�)��"�"�1�b�)��"�"�A�2��r�*�
!�-��u��A��%�%�d�+�F��%�%�a��.�F�� � ��F��+�A�� � ��A�v�I�.�A����q�$����q�"�%�����r�1�%�����r�A�2�&�rc�:�UO[29^tt^2]*Q*PPP2UO[29^tt^2]*]Q*'*PPP2UO[29^tt^2]*Q*	PPP2UO[29^tt^2]*]Q*'*	PPP2P!)%fhK�9h)%fhK�9h)%fhKo9h)%fhP!9h)r�rrr)r�r�r�s&r�test_negative_shift_count�"LongTest.test_negative_shift_count�s���
�
�
�z�
*�
*��"�H�+�
�
�
�z�
*�
*��A��I�,��+�
�
�
�z�
*�
*��"�H�+�
�
�
�z�
*�
*��A��I�,��+�
*�
+�
*��
*�
*��
*�
*��
*�
*�
*�sG�
C�C#�
C6�4D	�C 	�C 	�#C3	�,C3	�6D	�?D	�	D	�D	c��UO]]2UO]]2UO[29^tt^2]P*PPP2UO]]Q**]2UO[29^tt^2]]Q*'*PPP2P!)%fhKi9h)%fhP!9h)rr)rLr�r�r�s&r�test_lshift_of_zero�LongTest.test_lshift_of_zero�s��������#�����!�$�
�
�
�z�
*�
*�
��G�+�����q�D�y�)�1�-�
�
�
�z�
*�
*�
�1��9���+�
*�+�
*��+�
*�
*�s$�
B.�C�.B>	�7B>	�C	�
C	c��UO][O*]2UO][O]**]2P!r1)rLr	rFr�s&r�test_huge_lshift_of_zero�!LongTest.test_huge_lshift_of_zero�s:��
	
����c�k�k�)�1�-�����s�{�{�Q��/��3rc���]U*oUOUO2U]*2UOUO2]2UOV!*	]2P!)r��rLr�	bit_countr�s&& r�test_huge_lshift�LongTest.test_huge_lshift�sO��
��I������������2���������*������A�&rc�d�]Q*oUO]*U*	]2UOQU*	P2UOQU*	]2UOQU*	P2UO]]�*U*	]2UO]]�*'U*	P2P!)rrici���i�����rL)r8�
huge_shifts& r�test_huge_rshift�LongTest.test_huge_rshift�s����$�Y�
�����z�)�1�-����#�*�,�b�1������+�Q�/����%�J�.��3�����C��:�-�q�1����!�S�&��J�.��3rc�\�]Q*]*U*oUOUO2UQ*2UOUO2]2UOV!]**	]Q*]*2UOV!Q**	]2P!)r�����rr�)r8rrs&& r�test_huge_rshift_of_huge�!LongTest.test_huge_rshift_of_huge�s~���c��R��D�(��������*�D�3�J�7�������)�1�-������(�+�a�3�h�!�^�<������+�.��2rc��UO]]2UOQQ2UO]]2UOQQ2UOQQ2UOQQ2UOQQ2UOQQ2UO]]�*]*	]]*2UO]]�*']*	]]*'2UO]]�*]*]*	]]*2UO]]�*]*']*	]]*']*
2P!)r��1i��i��i���i���r�r�s&r�test_small_rshift�LongTest.test_small_rshift�s������"�%�����S�)�����"�%�����S�)�����C�(�����t�,�����C�(�����t�,�����C��1��a��f�-����!�S�&��A���3��w�/����!�S�&�1�*��*�A�s�F�3����1�c�6�A�:��!�+�a��f�W�q�[�9rc�.�UO]]2UOPP2UO]]2UOQQ2UO]]�*]	*	]]w*2UO]]�*']	*	]]w*'2UO][[**
[*	['2UO[]*
[[**
[*	['2P!)r�rr)rL�BASEr3r�s&r�test_medium_rshift�LongTest.test_medium_rshift	s�������!�$�����R�(�����A�&�����r�*�����C��1��a��f�-����!�S�&��A���3��w�/�	
���!�d�4�i�-�E�1�D�5�9����$��(�T�$�Y�.�5�8�4�%�@rc�8�UO]]2UOPP2UO]]2UOPP2UO]]�*] *	]]`*2UO]]�*'] *	]]`*'2P!r�r�r�s&r�test_big_rshift�LongTest.test_big_rshifts~������1�%�����b�)�����Q�'������+�����C��2��q�"�u�-����!�S�&��B���B���/rc�8�UO]T]T2UOQQ2UOQQ2UOQQ2UO]]*]*]]�*2UO]]*']*]]�*'2P!)r�ibi����i����r�r�s&r�test_small_lshift�LongTest.test_small_lshifts~������"�%�����S�)�����4�(�����e�,�����C��1��a��f�-����!�S�&��A���3��w�/rc��UOQQ2UOQQ2UOQQ2UOQQ2P!)r�iTi�i���i<��r�r�s&r�test_medium_lshift�LongTest.test_medium_lshift%sB������%�(�����V�,�����F�+�����w�/rc�8�UOQQ2UOQQ2UOQQ2UOQQ2UO]]�*] *]]�*2UO]]�*'] *]]�*'2P!)r�l�l�����l�l�����r�r�s&r�test_big_lshift�LongTest.test_big_lshift+s~������:�.�����k�2�����\�2�����
�6�����C��2��q�#�v�.����!�S�&��B���C���0rc��]]d*oU']*oU]*oUOV*]2UOV1*
]2P!)r)rR)r8r%r&�cs&   r�#test_small_ints_in_huge_calculation�,LongTest.test_small_ints_in_huge_calculation3s?��
��H��
�B��F��
��E���
�
�a�e�Q���
�
�a�e�Q�rc�j�UO[]
]Q2]2UO]]2]
]Qq2oUOV*U*]2UO[]]Q2]2UO]]2]]Qq2oUOV*U*]2UO[]]d]]d*]*
2]2UO]]d*]]d*]*
*]2]]d]]d*]*
q2oUOV*U*]2P!)r���r�)rR�pow)r8r%r�r�s&   r�test_pow_uses_cached_small_ints�(LongTest.test_pow_uses_cached_small_ints;s����
�
�c�"�a��o�q�)��
�
�m�Q�'��a��a���
�
�a�f�q�j�!�$��
�
�c�!�R��-�q�1��
�
�-�q�1��R��a���
�
�a�f�q�j�!�$��
�
�c�!�S�!�S�&�1�*�-�q�1��
�
�a�3�h�!�s�(�Q�,�/��3��S�!�S�&�1�*�a���
�
�a�f�q�j�!�$rc��]
]d*oUOU]*U*]2UOU]*U*]2UOV]**]2UOVQ**Q2[]U*]*U2vq#UOU]2UOU]2[QU*]d*U2vq#UOUQ2UOU]d2[]U'*]*
U'2vq#UOU]2UOUP2[]U*]*
U'2vq#UOUQ2UOUP2P!)r�r�rr)rRr$)r8�bigrr*s&   r�"test_divmod_uses_cached_small_ints�+LongTest.test_divmod_uses_cached_small_intsLs0���C�i���
�
�s�Q�w�#�o�q�)��
�
�s�Q�w�3�&��*��
�
�c�Q�h�'��+��
�
�c�R�i�(�"�-��a�#�g��k�3�'����
�
�a����
�
�a����b�3�h��n�c�*����
�
�a����
�
�a����a�C�4�j�1�n�s�d�+����
�
�a����
�
�a����a�#�g��k�C�4�(����
�
�a����
�
�a��rc
���[QQ2FCD$oUOV]*2UOV]*2UOV]*
2UOV]*2UOVP*2UOV]*2UOV]*2UOV&&2UOV]*2UOU[[U222UOV]*]*	[U22CJ'	QoUOV*
]2UO]U*]2P!)r��r�l)rBrRr4r�)r8rEs& r�test_small_ints�LongTest.test_small_intses����r�3���A��M�M�!��U�#��M�M�!��U�#��M�M�!��U�#��M�M�!�!�V�$��M�M�!��V�$��M�M�!��U�#��M�M�!��U�#��M�M�!�b�S�!��M�M�!��T�"��M�M�!�S��Q��[�)��M�M�!��T�1�W�c�!�f�-� �
���
�
�a�e�Q���
�
�a�!�e�Q�rc
��Qo[QQ2FCDoUO2oUOU[[	U2OQ222U]6wcESO
]U]*
*[U2t96*9%c
]U*6Lt2LUOU]2U]6wfJ�UOU][O[O[U22[O]2*U*2*2CJ	UO]O2]2UO]O2]2UOPO2]2UO]O2]2UOQO2]2QFCDo]U*oUOU]*
O2U2UO]U*
O2U2UOUO2U]*2UOU'O2U]*2UOU]*O2U]*2UOU']*
O2U]*2CJ
	P!)g�����|�=i�z-0bi��r)rr�r�r���� �!�?�@��)rBrrL�lenr��lstripr7rr�floorr)r8�tinyrJ�krEr%s&     r�test_bit_length�LongTest.test_bit_lengthws�����v�u�%�%�A�����A����Q��C��F�M�M�%�$8� 9�:��A�v�����A�a�C��C��F� 9� 9�Q��T� 9�:�� � ��A�&��A�v�
� � ��A��
�
�����Q��(����!��4�t�;�)=�%=�>�&�$	
���!���)�1�-����!���)�1�-����"���*�A�.����!���)�1�-����"���*�A�.�<�A��1��A����a��c�-�-�/��3����a��c�-�-�/��3����a�^�^�-�q��s�3����q�b�_�_�.��!��4����a��c�-�-�/��1��5����q�b��d�.�.�0�!�A�#�6�=rc��[QQ2FD;oUOUO2[U2O	Q22J=	QFD�o]U*oUOUO2]2UOU]*
O2U2UOU]?*O2]2UOU]*
Q*O2U]*
2J�	P!)rr��i���)r�r�r�r��A��iZi��)rBrLr�r��count)r8r%r)s&  r�test_bit_count�LongTest.test_bit_count�s����u�d�#�A����Q�[�[�]�C��F�L�L��,=�>�$�>�C��3��A����Q�[�[�]�A�.����a�!�e�.�.�0�#�6����a�"�f�/�/�1�1�5����q�1�u��m�6�6�8�#��'�B�>rc	�^�-]]a]]a]]a]]a]]a]]a]]
a]]
a]]
a]	]
a]
]
a]]
a]]
a]
]
a]]
a]]a]]a]]]]]]-Ao[QQ]2FDgoUO2FDOvq4[V2*P2oVB*oUOVV2UO	[U2[2JQ	Ji	UO[QQ2Q2UO[QQ2Q2UO[QQ2Q2UO[QQ2]2UO[QQ2]2UO[PQ2]2UO[]Q2]2UO[]Q2]2UO[]1Q2]2UO[]2Q2]2UO[]3Q2]d2UO[]�Q2]d2UO[]�Q2]�2UO[]�Q2]�2UO[]�Q2Q2UO[QQ2Q2UO[QQ2Q2UO[QP2Q2UO[QQ2Q	2UO[QQ2Q
2UO[QQ 2Q2UO[QQ!2Q2UO[QQ"2Q
2UO[QQ#2Q2UO[QQ$2Q2UO[QQ%2Q2UO[QQ&2Q2UO[QQ'2]2UO[QQ(2]2UO[QQ)2]2[]
]d2FD]o[]
U*Q*Q2o]
U*Q*oUOVW2UO	[U2[2J_	[]2FDho[]d2FDUo	[OQ*Q2o
[V�2oUOVZ2UO	[U2[2JW	Jj	Q,Q+Q.Q-]]d*]
]d*1FDoUO[QU2Q2J!	[]d2FDUo	[OQ*Q2o
[U
2oUOVZ2UO	[U2[2JW	Q/oSFDo
UO[[]U
2J!	P!)0r��,iԡi�i��i��l!l!l�~!l�!l�!l`!l!l'�!lz+lv|ol,GxiF�i��ri{�i����ij���ri8���ik���rsi���i���i���rrr�r�i����r~i����i����r�i����i�i���i���r�r�r�r�)�brianry)rB�items�roundrLrR�typer4r5r�r�r�)r8�	test_dict�offsetr�r�r�r��expectrrErJ�huge_n�
bad_exponentsrs&             r�
test_round�LongTest.test_round�s��8�Q�q�8�!�A�8�q��8�A�a�8��1�8�a��8��r�8��R�8�!"�2�8�'(��8�-/��8�46�r�8�;=�b�8�BD�R�8�IK�B�8���8��r�8�#%�b�"�R��B�8�	��D�#�r�*�F�!���)����A�H�b�)���8��� � ��/��
�
�d�3�i��-�	*�+�	
����t�R��$�/�����t�R��$�/�����s�B���.�����s�B���+�����s�B���+�����r�2���*�����q�"��q�)�����q�"��q�)�����r�2���*�����r�2���*�����r�2���,�����s�B���-�����s�B���-�����s�B���-�����s�B���-�����v�r�*�F�3�����v�r�*�F�3�����{�B�/��=�����{�B�/��=�����{�B�/��=�����{�B�/��=�����{�B�/��=�����{�B�/��=�����{�B�/��=�����{�B�/��=�����{�B�/��=�����{�C�0�+�>�����{�C�0�!�4�����{�C�0�!�4�����{�D�1�1�5��r�3��A���A�����+�C���U�V�^�F����S�)��M�M�$�s�)�S�)�	 ��q��A��3�Z���$�$�V�U�3���A�k��� � ��(��
�
�d�3�i��-�	 ���u�g�u�a��f�b�#�g�E�F����U�7�F�3�W�=�F��s��A�� � ���/�A���(�C����S�$��M�M�$�s�)�S�)�	�+�
��A����i���1�5�rc��`�Q,U1Qkko-]Qa]QaPQaQ-QaQ.QaQ/Qa]Qa]�Q	aQ0Q
aQ1Qa]�Q
aQQaQQaQ2QaQQaQ3QaQ4QaoUUQP	Q5-]Qa]QaPQaQ-QaQ.QaQ/Qa]Qa]�QaQ0QaQ1Q
a]�QaQQaQQaQ2QaQQaQ3QaQ4Q aoUUQ!P	Q5]Q]Q]Q]�Q]�QQQQQQQ"QQ#QQ$-
oUUQP
Q5]Q]Q]Q]�Q]�QQQQQQQQQ#QQ%-
oUUQ!P
Q5RO[QO]QP
Q5RO[QO]Q!P
Q5RO[]�O]QP	Q5RO[]�O]Q!P	Q5RO[Q/O]QP	Q5RO[Q/O]Q!P	Q5RO[PO]QP
Q5RO[PO]Q!P
Q5RO]O]Q2Q&2RO]O]QP	Q5Q&2RO]O]Q2Q'2RO]O]Q2Q(2ROPO]QP	Q5Q)2RO[]O]Q2RO[PO]QP	Q5RO[PO]Q!P	Q5Q*Q+[2oRO]O]UQ22Q2RO]O]UQ!22Q&2P!)5Fc�:�QQkoUO2FD�vqEROUO[U2VQ5U2[U2]6Xc1UQ6Xc*U%f"ROUO2U2ROUU[U2VQ5U2J�	P![c"o[QO
XAS22SgPo=hh9h[c!o[QO
S22SgPo=hh9h[c"o[QO
XAS22SgPo=hh9h)Fc�`�UQ6Xc
[U2oLUQ6Xc[[U22o[U1QkW22!)�littler�c3�^:�SF �DoRU]**	]�*w�	J	P!3h�r�r)r�rErs& �rr��SLongTest.test_to_bytes.<locals>.check.<locals>.equivalent_python.<locals>.<genexpr>�s ������1�a�1�Q�3�h�$�.�.��s�%-)rB�reversed�bytes)r�length�	byteorder�signed�ordersf&&& r�equivalent_python�@LongTest.test_to_bytes.<locals>.check.<locals>.equivalent_python�s;�����(�!�&�M�E��%�'�$�U�6�]�3�E��>��>�>�>r�r
z4failed to convert {} with byteorder={} and signed={}r��+failed to convert {} with default argumentszmCode equivalent from docs is not equivalent for conversion of {0} with byteorder byteorder={1} and signed={2}�F)r�rL�to_bytesr��	Exception�AssertionErrorr���testsr	r
rrr��errr8s&&&    �r�check�%LongTest.test_to_bytes.<locals>.check�s?���
?�#(�+�+�-���C��$�$��
�
�c�(�m�Y�
�N� �"��x�=�A�%�)�u�*<�V�4��(�(�����(�C�
O��$�$�)� �#�h�-��K� ��)#0��
!�C�(�N�����8�:�?B�C��C��%�4�,�I�#�V�D�\�+�03�4��4��!�O�(�%�%+�V�D�V�%D�F�LO�O��O�sY�,B6�+ C%�$D�6	C"�C"�C�C"�%	D�/D�0D�D�	D?�D?�D:�:D?��������������������������s�����������r�r��������������r�������rsss�����c��\sQsQsQsP!)�&LongTest.test_to_bytes.<locals>.SubStrisr�r�r�r�r�r�rrr�SubStrr:s���rr<r���r�����������������������)r�rrrLr�)r8r�tests1�tests2�tests3�tests4r<sf      r�
test_to_bytes�LongTest.test_to_bytes�so���%	O�P
�
�w�
�
�w�
�
��
�
�'�	
�

�'�
�
�+�

�
��
�
��
�
�+�
�
�+�
�
��
�
��
�
�;�
�
�O�
�
�?�
� 
�O�!
�"
�o�#
��&	�f�e�D�)�
�
�w�
�
�w�
�
��
�
�'�	
�

�'�
�
�+�

�
��
�
��
�
�+�
�
�+�
�
��
�
��
�
�;�
�
�K�
�
�?�
� 
�O�!
�"
�o�#
��&	�f�h�t�,�
�w�
�w����������;��;��;��?�
��	�f�e�E�*�
�w�
�w����������;��;��;��?�
��	�f�h�u�-����-�#����E�%��P����-�#����H�U��S����-�#����E�$��O����-�#����H�T��R����-�$���!�U�4��P����-�$���!�X�d��S����-�"����5���O����-�"����8�E��R����!���a��/��5����!���a��t��<�c�B����!���a��/�1H�I����!���a��/�1H�I����"���q�%���=�0�	2����-�!���q�%�@����-�"����5���N����-�"����8�D��Q�	�S�	����!���a����7��A����!���a���)9�:�C�@rc�
`�Q>U1Qkko-Q]aQ]aQ]aQ]aQ]aQPaQPaQ	Q?aQ
Q@aQQAaQ]aQ
]�aQQBaQQCaQ]�aQQaQQaQQDQQQQEQQF-AoUUQP	Q5-Q]aQ]aQ]aQ]aQPaQPaQ	Q?aQ
Q@aQQAaQ]aQ]�aQQBaQQCaQ]�aQQaQQaQ QDaQ!QQ"QEQ#QF-AoUUQ$P	Q5Q]Q]Q]Q]Q
]�Q]�QQQQQQQQQ%Q-oUUQP
Q5Q]Q]Q]Q]Q
]�Q]�QQQQQ QQQQ&Q-oUUQ$P
Q5Q'Q([2oRO[UOQQ22U2RO	UOQQ2]2RO[UOQQP
Q52U2RO	UOQQP
Q5]2RO[UOQQ$22U2RO	UOQQ$2]2RO[UOQQ$P
Q52U2RO	UOQQ$P
Q5]2RO	[O,QGNQP	Q5QE2RO	[OQGQP	Q5QE2RO	[O[Q2QP	Q5QE2RO	[O[Q2QP	Q5QE2RO	[O[OQ)Q2QP	Q5QE2RO	[O[Q2QP	Q5QE2RO[[OQ,Q2RO[[O],Q*2RO[[O],Q+2RO[[OPQ2RO[[OQ,Q2RO[[O]Q2RO[[O]QP	2RO[UOPQ2RO[UOQ,Q2RO[UO]Q2RO[[O]QP	2Q-Q.[2oUOQQ2oRO[U2U2RO	U]2Q/Q0[2o	U	OQQ2oRO[U2U	2RO	U]2RO	[UQ1Q22Q32Q4Q52o
Q6Q72oQ8Q92oQ:Q;2o
RO	[OU
22]2RO[[OU22RO[[OU22RO[[OU
22Q<Q=[2oRO	[OQUQ22]2RO	[OQUQ$22]2P!)HFc
�P:�QQkoUO2FD}vqERO[OVAUQ5U2UQ6Xc/U%f'RO[OU2U2ROUVAUQ5U2J	P![c"o[QO
XAS22SgPo=hh9h[c!o[QO
S22SgPo=hh9h[c"o[QO
XAS22SgPo=hh9h)Fc�$�UQ6Xc
[U2oLUQ6Xc[[U22o[Q[W222oU%c?U%c7UP*]�*%c!U]][	U2***oU!)rr�c3�P�SF �DvqV!]**w�	J	P!3hrr)r�rEr&s&  rr��ULongTest.test_from_bytes.<locals>.check.<locals>.equivalent_python.<locals>.<genexpr>�s��-F���-F�T�Q��q�S���-F�s�&)rVr�sum�	enumerater�)�
byte_arrayr	r
�little_orderedrs&&&  rr�BLongTest.test_from_bytes.<locals>.check.<locals>.equivalent_pythonzsr����(�%)�*�%5�N��%�'�%)�(�:�*>�%?�N��G�Y�~�-F�G�G���n�.��2D�t�2K�2K���a��N� 3�3�3�3�A��rrz6failed to convert {} with byteorder={!r} and signed={}r�rzeCode equivalent from docs is not equivalent for conversion of {0} with byteorder={1!r} and signed={2}r)r�rLr4�
from_bytesrrr�rs&&&    �rr�'LongTest.test_from_bytes.<locals>.checkys-���

�#(�+�+�-���C��$�$����t�v��F� �"���%�f�4��(�(��N�N�4�0�$�&�	C��$�$�)�$�&�I� ��-#0��
!�C�(�P�����8�:�?B�C��C��%�4�,�I�#�V�D�\�+�03�4��4��!�C�(�P�����8�:�@C�C��C�sY�'B�%C�<C9�	C�&C�'C�C�	C6�C6�C1�1C6�9	D%�D%�D � D%rrsrr0rr6rrrrr r!r#r"r$r%r'r&r5r(r*r)r,r+r-r�rr.r/r1r2r3r4rr7r8c��\sQsQsQsP!)�'LongTest.test_from_bytes.<locals>.myinti�rr;rrr�myintrX�r=rrY�Bzbigzlittle�c�(`�\sQsQsnQsQsUsP!)�(LongTest.test_from_bytes.<locals>.myint2ic�<�[OV]*2!rt)r4�__new__)�clsr�s&&rr_�0LongTest.test_from_bytes.<locals>.myint2.__new__s���{�{�3��	�2�2rr�r�r�r�r�r_r�r�r�s@r�myint2r]s����
3�
3rrcc�(`�\sQsQsnQsQsUsP!)�(LongTest.test_from_bytes.<locals>.myint3i&c��QUmP!)�bar��foo)r8r�s&&rr)�1LongTest.test_from_bytes.<locals>.myint3.__init__'s	�� ��rrh)r�r�r�r�r)r�r�r�s@r�myint3re&s����
!�
!rrkri�nonergc�(`�\sQsQsnQsQsUsP!)�,LongTest.test_from_bytes.<locals>.ValidBytesi/c��Q!)rrr�s&r�	__bytes__�6LongTest.test_from_bytes.<locals>.ValidBytes.__bytes__0s��rr�r�r�r�r�rpr�r�r�s@r�
ValidBytesrn/s����
�
rrsc�(`�\sQsQsnQsQsUsP!)�.LongTest.test_from_bytes.<locals>.InvalidBytesi2c��Q!)�abcrr�s&rrp�8LongTest.test_from_bytes.<locals>.InvalidBytes.__bytes__3s��rrrrr�s@r�InvalidBytesru2s����
�
rryc��\sQsQsQsP!)�.LongTest.test_from_bytes.<locals>.MissingBytesi5rr;rrr�MissingBytesr{5s��Crr|c�(`�\sQsQsnQsQsUsP!)�.LongTest.test_from_bytes.<locals>.RaisingBytesi6c��]]*P!rtrr�s&rrp�8LongTest.test_from_bytes.<locals>.RaisingBytes.__bytes__7s���A��rrrrr�s@r�RaisingBytesr~6s����
�
rr�c��\sQsQsQsP!)�(LongTest.test_from_bytes.<locals>.SubStri@rr;rrrr<r�@r=rr<rr>r�r?r@rArBrCrD)�rr)r4rRr�rUrL�	bytearray�array�
memoryviewr�r�r��getattrrr�)r8rrErFrGrHrYrcrErkrsryr|r�r<sf              r�test_from_bytes�LongTest.test_from_bytesxsF���+	C�\
���
��Q�
�
��
�
�Q�	
�

��
�
�R�

�
��
�
�T�
�
�T�
�
��
�
�S�
�
��
�
��
�
��
�
��
� 
��!
�"
��#
�$
���U��V��X�+
��.	�f�e�D�)�
���
��Q�
�
��
�
�Q�	
�

�R�
�
��

�
�T�
�
�T�
�
��
�
�S�
�
��
�
��
�
��
�
��
�
��
� 
��!
�"
��#
�$
�U��V��X�)
��,	�f�h�t�,�
���Q��Q��S��S��S����������U�
��	�f�e�E�*�
���Q��Q��S��S��S����������U�
��	�f�h�u�-�	�C�	�	
�
�
�d�5�+�+�G�U�;�<�e�D�����)�)�'�5�9�1�=��
�
���!�!�'�5��!�?�@�%�	I�����)�)�'�5��)�G��K��
�
�d�5�+�+�G�X�>�?��G�����)�)�'�8�<�a�@��
�
�d�5�+�+��X�e�,�-�.�/4�	6�����)�)�'�8�E�)�J�A�N�����N�N�;��d�N�;�V�	E�����N�N�;��d�N�;�V�	E��������o�&��d�(�<�=C�	E��������o�&��d�(�<�=C�	E��������K�K��_�-�u�T�(�C�DJ�	L���������'��t�(�=�>D�	F����*�c�n�n�s�e�U�C����*�c�n�n�q�c�9�E����*�c�n�n�q�c�<�H����)�S�^�^�R��?����)�S�^�^�V�U�C����)�S�^�^�Q��>����)�S�^�^�Q��t�D����)�U�%5�%5�r�5�A����)�U�%5�%5�v�u�E����)�U�%5�%5�q�%�@����)�S�^�^�Q��t�D�	3�S�	3�
���g�u�-���
�
�d�1�g�v�&�����A��	!�S�	!�
���g�u�-���
�
�d�1�g�v�&�����A�������E�6�2�E�:�	�	�	�	�	 ��	�	�	
������
��5�q�9����)�S�^�^�\�^�D����)�S�^�^�\�^�D����+�S�^�^�\�^�L�	�S�	��������V�E�]�;�Q�?����������1A�B�A�Frc	��[QQ2FD=oUO]P	Q5oUO[O	UP	Q5U2J?	P!)r�r�rr�)rBrrRr4rU)r8rEr&s&  r�test_from_bytes_small�LongTest.test_from_bytes_smallEsA���r�3��A��
�
�1�T�
�*�A��M�M�#�.�.��4�.�8�!�<� rc���UOPO22UO]O22UO]O22P!rt)r7�
is_integerr�s&r�test_is_integer�LongTest.test_is_integerLs;��������)�*�������(�)�������(�)rc���QQ[2o[Q2Tt,tFD
p!]2MJ	oo[[U2FDoUOU]2J	P!ttoh)c�,`�\sQsQsnQQksQsUsP!)�<LongTest.test_access_to_nonexistent_digit_0.<locals>.IntegeriUc�@�[OV2oQUmU!rh)r4r_ri)r`r�r8s&& rr_�DLongTest.test_access_to_nonexistent_digit_0.<locals>.Integer.__new__Vs���{�{�3�.�� ����rrhr1rbr�s@r�Integerr�Us����
�
rr�r)r4rB�maprL)r8r�rE�integersrs&    r�"test_access_to_nonexistent_digit_0�+LongTest.test_access_to_nonexistent_digit_0QsR��	�c�	�).�d��4��1�G�A�J���4��S�(�#�A����Q��"�$��5s�Ac
���QFDWoQFDMoUO[V*2[2UO[V*	2[2JO	JY	P!)T)TF)rr)rLr�r4)r8r�rs&  r�test_shift_bool�LongTest.test_shift_bool_sD��"�E���� � ��e�n�!5�s�;�� � ��e�n�!5�s�;� �#rc
�`�QQ[2o]
]Q][O]*P	P
U]*2,oSFDqoUO2vqEUO	VE1[U2]12UO	[U2[2UO	[U2[2Js	P!)c��\sQsQsQsP!)�-LongTest.test_as_integer_ratio.<locals>.myintigrr;rrrrYr�gr=rrYr�)r4r	rF�as_integer_ratiorLr�)r8rYrr��	numerator�denominators&     r�test_as_integer_ratio�LongTest.test_as_integer_ratiofs���	�C�	��Q��Q����a���u�e�B�i�H���E�%*�%;�%;�%=�"�I����i�5��E�
�A��G����T�)�_�c�2����T�+�.��4�	rc�D�[]Q2FDyo]U*]*
oUOVQ59^tt^2UOU]*]]U**]U]***
]*2PPP2J{	P!)%fhJ�9h)r�)�bitlenr)rBrMrL)r8r�rs&  r�test_square�LongTest.test_squarepsy��
�A�s�m�F��f���!�A����V��1�1�� � ��A���1�v�:�&�1��!��+<�=��A�C�2�1�$�1�1�1�s�AB	�B
�B
c
��UO[O[OO
2QQQ[]*
]1][*
]1[]1[']1[[*]*
]1[[*]1,	oSFDqvq#UOU29^tt^2UOUO2[O[OU**2PPP2Js	QQ[2oUOUO[OO
2SFDovq#UOU29^tt^2UOUU2O2UOUOU**2PPP2Jq	[O]2P!)%fhCJW9h)%fhJ�9h)rc��\sQsQsQsP!)�'LongTest.test___sizeof__.<locals>.MyInti�rr;rrr�MyIntr��r=rr�)rr)rr)rr)rLr4�__itemsize__r	�int_info�sizeof_digitr�rM�
__sizeof__�
__basicsize__�object)r8r�r�r9r�s&    r�test___sizeof__�LongTest.test___sizeof__|s}������)�)�3�<�<�+D�+D�E�
���
�!�V�Q�K�
�t�V�Q�K�
�1�I��U�A�J�
�$�Y��]�A��
�$�Y��N�
��*�N�E����e�$�$�� � ��$�$�&��%�%��(8�(8�7�(B�B��%�$�*�	�C�	�	
����+�+�S�\�\�-F�-F�G�)�N�E����e�$�$�� � ��%�L�+�+�-��'�'�%�*<�*<�w�*F�F��%�$�*�	���!��)%�$�$��%�$�$�s&�6AG	�1A	G2	�G/
�&G/
�2H
�;H
c���UO[P2Q2UO[]2]2UO[]
2]
2UO[[OO]*
2[OO]*
2UO[[OO]*
2[OO]*
2UO[[OO2]2UO[[OO]*2]2UO[[OO']*
2Q2UO[[OO']*
2Q2UO[[OO'2]2UO[[OO']*2[OO']*2P!)rr)rL�hashr	�	hash_info�modulusr�s&r�	test_hash�LongTest.test_hash�s�������b��2�&�����a��!�$�����b��2�&�����c�m�m�3�3�a�7�8�#�-�-�:O�:O�RS�:S�T�����c�m�m�3�3�a�7�8�#�-�-�:O�:O�RS�:S�T�����c�m�m�3�3�4�a�8�����c�m�m�3�3�a�7�8�!�<�����s�}�}�4�4�4�q�8�9�2�>�����s�}�}�4�4�4�q�8�9�2�>�����s�}�}�4�4�4�5�q�9�����s�}�}�4�4�4�q�8�9�C�M�M�<Q�<Q�;Q�TU�;U�Vrrl)T)Cr�r�r�r�r?rFrSr]rdrirmrqrvr�r�r�r�r�r�r�requires_IEEE_754r��
bigmemtestrrrrLrSrxr{r�r�r�r�r�r�r��cpython_onlyr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rIr�r�r�r�r�r�r�r�r�r�r�r�s@rr.r.ss������0�
C�#>�N+�.+�6+�/�
S�>�1�'�6M�r6�0�"
���C0��C0�J
�������c�*�3�+��3�8�>;�$Z*�x
�������c�*�.%�+��.%�`_D�B9�
&� H�D%�&L�<
���Y'��Y'�v��
���4��4�
�������c�*�'�+��'�4�
�������c�*�3�+��3�:� 
A�0�0�0�1�
��� �� �
���%��%� 
������0 �$ 7�D	C�H6�THA�TKG�Z
���=��=�*�
#�<�5�
C�'�RW�Wrr.�__main__)#�unittestrrr	r5rr�r��bits_per_digitr3r�rDrXrWrurhrBrErYr
r!r�rr��min_expr"rr#r r
r,�TestCaser.r��mainrgs0r�<module>r�sb����
�
���	���#�#���E�z���a�x����
�	�
�a��D�$�!�)�%7�9K�
L����	�q��w��A��N�N�2��6��	�q��B�
���� ��1�B�� ��#8��1�B��#8�8�8��

�.�.�
�
���n�n�$�$���n�n�$�$���~�~�&�&���k�>�A��l�(B�Q�(F�$G�G��*'�\+�<@W�x� � �@W�D2�z���M�M�O���q4!��#8s�
E9�)
E>

Youez - 2016 - github.com/yon3zu
LinuXploit