%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
a
�_g�x � @ s� d dl Z d dlmZ d dlmZmZ d dlmZ d dlmZm Z m
Z
d dlZed�Z
ed�ZG dd � d e j�Zd
d� Zedkr�e� dS )
� N)�support)�VALID_UNDERSCORE_LITERALS�INVALID_UNDERSCORE_LITERALS)�random)�atan2�isnan�copysign�inf�nanc @ s e Zd Zdd� Zd=dd�Zdd� Zd>dd �Zd
d� Zdd
� Zdd� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zejd d!� �Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zejd*d+� �Zd,d-� Zd.d/� Zd0d1� Zejd2d3� �Zejd4d5� �Zejd6d7� �Zejd8d9� �Z d:d;� Z!d<S )?�ComplexTestc C s� t |t�rdt |t�r>tj�| |j|j� tj�| |j|j� q�tj�| |j|� tj�| |jd� n@t |t�r�tj�| ||j� tj�| d|j� ntj�| ||� d S )N� )�
isinstance�complex�unittest�TestCase�assertAlmostEqual�real�imag��self�a�b� r �0/vddos/python/lib/python3.9/test/test_complex.pyr s
zComplexTest.assertAlmostEqual��&�.>c C s` t |�t |�kr|| }}|dkr.t |�|k S |dkrBt |�|k S | �t || | �|k � dS )z+Return true iff floats x and y "are close".r N)�abs�
assertTrue�r �x�yZepsr r r �assertCloseAbs s
zComplexTest.assertCloseAbsc C st d}t |�st |�r*t |�r^t |�r^dS n4||kr^|dkr>dS td|�td|�krVdS |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 � �?z: zeros have different signs)r r �fail�format)r r r �msgr r r �assertFloatsAreIdentical+ s z$ComplexTest.assertFloatsAreIdenticalc C s( | � |j|j|� | � |j|j|� dS )z.Return true iff complexes x and y "are close".N)r r r r r r r �assertCloseB s zComplexTest.assertClosec C sp || }|dkr:|| }| � ||� |�|�}| � ||� |dkrl|| }| � ||� |�|�}| � ||� dS )z8Compute complex z=x*y, and check that z/x==y and z/y==x.r N)r&