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: 18.188.23.45
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_complex.cpython-310.pyc
o

`b��@s�ddlZddlZddlmZddlmZmZddlmZddlm	Z	m
Z
mZddlZe
d�Ze
d�ZdZGd	d
�d
ej�ZedkrGe��dSdS)�N)�support)�VALID_UNDERSCORE_LITERALS�INVALID_UNDERSCORE_LITERALS)�random)�atan2�isnan�copysign�inf�nan))��?�?�)r�)rr)��?r)�rc@s<eZdZdd�ZdEdd�Zdd�ZdEdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zejd*d+��Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zejd4d5��Zd6d7�Zd8d9�Z ejd:d;��Z!ejd<d=��Z"ejd>d?��Z#ejd@dA��Z$dBdC�Z%dDS)F�ComplexTestcCs�t|t�r4t|t�r tj�||j|j�tj�||j|j�dStj�||j|�tj�||jd�dSt|t�rMtj�|||j�tj�|d|j�dStj�|||�dS)Nr
)�
isinstance�complex�unittest�TestCase�assertAlmostEqual�real�imag��self�a�b�r�:/usr/local/python-3.10/lib/python3.10/test/test_complex.pyrs


zComplexTest.assertAlmostEqual��&�.>cCs`t|�t|�kr
||}}|dkrt|�|kS|dkr!t|�|kS|�t|||�|k�dS)z+Return true iff floats x and y "are close".rN)�abs�
assertTrue�r�x�yZepsrrr�assertCloseAbs(s
zComplexTest.assertCloseAbscCstd}t|�s
t|�rt|�rt|�rdSn||kr/|dkrdStd|�td|�kr+dS|d7}|�|�||��dS)a#assert that floats x and y are identical, in the sense that:
        (1) both x and y are nans, or
        (2) both x and y are infinities, with the same sign, or
        (3) both x and y are zeros, with the same sign, or
        (4) x and y are both finite and nonzero, and x == y

        z&floats {!r} and {!r} are not identicalNr
rz: zeros have different signs)rr�fail�format)rr"r#�msgrrr�assertFloatsAreIdentical4s�z$ComplexTest.assertFloatsAreIdenticalcCs(|�|j|j|�|�|j|j|�dS)z.Return true iff complexes x and y "are close".N)r$rrr!rrr�assertCloseKszComplexTest.assertClosecCst||}|dkr||}|�||�|�|�}|�||�|dkr8||}|�||�|�|�}|�||�dSdS)z8Compute complex z=x*y, and check that z/x==y and z/y==x.rN)r)�__truediv__)rr"r#�z�qrrr�	check_divPs

�zComplexTest.check_divcsdd�tdd�D���fdd��D�}|D]
}|D]}|�||�qq|�tdd�d�|�tdd�d�td	�D]}|�tt�t��tt�t���q9|�t�d
d�d�d
tftd
fttffD]\}}td
d
�t||�}|�t|j	��|�t|j
��qadS)NcSsg|]}t|��qSr)�float)�.0�irrr�
<listcomp>_sz,ComplexTest.test_truediv.<locals>.<listcomp>����cs g|]}�D]}t||��qqSr)r�r/r"r#�Zsimple_realrrr1`s gZb���ti��?�N�~h�d�@ry�?�r)�ranger-rrrr*�NANr rrr)rZsimple_complexr"r#r0Z
denom_realZ
denom_imagr+rr5r�test_truediv^s$���zComplexTest.test_truedivc	CsDtD]\}}|�t��||Wd�n1swYqdS�N)�
ZERO_DIVISION�assertRaises�ZeroDivisionErrorrrrr�test_truediv_zero_divisionv�
���z&ComplexTest.test_truediv_zero_divisioncCs|�t��ddWd�n1swY|�t��ddWd�n1s-wY|�t��ddWd�n1sFwY|�t��ddWd�n1s_wY|�t��
ddWd�dS1sywYdS�Nrr6rr�r?�	TypeError�rrrr�
test_floordiv{s
�
�
�
�
"�zComplexTest.test_floordivc	CsDtD]\}}|�t��||Wd�n1swYqdSr=�r>r?rErrrr�test_floordiv_zero_division�rBz'ComplexTest.test_floordiv_zero_divisioncCs�|�t�ddd>�d�|�t�dd�t�|�t�dd�d�|�t�dd�d�|�t�dd�d�|�t�dd�d�tdd�D]8}|d}|�t�|d	|�d�|�t�|d	|�d�|�t�t||�|�d�|�t�t||�|�d�qC|�t�dd�t�|�t�dd�t�|�t�dd�t�|�t�	dd�t�|�
ttj
dd�|�
ttjdd�|�
ttjdd�|�
ttjdd�|�t�dd�d�|�t�dd�d�|�t�dd�d�|�t�dd�d�dS)
Nrri'FTy@@r8gY@r)�assertIsr�__eq__�__lt__�NotImplemented�__ne__r:�__le__�__gt__�__ge__r?rE�operator�lt�le�gt�ge�eq�ne)rr0�frrr�test_richcompare�s0zComplexTest.test_richcomparecs�d�fdd�	}tdd�D])}d|}d|�|d|tdd��fd	d
��|d|tdd�dd
�t|��q|dtd
d�dd
��dS)Nr
csR|D]$}||}t||�}��t�||�||����t�||�||��qdSr=)rrJrKrN)�nZdeltasZis_equalr�deltar0r+rFrr�check�s
�z6ComplexTest.test_richcompare_boundaries.<locals>.checkr�
�4��ecs|�dkS)Nrr�r\)�multrr�<lambda>��z9ComplexTest.test_richcompare_boundaries.<locals>.<lambda>cS�dS)NFrrbrrrrd��li����rcSrf)NTrrbrrrrd�rg)r
)r:r.)rr]r0�powr)rcrr�test_richcompare_boundaries�s	"z'ComplexTest.test_richcompare_boundariescCs|�t��ddWd�n1swY|�t��ddWd�n1s-wY|�t��ddWd�n1sFwY|�t��ddWd�n1s_wY|�t��
ddWd�dS1sywYdSrCrDrFrrr�test_mod�s
�
�
�
�
"�zComplexTest.test_modc	CsDtD]\}}|�t��||Wd�n1swYqdSr=rHrrrr�test_mod_zero_division�rBz"ComplexTest.test_mod_zero_divisioncCsT|�ttdd�|�ttdd�|�ttdd�|�ttdd�|�ttdd�dSrC)r?rE�divmodrFrrr�test_divmod�s
zComplexTest.test_divmodcCs"tD]\}}|�tt||�qdSr=)r>r?rErlrrrr�test_divmod_zero_division�s�z%ComplexTest.test_divmod_zero_divisioncCs2|�tdd�d�|�tdd�d�|�ttdd�|�tdd�d�|�tdd	�d
�|�ttddd�|�ttdd�d}|�|dd
�|�|ddd
�|�d
d
�|�d
d
�zd|Wn	tylYnw|�d�zddWn	ty�Ynw|�d�|�|d|d�|�|d|d�|�|d|d�|�d
d
�d}|�tt||d�tj	tj	d
tj	d
tj	tj	d
tj	d
f}|D]E}|D]@}|j
||d��.t||�}z||Wn	ty�Ynwz||Wn
t�yYnwWd�n	1�swYq�q�dS)Nrrrr9r
��?���y���ryZb���ti�?y�p=
ף
@���Q�@r6z,should fail 0.0 to negative or complex powery@��ii�������yffffff@ffffff@r�rr)rrhr?r@�
ValueError�
OverflowError�assertEqualr%�sys�maxsize�subTestr)rrr�valuesrr�crrr�test_pow�sh�
�
�
�������zComplexTest.test_powcCstdd�tdd�tdt�ttd�g}gd�}|D]l}|D]g}|j||d��Vz||}Wnty7d	}Ynwz|t|�}WntyKd	}Ynwz|t|�}Wnty_d	}Ynw|�t|�t|��|�t|�t|��Wd�n1s~wYqqdS)
Ng@g(@g\�n��Tg;%_��n�Tg�r
)i��r2������rprrr`���)�value�exponentZoverflow)r�INFrzrvr.rw�str)rr{Z	exponentsr�r�Zint_powZ	float_powZcomplex_powrrr�%test_pow_with_small_integer_exponentss<��������z1ComplexTest.test_pow_with_small_integer_exponentscCs@td�D]}|�tt�dt�d��q|�tdd��dS)Nr8g���ư>r
)r:r rr)rr0rrr�test_boolcontext,szComplexTest.test_boolcontextcCs|�tdd���d�dS)Ng333333@g������#@y333333@������#�)r)r�	conjugaterFrrr�test_conjugate1szComplexTest.test_conjugatecs0Gdd�d�}Gdd�dt�}|�t|d��d�|�t|d��d�|�tt|d��|�tt|d��|�tti�|�tt|d��|�tt|d��|�td�d�|�td	�d
�|�td�d
�|�td	�d
�|�td
�d
�|�tdd	�d�|�tdd	�d�|�tdd�d�|�tdd	�d�|�tdd	�d�|�tdd�d�|�tdd	�d�|�tdd	�d�|�tdd�d�|�td
�d
�|�td�d
�|�td�d�|�td�d�|�td
d�d
�|�tdd�d
�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�td�d�|�td�d�|�t�d�|�td�d�|�td�d�|�td�d�|�td�d �|�td!�d"�|�td#�d$�|�td%�d&�|�td'�d"�|�td(�d�|�td)�d�|�td*�d�|�td+�d,�|�td-�d�|�td.�d�|�td/�d�Gd0d1�d1t�}|�t|d2��d2�|�td3d4d5�d6�|�td6d7�d6�|�td6d4d5�d8�|�tdd9d5�d:�d;d<�}|�|tdd�j�|d��|�|tdd=�j�|d=��|�|tdd�j�|d��|�|td=d�j�|d=��d"}|�t|�|u�~|�ttdd�|�ttdd�|�t	td>�|�tt
d?�|�tt
d?�|�ttd?�|�t	td@�|�ttd�|�tdAtd�|�t	tdB�|�t	tdC�|�ttddD�|�ttddE�|�ttddD�|�t	tdF�|�t	tdG�|�t	tdH�|�t	tdI�|�t	tdJ�|�t	tdK�|�t	tdL�|�t	tdM�|�t	tdN�|�t	tdO�|�t	tdP�|�t	tdQ�|�tdRtddSid�|�tdTtdddSi�|�t	tdU�|�t	tdV�|�t	tdW�|�t
tdX��t�|�tdY�d2�|�t	tdZ�Gd[d\�d\t��G�fd]d^�d^�}|��t|��Gd_d`�d`�}|�t|da��dE�|�t|db�|dc�d5�d6�|�tt|d��Gddde�de�}|�t|dE��df�|�tdg|dE��dh�|�tt|dSdi��|�ttdg|dSdi��Gdjdk�dk�}	|�tt|	��|�ttdg|	��Gdldm�dmt�}
Gdndo�dot�}Gdpd1�d1t�}|�t|
d��dq�|�t��|�t|d��dr�Wd�n	1�swY|�tt|d��dS)sNc@�eZdZdd�Zdd�ZdS)z(ComplexTest.test_constructor.<locals>.OScS�
||_dSr=�r��rr�rrr�__init__6�
z1ComplexTest.test_constructor.<locals>.OS.__init__cS�|jSr=r�rFrrr�__complex__7�z4ComplexTest.test_constructor.<locals>.OS.__complex__N��__name__�
__module__�__qualname__r�r�rrrr�OS5�r�c@r�)z(ComplexTest.test_constructor.<locals>.NScSr�r=r�r�rrrr�9r�z1ComplexTest.test_constructor.<locals>.NS.__init__cSr�r=r�rFrrrr�:r�z4ComplexTest.test_constructor.<locals>.NS.__complex__Nr�rrrr�NS8r�r�y�?$@g�?rz1+10jr^y$@g$@ry��Q�	@g��Q�	@i:y�s@rr
ry��Q�	@y��Q�	��1r6�1jroz-1rpz+1z(1+2j)��?@z
(1.3+2.2j)y�������?������@z3.14+1Jy��Q�	@�?z
 ( +3.14-6J )y��Q�	@�z ( +3.14-J )y��Q�	@�z ( +3.14+j )�Jz( j )z+Jz( -j)y��z1e-500z-1e-500jz-1e-500+1e-500jc@�eZdZdS)�.ComplexTest.test_constructor.<locals>.complex2N�r�r�r�rrrr�complex2prer�r��rty1@7@)ry1@G@y@@y�@cSs
t|d�S)z7Function that produces different results for 0. and -0.��)r)r"rrr�split_zeroszs
z1ComplexTest.test_constructor.<locals>.split_zeros��z1+1jjy@@�znot 'NoneType'�z39�2�*z1+z1+1j+1jz--z(1+2jz1+2j)z1+(2j)z	(1+2j)123r"z1j+2Z1e1ejz1e++1ejz)1+2j(z7first argument must be a string or a number, not 'dict'r`z,second argument must be a number, not 'dict'z1..1jz1.11.1jz1e1.1jA�11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111u ( 1+1j ) uこんにちはc@r�)z-ComplexTest.test_constructor.<locals>.EvilExcNr�rrrr�EvilExc��r�cseZdZ�fdd�ZdS)z1ComplexTest.test_constructor.<locals>.evilcomplexcs��r=rrF�r�rrr���z=ComplexTest.test_constructor.<locals>.evilcomplex.__complex__N)r�r�r�r�rr�rr�evilcomplex�sr�c@r�)z,ComplexTest.test_constructor.<locals>.float2cSr�r=r�r�rrrr���
z5ComplexTest.test_constructor.<locals>.float2.__init__cSr�r=r�rFrrr�	__float__��z6ComplexTest.test_constructor.<locals>.float2.__float__N)r�r�r�r�r�rrrr�float2��r�gE@g1@g7@c@r�)z-ComplexTest.test_constructor.<locals>.MyIndexcSr�r=r�r�rrrr��r�z6ComplexTest.test_constructor.<locals>.MyIndex.__init__cSr�r=r�rFrrr�	__index__�r�z7ComplexTest.test_constructor.<locals>.MyIndex.__index__N)r�r�r�r�r�rrrr�MyIndex�r�r�yE@�{y�^@E@i�c@seZdZdd�ZdS)z+ComplexTest.test_constructor.<locals>.MyIntcSrf)Nr�rrFrrr�__int__�r�z3ComplexTest.test_constructor.<locals>.MyInt.__int__N)r�r�r�r�rrrr�MyInt�sr�c@�eZdZdZdd�ZdS)z.ComplexTest.test_constructor.<locals>.complex0z:Test usage of __complex__() when inheriting from 'complex'cSrf)N�E@rrFrrrr��r�z:ComplexTest.test_constructor.<locals>.complex0.__complex__N�r�r�r��__doc__r�rrrr�complex0�sr�c@s"eZdZdZddd�Zdd�ZdS)	z.ComplexTest.test_constructor.<locals>.complex1z3Test usage of __complex__() with a __new__() methodrcSst�|d|�S)Nr`)r�__new__r�rrrr���z6ComplexTest.test_constructor.<locals>.complex1.__new__cSs|Sr=rrFrrrr��r�z:ComplexTest.test_constructor.<locals>.complex1.__complex__N)r)r�r�r�r�r�r�rrrr�complex1�s
r�c@r�)r�z`Make sure that __complex__() calls fail if anything other than a
            complex is returnedcSsdSr=rrFrrrr��r�z:ComplexTest.test_constructor.<locals>.complex2.__complex__Nr�rrrrr��sr��@)�objectrwrr?rErrrr ru�intr.ZassertRaisesRegex�type�	ExceptionrvZassertWarns�DeprecationWarning)rr�r�r�r�r|r�r�r�r�r�r�rr�r�test_constructor4s
�
��zComplexTest.test_constructorc
Cs>Gdd�dt�}ddtttfD]�}ddtttfD]�}|j||d��pt||�}|�|j|�|�|j|�|||�}|�t|�|�|�|j|�|�|j|�t|||��}|�t|�t�|�|j|�|�|j|�|t||��}|�t|�|�|�|j|�|�|j|�Wd�n1s�wYqqdS)Nc@r�)z>ComplexTest.test_constructor_special_numbers.<locals>.complex2Nr�rrrrr��r�r�r
r�)r"r#)	rr�r;rzr(rrrJr�)rr�r"r#r+rrr� test_constructor_special_numbers�s.

����z,ComplexTest.test_constructor_special_numbersc	s�tD]%�t�fdd�dD��s'|�t��t���|�t��t��dd���qtD]��dvr1q*t�fdd�dD��sC|�tt��q*dS)Nc3��|]}|�vVqdSr=r�r/Zch�Zlitrr�	<genexpr>��z/ComplexTest.test_underscores.<locals>.<genexpr>ZxXoObB�_r�)Z0_7Z09_99c3r�r=rr�r�rrr�r�)	r�anyrwr�eval�replacerr?rurFrr�r�test_underscores
s���zComplexTest.test_underscorescCsPtdd�D] }|�t|�tt|d���|d}|�t|�tt|d���qdS)Nrs�r�@r
)r:rw�hashr)rr"rrr�	test_hashs
�zComplexTest.test_hashcCsFdd�tdd�D�}|D]}|�|jd|jddt|��qdS)NcSs.g|]}tdd�D]}t|d|d��q	qS)����	r�g@)r:rr4rrrr1 s.z(ComplexTest.test_abs.<locals>.<listcomp>r�r�r`g�?)r:rrrr)rZnums�numrrr�test_abss&�zComplexTest.test_abscCs,|jfdd�}|dd�|dd�|dd|jd	�|td
t�d�|td
t�d�|ttd
�d�|ttt�d�|ttd
�d�|td
t�d�|ttt�d�|tdt�d�|tdt�d�|tdt�d�|�dttd���|�dttd���|�dttd���|�dttd���dS)NcS� |t|�|�|t|�|�dSr=��reprr���vZexpected�test_fnrrr�test%�z'ComplexTest.test_repr_str.<locals>.testy�?@z(1+6j)y�?�z(1-6j)y��z(-1+-0j))r�rz(1+infj)z(1-infj)rz(inf+1j)z(-inf+infj)z(nan+1j)z(1+nanj)z
(nan+nanj)r�infjz-infj�nanjy��y@)rwZassertNotEqualrr�r;r��rr�rrr�
test_repr_str$s$

zComplexTest.test_repr_strcCs�|jfdd�}|tdd�d�|tdd�d�|tdd�d	�|tdd�d
�|tdd�d�|tdd�d�|tdd�d
�|tdd�d�dS)NcSr�r=r�r�rrrr�Ar�z5ComplexTest.test_negative_zero_repr_str.<locals>.testr
rr�r�z(-0+1j)r�z-1jz(-0-1j)Z0jz-0jz(-0+0j)z(-0-0j))rwrr�rrr�test_negative_zero_repr_str?sz'ComplexTest.test_negative_zero_repr_strcCs|�dd�dS)Ny��)rwrFrrr�test_negOr�zComplexTest.test_negcCsx|�d��d�|�d��d�|�d��d�|�d��d�|�td	t���d
tf�|�ttd	���td
f�dS)Nr�)r�@y�?�)rg�r�)r
r����)r
r�rr
)rw�__getnewargs__rr�rFrrr�test_getnewargsRszComplexTest.test_getnewargscCs@d\}}|�t|jd�tdd��|�t|jd�tdd��dS)N)rr�r�r
r�)rwrr)r�z1�z2rrr�test_plus_minus_0jZszComplexTest.test_plus_minus_0jcCsfd}d}d}|�|jd�|�|jd�|�|jd�|�|jd�|�|jd�|�|jt�dS)Nr�y��y��r�g�)r(rrr�)rZz0r�r�rrr�test_negated_imaginary_literalasz*ComplexTest.test_negated_imaginary_literalcCsJ|�td�ttd��|�td�tdt��|�td�ttt��dS)NZ1e500r
z-1e500jz-1e500+1.8e308j)rwrr�rFrrr�
test_overflowqszComplexTest.test_overflowc
	Cs�dddddddttg	}|dd�|D�7}|D]"}|D]}t||�}tt|��}|�|j|j�|�|j|j�qqtd	�td
�}}td|�td|�}}	|D]*}|D]%}t||�}tt|��}|�d|jd|j�|�d|jd|j�qSqOdS)Nr
g�ir7g�(�
�0�?go���!	@g�d~�QJcSsg|]}|�qSrr)r/r�rrrr1zsz3ComplexTest.test_repr_roundtrip.<locals>.<listcomp>r	r
)	r�r;rr�r(rrr.r�)
rZvalsr"r#r+Z	roundtripr	r
r�r�rrr�test_repr_roundtripws.
�
����zComplexTest.test_repr_roundtripcCs&|�tdd�td��|�tdd�td��|�tdd�td��|�tdd�td��|�tdd�td��|�tdd�td��|�tdd�td��|�tdd	�td��d
}|�t|d�t|��|�t|d�t|��|�t|d	�t|��|�t|d�t|��tdd
�}|�t|d�t|��|�t|d�t|��|�t|d	�t|��|�t|d�t|��tdd�}|�t|d�t|��|�t|d�t|��|�t|d	�t|��|�t|d�t|��|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d�|�tdd�d �|�td!d�d"�|�td#d�d$�|�td!d%�d&�|�td!d'�d&�|�td!d(�d)�|�td!d*�d+�|�td!d,�d-�|�td.d/�d0�|�td1d2�d3�|�td1d4�d5�|�td1d6�d7�|�td1d8�d9�|�td1d:�d;�|�td1d<�d=�|�td1d>�d?�|�td@dA�dB�|�td1dC�dD�|�td1dE�dD�|�td1dF�dG�|�tdHdF�dI�|�tdHdJ�dK�|�tdHdL�dM�|�tdNdL�dO�|�tdPdQ�dR�|�tdSdT�dU�|�tdSdV�dW�|�tdSdX�dY�|�tdSdZ�d[�|�td\d�d]�|�td\d^�d_�|�tdSd`�da�|�tdSdb�da�|�tdSdc�dd�|�tdSde�dd�|�tdfdg�dh�|�tdfdZ�di�|�tdfdj�dk�|�tdfdV�dl�|�tdfd^�dm�|�tdfdn�do�|�tdfdp�dq�|�tdrjds�|�td1jdt�duD]}|�tdrj|��q�|�dv�dw�dx�|�tttt�d%�dy�|�ttdzt�d%�d{�|�tttdz�d%�d|�|�tttd}�d%�d~�|�tttt�d'�d�|�ttdzt�d'�d��|�tttdz�d'�d��|�tttd}�d'�d��|�tttt�d%�d��|�ttdzt�d%�d��|�tttdz�d%�d��|�tttd}�d%�d��|�tttt�d'�d��|�ttdzt�d'�d��|�tttdz�d'�d��|�tttd}�d'�d��dS)�Ny�?@r�y�?@y@y������	@y@y������	@�-�<y�$I�$I�?%I�$I�,�Z10r
r�r�r�r��3�gz1+3jz0+3jz1.5+3.5jz+gz	+1.5+3.5jy�?�z	+1.5-3.5jz-gz1.5-3.5jz gz	 1.5+3.5jz	 1.5-3.5jy��@z	-1.5+3.5jy���z	-1.5-3.5jy�������z
-1.5-3.5e-20jrYz-1.500000-3.500000j�F�ez-1.500000e+00-3.500000e+00jz.2ez-1.50e+00-3.50e+00jz.2Ez-1.50E+00-3.50E+00jy�����\�z.2Gz-1.5E+10-3.5E+05jy�?@z<20gz1.5+3j              z*<20gz1.5+3j**************z>20gz              1.5+3jz^20gz       1.5+3j       z<20z(1.5+3j)            z>20z            (1.5+3j)z^20z      (1.5+3j)      y+����?�C�l��z^20.2z     (1.1-3.1j)     z20.2fz          1.50+3.00jz>20.2fz<20.2fz1.50+3.00j          y0)�VC D@z150000000000000000000.00+3.00jz>40.2fz(          150000000000000000000.00+3.00jz^40,.2fz(  150,000,000,000,000,000,000.00+3.00j  y|3*�+TTD@z( 1,500,000,000,000,000,000,000.00+3.00j y|3*�+TTDp�@z,.2fz*1,500,000,000,000,000,000,000.00+3,000.00jrz.0ez1e+00+1e+00jz#.0ez1.e+00+1.e+00jz.0fz1+1jz#.0fz1.+1.jy�������?�������?z1.1+1.1jz#gz1.10000+1.10000jz.1ez1.0e+00+1.0e+00jz#.1ez.1fz1.0+1.0jz#.1fy���?z#fz-1.500000+0.500000jz-2.+0.jz#ez-1.500000e+00+5.000000e-01jz-2.e+00+5.e-01jz-1.50000+0.500000jz.0gz-2+0.5jz#.0gz-2.+0.5jy�?�?Z010fz=20ZbcdoxXz	*{0:.3f}*yn��!	@����	�@z*3.142+2.718j*znan+nanjrz
1.000000+nanjz
nan+1.000000jrpz
nan-1.000000jzNAN+NANjz
1.000000+NANjz
NAN+1.000000jz
NAN-1.000000jzinf+infjz
1.000000+infjz
inf+1.000000jz
inf-1.000000jzINF+INFjz
1.000000+INFjz
INF+1.000000jz
INF-1.000000j)	rwr&r�rr?ru�
__format__r;r�)rr+�trrr�test_format�s�

zComplexTest.test_formatN)r)&r�r�r�rr$r(r)r-r<rArGrIrZrirjrkrmrnr}r�r�r�r�rZrequires_IEEE_754r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrsR


<C





r�__main__)rrxr�rZtest.test_grammarrrr�mathrrrrRr.r�r;r>rrr��mainrrrr�<module>s&{�
© 2025 GrazzMean