Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.142.252.147
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_cmath.pyo
�
?��cc@sddlmZmZddlmZmZddlZddlZddlZddlm	Z	m
Z
mZmZe
d�Ze
d�ZgddgD](ZddgD]Zeee�^q�q�Zgedfed	feefd	efdefdefd
efeefed	fedfedfed
feefd
efdefdefd	efeefed
fedfgD]\ZZeee�^q�Zgeefed
fedfedfed	feefeefd
efdefdefd	efeefgD]\ZZeee�^q"Zdejfd��YZd
�Zedkr{e�ndS(i����(trun_unittesttcpython_only(tparse_testfilet	test_fileN(tphasetpolartrecttpitinftnangg�gffffff@gffffff�t
CMathTestscBs"eZgdddddddddd	d
ddd
ddgD]Zeee�^q=Zejd��ejd��d�Zd�Zddd%d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zed��Zd�Zd �Zd!�Zd"�Zd#�Zd$�ZRS(&tacostacoshtasintasinhtatantatanhtcostcoshtexptlogtlog10tsintsinhtsqrtttanttanhcCstj|d�S(Ng�@yy�@(tcmathR(tx((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt<lambda>7tcCstjd|�S(Ng,@y;@y,@;�(RR(R((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR8RcCstt�|_dS(N(topenRttest_values(tself((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pytsetUp:scCs|jj�dS(N(R tclose(R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttearDown=sgV瞯�<g
cCsGtj|�rAtj|�r"dS|j|p:dj|��ntj|�r�||kr`dS|j|p{dj||��n|r�|r�tjd|�tjd|�kr�|j|p�dj||��q�nyt||�}Wntk
rn$X|t||t|��kr$dS|j|p?dj||��dS(s�Fail if the two floating-point numbers are not almost equal.

        Determine whether floating-point values a and b are equal to within
        a (small) rounding error.  The default values for rel_err and
        abs_err are chosen to be suitable for platforms where a float is
        represented by an IEEE 754 double.  They allow an error of between
        9 and 19 ulps.
        Ns{!r} should be nans>finite result where infinity expected: expected {!r}, got {!r}g�?s,zero has wrong sign: expected {!r}, got {!r}s({!r} and {!r} are not sufficiently close(	tmathtisnantfailtformattisinftcopysigntabst
OverflowErrortmax(R!tatbtrel_errtabs_errtmsgtabsolute_error((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pytrAssertAlmostEqual@s*$
c	Csld}d}|jtj|ddddjtj|��|jtj|ddddjtj|��dS(NgiW�
�@g-DT�!	@tplacesi	R2scmath.pi is {}; should be {}scmath.e is {}; should be {}(tassertAlmostEqualRRR(te(R!t
e_expectedtpi_expected((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttest_constantsrscs�d"�d�dddddt�tg}dtfd	��Y}d
d#d��Y}dtfd
��Y�dtf�fd��Y}dd$�fd��Y}dtfd��Y}dd%d��Y}dtfd��Y}dd&d��Y}	dtf��fd��Y}
dd'��fd��Y}dtf�fd��Y}d d(�fd!��Y}
x�|jD]�}|j||���|���|j||���|���|j||
��|���|j||��|���|j||��|���|j||
��|���|jt||��|jt||��|jt||��|jt||	��x@|D]8}|jt|||��|jt|||��q�W|j�||��|j�||��qjWdS()Ng��z�@y7Ă?�?g]�ֆ�snot complexilg@t	MyComplexcBseZd�Zd�ZRS(cSs
||_dS(N(tvalue(R!R<((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt__init__�scSs|jS(N(R<(R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt__complex__�s(t__name__t
__module__R=R>(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR;�s	tMyComplexOScBseZd�Zd�ZRS(cSs
||_dS(N(R<(R!R<((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR=�scSs|jS(N(R<(R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR>�s(R?R@R=R>(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRA�s	t
SomeExceptioncBseZRS((R?R@(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRB�stMyComplexExceptioncseZ�fd�ZRS(cs
��dS(N((R!(RB(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR>�s(R?R@R>((RB(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRC�stMyComplexExceptionOScseZ�fd�ZRS(cs
��dS(N((R!(RB(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR>�s(R?R@R>((RB(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRD�stNeitherComplexNorFloatcBseZRS((R?R@(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRE�stNeitherComplexNorFloatOScBseZRS((R?R@(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRF�stMyIntcBs#eZd�Zd�Zd�ZRS(cSsdS(Ni((R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt__int__�RcSsdS(Nl((R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt__long__�RcSsdS(Ni((R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt	__index__�R(R?R@RHRIRJ(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRG�s		tMyIntOScBs#eZd�Zd�Zd�ZRS(cSsdS(Ni((R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRH�RcSsdS(Nl((R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRI�RcSsdS(Ni((R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRJ�R(R?R@RHRIRJ(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRK�s		tFloatAndComplexcs&eZ�fd�Z�fd�ZRS(cs�S(N((R!(tflt_arg(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt	__float__�scs�S(N((R!(tcx_arg(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR>�s(R?R@RNR>((RORM(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRL�stFloatAndComplexOScs&eZ�fd�Z�fd�ZRS(cs�S(N((R!(RM(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRN�scs�S(N((R!(RO(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR>�s(R?R@RNR>((RORM(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRP�st	JustFloatcseZ�fd�ZRS(cs�S(N((R!(RM(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRN�s(R?R@RN((RM(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRQ�stJustFloatOScseZ�fd�ZRS(cs�S(N((R!(RM(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRN�s(R?R@RN((RM(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyRR�sy��z�@7��?(((((((tNonetobjecttNotImplementedt	Exceptionttest_functionstassertEqualtassertRaisest	TypeError(R!t
non_complexesR;RARCRDRERFRGRKRLRPRQRRtftbad_complex((RBRORMs6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttest_user_objectzsB""
cCs�xM|jD]B}x9dddgD](}|j||�||j���q Wq
WxD|jD]9}x0dddddgD]}|jt||�qvWqZWdS(	Nilg@R.tlong_stringt0t1jR(RWRXRNRYRZ(R!R\targ((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttest_input_type�s*cCs�ddddddg}|g|D]
}|^q"ddd	g}|dgg|D]}d|^qT}dg|}dg|g|D]
}|^q�}i
|d
6|d6|d6|d
6|d6|d6|d6|d6|d6|d6|d6|d6|d6}x�|j�D]s\}}	tt|�}
tt|�}xF|	D]>}||�}
|j|
|�|
j�|jd|
j�q<WqWxldddgD][}xR|D]J}tj||�}
|jtj||�|
j�|jd|
j�q�Wq�WdS(Ng{�G�z�?g�������?g�������?g�?g�������?g�G�z��?gg�?g�RR
RRRRRRRRRRRg@g$@(	titemstgetattrR%RR4trealRXtimagR(R!R Rt
unit_intervaltpositivetnonnegativet	real_lineRWtfntvaluestfloat_fnt
complex_fntvtztbase((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttest_cmath_matches_math�s@(
%


c
Cs�tjd�jd�s(|jd�nd�}d�}xUtt�D]G\}}}}}}}	t||�}
t||�}|dkr�|}n$|dkr�|}ntt|�}d|	ks�d	|	kry||
�}
Wnt	k
r�qGqX|j
d
j||||��nd|	kroy||
�}
Wntk
rLqGqoX|j
dj||||��n||
�}
d
|	kr�tt
|
j�|
j�}
tt
|j�|j�}nd|	krt|
jt
|
j��}
t|jt
|j��}n|dkrd}nd}dj|||||j|j|
j|
j�}|j|j|
jd|d|�|j|j|
jd|�qGWdS(NtdoubletIEEEsneeds IEEE doublecSstj|j|j�S(saWrapped version of rect that accepts a complex number instead of
            two float arguments.(RRRfRg(Rq((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pytrect_complexscSstt|��S(sYWrapped version of polar that returns a complex number instead of
            two floats.(tcomplexR(Rq((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt
polar_complex$sRRsdivide-by-zerotinvalids9ValueError not raised in test {}: {}(complex({!r}, {!r}))toverflows<OverflowError not raised in test {}: {}(complex({!r}, {!r}))signore-real-signsignore-imag-signRRgV瞯�<g
s�{}: {}(complex({!r}, {!r}))
Expected: complex({!r}, {!r})
Received: complex({!r}, {!r})
Received value insufficiently close to expected value.R1R2(RR(tfloatt
__getformat__t
startswithtskipTestRRRwReRt
ValueErrorR'R(R,R+RfRgR4(R!RvRxtidRltartaiterteitflagsRbtexpectedtfunctiontactualtreal_abs_errt
error_message((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttest_specific_valuessZ		(		

	csX��fd�}|dd�|dd�|ddtf�|ddtdf�|d	d
tdf�td�}|t|d�|df�|t|d�|tf�|td|�|tdf�|td
|�|tdf�|t||�|tdf�|t||�|tdf�|t||�|dtdf�|t||�|dtdf�td�}|t|d�||f�|td|�||f�|t||�||f�|t||�||f�|t||�||f�|t||�||f�|t||�||f�dS(Ncs@�|�}x-t||�D]\}}�j||�qWdS(N(tzipR4(RbR�tgotR7tg(tfuncR!(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pytcheckcsigig�?i����y�?iy�g@Riiii����R	(gg(g�?g(RR{Rw(R!R�R�RR	((R�R!s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pytcheck_polarbs.

 " "%&cCs|jt�dS(N(R�R(R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt
test_polar~scs0ddlm��fd�}|j|�dS(Ni����(t	set_errnocs*�d�zt|�SWd�d�XdS(Nii(R(Rq(R�(s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pytpolar_with_errno_set�s
(t	_testcapiR�R�(R!R�((R�s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttest_polar_errno�scCs|jtd�d�|jtd�d�|jtd�t�|jtd�t�|jtd�t�|jtd�td�|jtd�td�|jttdd��d�|jttdd	��d	�|jttd	d��t�|jttd	d	��t�|jtttd	��t�|jtttd
��t�|jtttt��dt�|jttd
t��td�|jttd	t��td�|jttdt��td�|jttdt��td�|jtttt��td
�|jtttd
��d	�|jtttd	��d	�|jtttd��d�|jtttd��d�|jtttt��td
�|jttdt��td�|jttdt��td�|jttd	t��td�|jttd
t��td�|jtttt��dt�|jtttd��t�|jtttd��t�x*tD]"}|jtj	t|���q�WdS(Nigg�?g�yY��n�y�?iy�g�gffffff�g�gffffff@ig�?y�Y��n�y�Y��n��(
R6RRRXRwtINFtcomplex_nanst
assertTrueR%R&(R!Rq((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt
test_phase�sB !!%%%%%%#####$  
cCsTx$tD]}|jt|�d�qWx$tD]}|jt|�t�q.W|jtttt��t�|jtj	tttd����|jtj	tttd����|jtj	tttd����|jtj	tttd����|jtttt��t�|jtttt��t�|jtj	ttdt����|jtj	ttdt����|jtj	ttdt����|jtj	ttdt����|jtttt��t�|jtj	tttt����t
jd�jd�rP|j
tttdd��ndS(Nggffffff�g�gffffff@RtRug��U���(t
complex_zerosRXR+tcomplex_infinitiesR�RwtNANR�R%R&R{R|R}RYR,(R!Rq((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyttest_abs�s&

 %%%% %%%%%cCsZd}t|j|d�|ks@t|j|d�|krV|j||f�ndS(NgH�����z>ii(R+RfRgR'(R!R.R/teps((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pytassertCEqual�s:cCs�|jtdd�d�|jtdd�d�|jtdt�d�|jtdtd�d	�|jtdtd�d
�dS(Niig�?g�i(ii(g�?i(g�i(ig�?(ig�(R�RR(R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt	test_rect�s
cCs�|jtjd��|jtjd��|jtjt��|jtjt��|jtjttd���|jtjtdt���|jtjttt���|jtjttt���|jtjttt���dS(Niy�?i(tassertFalseRR&R�R�R�Rw(R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt
test_isnan�scCs�|jtjd��|jtjd��|jtjt��|jtjt��|jtjttd���|jtjtdt���|jtjttt���|jtjttt���|jtjttt���dS(Niy�?i(R�RR)R�R�R�Rw(R!((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt
test_isinf�sN(R?R@tfnameReRRWtappendR"R$RSR4R:R^RcRsR�R�R�RR�R�R�R�R�R�R�(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyR
0s0(		1		e		0	G			)				cCstt�dS(N(RR
(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt	test_main�st__main__(ttest.test_supportRRttest.test_mathRRtunittestRR%RRRRR{R�R�RtyRwR�R�R�tTestCaseR
R�R?(((s6/usr/local/python-2.7/lib/python2.7/test/test_cmath.pyt<module>s\";							









	.
					
				.��	
© 2025 GrazzMean