
    daf0^                        d dl mZmZmZ d dlmZmZ d dlmZ d dlZd dl	Z	d dl
Z
d dl	mZmZmZmZ d dlZd dlZ ed      Z ed      ZdD  cg c]  } dD ]  } e| |        c}} Zedfed	feefd	efdefd
efdefe efe d	fe dfe d
fe dfe e fde fd
e fde fd	e fee fedfed
ffD  cg c]  \  } } e| |       c}} Zee fedfed
fedfed	feefe efdefd
efdefd	efeeffD  cg c]  \  } } e| |       c}} Z G d dej0                        Z G d dej4                        Zedk(  r ej8                          yyc c}} w c c}} w c c}} w )    )requires_IEEE_754cpython_onlyimport_helper)parse_testfile	test_fileN)phasepolarrectpiinfnan)               r   ffffff@r   ffffffc            
          e Zd ZdD  cg c]  }t        t        |       c}}}} Zej                  d        ej                  d        d Zd Zd Z	d Z
	 	 dd	Zd
 Zd Zd Zd Zd Zed        Zd Zd Zed        Zd Zd Zed        Zd Zd Zd Zd Zd Zed        Zed        Z ed        Z!yc c}}}} w )
CMathTests)acosacoshasinasinhatanatanhcoscoshexploglog10sinsinhsqrttantanhc                 .    t        j                  | d      S )Ny     @        cmathr   xs    */root/Python-3.12.4/Lib/test/test_cmath.py<lambda>zCMathTests.<lambda>;   s    UYYq*%=     c                 .    t        j                  d|       S )Ny      ,@      ;r%   r'   s    r)   r*   zCMathTests.<lambda><   s    UYYw%: r+   c                 0    t        t        d      | _        y )Nzutf-8)encoding)openr   test_valuesselfs    r)   setUpzCMathTests.setUp>   s    	G<r+   c                 8    | j                   j                          y N)r0   closer1   s    r)   tearDownzCMathTests.tearDownA   s     r+   c                 p   d}t        j                  |      st        j                  |      r+t        j                  |      rTt        j                  |      r?y||k(  r9|dk7  ryt        j                  d|      t        j                  d|      k(  ry|dz  }| j                  |j	                  ||             y)a#  Fail unless 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)mathisnancopysignfailformat)r2   r(   ymsgs       r)   assertFloatIdenticalzCMathTests.assertFloatIdenticalD   s     7::a=DJJqMzz!}A!VCxsA&$--Q*??55		#**Q"#r+   c                     | j                  |j                  |j                         | j                  |j                  |j                         y)zFail unless complex numbers x and y have equal values and signs.

        In particular, if x and y both have real (or imaginary) part
        zero, but the zeros have different signs, this test will fail.

        N)rA   realimag)r2   r(   r?   s      r)   assertComplexIdenticalz!CMathTests.assertComplexIdentical[   s4     	!!!&&!&&1!!!&&!&&1r+   Nc                    t        j                  |      r:t        j                  |      ry| j                  |xs dj                  |             t        j                  |      r+||k(  ry| j                  |xs dj                  ||             |sT|sRt        j
                  d|      t        j
                  d|      k7  r%| j                  |xs dj                  ||             	 t        ||z
        }|t        ||t        |      z        k  ry| j                  |xs dj                  ||             y# t        $ r Y 1w xY w)a  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.
        Nz{!r} should be nanz>finite result where infinity expected: expected {!r}, got {!r}r9   z,zero has wrong sign: expected {!r}, got {!r}z({!r} and {!r} are not sufficiently close)	r:   r;   r=   r>   isinfr<   absmaxOverflowError)r2   abrel_errabs_errr@   absolute_errors          r)   rAssertAlmostEqualzCMathTests.rAssertAlmostEquale   s"    ::a=zz!}IIc;188;<::a=AvIIc = 006q!> }}R#t}}R';;		# 2 "%%+VAq\3
	 1XN WgA.>!??		# J<CCAqI	K  		s   'D7 7	EEc           	         d}d}| j                  t        j                  |ddj                  t        j                  |             | j                  t        j                  |ddj                  t        j                  |             y )NgiW
@g-DT!	@	   zcmath.pi is {}; should be {})placesr@   zcmath.e is {}; should be {})assertAlmostEqualr&   r   r>   e)r2   
e_expectedpi_expecteds      r)   test_constantszCMathTests.test_constants   sp    +
,uxxQ.55ehhL 	 	Nuww
1-44UWWjI 	 	Kr+   c                 \   | j                  t        j                  j                  t        j                         | j                  t        j                  j
                  d       | j                  t        j                  j                  d       | j                  t        j                  j
                  t        j                         | j                  t	        j                  t        j                  j                               | j                  t        j                  j
                  d       | j                  t        j                  j                  d       | j                  t	        j                  t        j                  j
                               | j                  t	        j                  dt        j                  j                        d       | j                  t	        j                  dt        j                  j
                        d       | j                  t	        j                  dt        j                  j                        d       | j                  t	        j                  dt        j                  j
                        d       | j                  t        t        j                        d       | j                  t        t        j                        d       | j                  t        t        j                        d       | j                  t        t        j                        d       y )Nr   r9   r   infjr   nanj)assertEqualr&   r   rC   r:   rD   rZ   
assertTruer;   r   r[   r<   reprr1   s    r)   test_infinity_and_nan_constantsz*CMathTests.test_infinity_and_nan_constants   s   2-#.$((3

599>>23-#.

5::??34r599>>:B?r599>>:B?r5::??;R@r5::??;R@ 	eii%0ejj)62eii%0ejj)62r+   c           
      B   ddddddd t               t        g} G d d      } G d	 d
t               G fdd      } G d dt               } G d d      } G d d      } G fdd      } G fdd      }| j                  D ]  }	| j	                   |	 |             |	             | j	                   |	 |              |	             | j	                   |	 |              |	             | j	                   |	 |              |	t         |                          | j                  t        |	 |              | j                  t        |	 |              |D ]  }
| j                  t        |	 ||
             ! | j                  |	 |               y )Nyz@7Ă??g]ֆznot complex             @c                       e Zd Zd Zd Zy).CMathTests.test_user_object.<locals>.MyComplexc                     || _         y r5   value)r2   rh   s     r)   __init__z7CMathTests.test_user_object.<locals>.MyComplex.__init__   s	    "
r+   c                     | j                   S r5   rg   r1   s    r)   __complex__z:CMathTests.test_user_object.<locals>.MyComplex.__complex__   s    zz!r+   N)__name__
__module____qualname__ri   rk    r+   r)   	MyComplexre      s    #"r+   rp   c                       e Zd Zy)2CMathTests.test_user_object.<locals>.SomeExceptionNrl   rm   rn   ro   r+   r)   SomeExceptionrr          r+   rt   c                       e Zd Z fdZy)7CMathTests.test_user_object.<locals>.MyComplexExceptionc                     r5   ro   )r2   rt   s    r)   rk   zCCMathTests.test_user_object.<locals>.MyComplexException.__complex__   s	    ##r+   N)rl   rm   rn   rk   )rt   s   r)   MyComplexExceptionrw      s    $r+   ry   c                       e Zd Zy);CMathTests.test_user_object.<locals>.NeitherComplexNorFloatNrs   ro   r+   r)   NeitherComplexNorFloatr{      ru   r+   r|   c                       e Zd Zd Zd Zy)*CMathTests.test_user_object.<locals>.Indexc                      yN   ro   r1   s    r)   __int__z2CMathTests.test_user_object.<locals>.Index.__int__       ar+   c                      yr   ro   r1   s    r)   	__index__z4CMathTests.test_user_object.<locals>.Index.__index__   s    r+   N)rl   rm   rn   r   r   ro   r+   r)   Indexr~      s    ')r+   r   c                       e Zd Zd Zy)*CMathTests.test_user_object.<locals>.MyIntc                      yr   ro   r1   s    r)   r   z2CMathTests.test_user_object.<locals>.MyInt.__int__   r   r+   N)rl   rm   rn   r   ro   r+   r)   MyIntr      s    'r+   r   c                   "    e Zd ZfdZ fdZy)4CMathTests.test_user_object.<locals>.FloatAndComplexc                     S r5   ro   r2   flt_args    r)   	__float__z>CMathTests.test_user_object.<locals>.FloatAndComplex.__float__       r+   c                     S r5   ro   )r2   cx_args    r)   rk   z@CMathTests.test_user_object.<locals>.FloatAndComplex.__complex__   s    r+   N)rl   rm   rn   r   rk   )r   r   s   r)   FloatAndComplexr      s    r+   r   c                       e Zd Z fdZy).CMathTests.test_user_object.<locals>.JustFloatc                     S r5   ro   r   s    r)   r   z8CMathTests.test_user_object.<locals>.JustFloat.__float__   r   r+   N)rl   rm   rn   r   )r   s   r)   	JustFloatr      s    r+   r   )objectNotImplemented	Exceptiontest_functionsr\   intassertRaises	TypeError)r2   non_complexesrp   ry   r|   r   r   r   r   fbad_complexrt   r   r   s              @@@r)   test_user_objectzCMathTests.test_user_object   sw    , '1b$>3	" 	"	I 		$ 	$
	V 		* 	*	( 	(
	 	
	 	 $$ 	FAQy011V9=Q011V9=Qy{^QwZ8QuwZ3uw<9 i,B,DEiEG4, H!!)Q	+0FGH mQ0B0DE!	Fr+   c           	          | j                   D ]5  }dD ].  }| j                   ||       ||j                                      0 7 | j                   D ]   }dD ]  }| j                  t        ||        " y )N)r   rc   )rK   long_string01j )r   r\   r   r   r   )r2   r   args      r)   test_input_typezCMathTests.test_input_type   s     $$ 	=A =  33==?);<=	=
 $$ 	5A: 5!!)Q45	5r+   c                    g d}||D cg c]  }|  c}z   g dz   }|dgz   |D cg c]  }d|z  	 c}z   }dg|z   }dg|z   |D cg c]  }|  c}z   }|||||||||||||d}|j                         D ]r  \  }}	t        t        |      }
t        t        |      }|	D ]H  } ||      }| j	                   |
|      |j
                         | j                  d|j                         J t dD ]k  }|D ]d  }t        j                  ||      }| j	                  t        j                  ||      |j
                         | j                  d|j                         f m y c c}w c c}w c c}w )N)g{Gz?g?g?      ?g?gGz?)r   r9         r9   r   )r   r   r   r   r   r   r   r   r   r    r!   r"   r#   )r   rc   g      $@)	itemsgetattrr:   r&   rP   rC   r\   rD   r   )r2   r0   r(   unit_intervalpositivenonnegative	real_liner   fnvaluesfloat_fn
complex_fnvzbases                  r)   test_cmath_matches_mathz"CMathTests.test_cmath_matches_math  s   
 7 $;&?ar&?? "%{(C!A(CCdXo D8O8&<ar&<<	 #"   )..0 	-JBtR(H +J -qM''QVV<  QVV,-	- # 	-D -IIa&''D(9166B  QVV,-	-E '@ )D '=s   
EE!
E&c                 H   dh}d }t         j                  dk(  r@t        j                         d   }	 t        t	        t
        |j                  d                  }d }d }t        t              D ]  \  }}}}	}
}}t        ||	      }t        |
|      }|
|dk  r||v r0|dk(  r|}n|d	k(  r|}nt        t        |      }d
|v sd|v r,	  ||      }| j                  dj                  ||||	             d|v r,	  ||      }| j                  dj                  ||||	              ||      }d|v rRt        t!        |j"                        |j$                        }t        t!        |j"                        |j$                        }d|v rRt        |j"                  t!        |j$                              }t        |j"                  t!        |j$                              }|dv rd}nd}dj                  ||||	|j"                  |j$                  |j"                  |j$                        }| j'                  |j"                  |j"                  ||       | j'                  |j$                  |j$                  |        y # t        $ r Y 'w xY w# t        $ r Y "w xY w# t        $ r Y 2w xY w)Ntan0064darwinr   .c                 V    t        j                  | j                  | j                        S )zaWrapped version of rect that accepts a complex number instead of
            two float arguments.)r&   r
   rC   rD   r   s    r)   rect_complexz5CMathTests.test_specific_values.<locals>.rect_complexE  s     ::affaff--r+   c                 $    t        t        |        S )zYWrapped version of polar that returns a complex number instead of
            two floats.)complexr	   r   s    r)   polar_complexz6CMathTests.test_specific_values.<locals>.polar_complexJ  s     E!H%%r+   )
   rb   r
   r	   zdivide-by-zeroinvalidz9ValueError not raised in test {}: {}(complex({!r}, {!r}))overflowz<OverflowError not raised in test {}: {}(complex({!r}, {!r}))zignore-real-signzignore-imag-sign)r   r   V瞯<
       z{}: {}(complex({!r}, {!r}))
Expected: complex({!r}, {!r})
Received: complex({!r}, {!r})
Received value insufficiently close to expected value.)rN   r@   )r@   )sysplatformmac_vertuplemapr   split
ValueErrorr   r   r   r   r&   r=   r>   rJ   rH   rC   rD   rP   )r2   SKIP_ON_TIGERosx_versionversion_txtr   r   idr   araiereiflagsr   expectedfunctionactualreal_abs_errerror_messages                      r)   test_specific_valueszCMathTests.test_specific_values7  s    #<<8#"**,Q/K#C[->->s-C$DE	.
	&
 .<I-F =	;)BBBE"b/Cr2H &;+@&V|'w("5"-5(I,>P%c]F II 88>r2r28NP U"P%c]F II 88>r2r28NP c]F!U* V[[!16;;?"3x}}#5x}}E!U* c&++.>?"8==#hmm2DE %%$%I &RR]]HMM[[&++/  ##HMM6;;0<,9 $ ; ##HMM6;;,9 $ ;y=	;  > "  % s5   (I4 J7J4	J J	JJ	J! J!c                      fd} |dd        |dd        |ddt         f        |ddt         d	z  f        |d
dt          d	z  f       t        d      } |t        |d      |df        |t        | d      |t         f        |t        d|      |t         d	z  f        |t        d|       |t          d	z  f        |t        ||      |t         dz  f        |t        ||       |t          dz  f        |t        | |      |dt         z  dz  f        |t        | |       |dt         z  dz  f       t        d      } |t        |d      ||f        |t        d|      ||f        |t        ||      ||f        |t        ||      ||f        |t        | |      ||f        |t        ||      ||f        |t        ||       ||f       y )Nc                 b     |       }t        ||      D ]  \  }}j                  ||        y r5   )ziprP   )r   r   gotrU   gfuncr2   s        r)   checkz%CMathTests.check_polar.<locals>.check  s6    s)CHc* .1''1-.r+   r   )r   r   ra   )r9   r   r9                 ?r   y             g      @r   r      rb      r   )r   floatr   )r2   r   r   r   r   s   ``   r)   check_polarzCMathTests.check_polar  s   	. 	aab2r(b2rAv,cBa=!Elgc1oRy)gsdAb	*gaoR!V}-ga#rcAg/gc3#rAv/gcC4 3a.1gsdC 3B
"34gsdSD!Cb1#56Elgc1oSz*gaoSz*gc3#s,gc3#s,gsdC 3*-gc3#s,gcC4 3*-r+   c                 .    | j                  t               y r5   )r   r	   r1   s    r)   
test_polarzCMathTests.test_polar  s    r+   c                 \    t        j                  d      fd}| j                  |       y )N	_testcapic                     j                  d       	 t        |       j                  d       S # j                  d       w xY w)N   r   )	set_errnor	   )r   r   s    r)   polar_with_errno_setz9CMathTests.test_polar_errno.<locals>.polar_with_errno_set  s:    #'Qx##A&	##A&s	   
0 A)r   import_moduler   )r2   r   r   s     @r)   test_polar_errnozCMathTests.test_polar_errno  s+     "//<		' 	-.r+   c                 
   | j                  t        d      d       | j                  t        d      d       | j                  t        d      t               | j                  t        d      t               | j                  t        d      t                | j                  t        d      t        dz         | j                  t        d	      t         dz         | j                  t        t	        dd            d       | j                  t        t	        dd
            d
       | j                  t        t	        d
d            t               | j                  t        t	        d
d
            t                | j                  t        t	        t
         d
            t                | j                  t        t	        t
         d            t                | j                  t        t	        t
         t
                     dt        z         | j                  t        t	        dt
                     t         dz         | j                  t        t	        d
t
                     t         dz         | j                  t        t	        dt
                     t         dz         | j                  t        t	        dt
                     t         dz         | j                  t        t	        t
        t
                     t         dz         | j                  t        t	        t
        d            d
       | j                  t        t	        t
        d
            d
       | j                  t        t	        t
        d            d       | j                  t        t	        t
        d            d       | j                  t        t	        t
        t
                    t        dz         | j                  t        t	        dt
                    t        dz         | j                  t        t	        dt
                    t        dz         | j                  t        t	        d
t
                    t        dz         | j                  t        t	        dt
                    t        dz         | j                  t        t	        t
         t
                    dt        z         | j                  t        t	        t
         d            t               | j                  t        t	        t
         d            t               t        D ]/  }| j                  t        j                  t        |                   1 y )Nr   r   r9   r   y      Yny      Ynr   r   y             r   r   g      r   r   g      ?)
rT   r   r   r\   r   INFcomplex_nansr]   r:   r;   r2   r   s     r)   
test_phasezCMathTests.test_phase  s   uQx,uRy"-uSz2.u[126u[1B37uRy"Q$/uSzB3q51 	wsC0137wsD12D9wtS12B7wtT23bS9 	uWcT4%89B3?uWcT4%89B3?uWcTC4%8958DuWTC4%89B3q5AuWTC4%89B3q5AuWS3$%782#a%@uWS3$%782#a%@uWS3$%782#a%@wsD12D9wsD12D9wsC0137wsC0137uWS#%67A>uWS#%67A>uWS#%67A>uWT3%78"Q$?uWT3%78"Q$?uWcT3%78$r'BuWcT3%78"=uWcT3%78"=  	2AOODJJuQx01	2r+   c           
      ^   t         D ]  }| j                  t        |      d        t        D ]!  }| j                  t        |      t               # | j                  t        t        t        t                     t               | j                  t        j                  t        t        t        d                         | j                  t        j                  t        t        t        d                         | j                  t        j                  t        t        t        d                         | j                  t        j                  t        t        t        d                         | j                  t        t        t        t                    t               | j                  t        t        t         t                    t               | j                  t        j                  t        t        dt                                 | j                  t        j                  t        t        dt                                 | j                  t        j                  t        t        dt                                 | j                  t        j                  t        t        dt                                 | j                  t        t        t        t                    t               | j                  t        j                  t        t        t        t                                 y )Nr   r   r   r   )
complex_zerosr\   rH   complex_infinitiesr   r   NANr]   r:   r;   r   s     r)   test_abszCMathTests.test_abs  s    	*ASVS)	* $ 	*ASVS)	* 	WS3$/0#6

3wsD'9#:;<

3wsD'9#:;<

3wsC'8#9:;

3wsC'8#9:;WS#./5WcT3/0#6

3wtS'9#:;<

3wtS'9#:;<

3wsC'8#9:;

3wsC'8#9:;WS#./5

3wsC'8#9:;r+   c                 N    | j                  t        t        t        dd             y )NgU)r   rJ   rH   r   r1   s    r)   test_abs_overflowszCMathTests.test_abs_overflows  s     	-ggw.GHr+   c                     d}t        |j                  |d   z
        |kD  st        |j                  |d   z
        |kD  r| j                  ||f       y y )NgHz>r   ra   )rH   rC   rD   r=   )r2   rK   rL   epss       r)   assertCEqualzCMathTests.assertCEqual   sN    qvv!}#s166AaD='9C'?IIq!f (@r+   c                 D   | j                  t        dd      d       | j                  t        dd      d       | j                  t        dt               d       | j                  t        dt        dz        d       | j                  t        dt         dz        d       y )	Nr   )r   r   ra   )r9   r   )r   r   r   )r   r9   )r   r   )r  r
   r   r1   s    r)   	test_rectzCMathTests.test_rect  s|    $q!*f-$q!*g.$q2#,1$q"Q$-1$q2#a%.(3r+   c           	         t        d      ddddt        d      t        d      g}|D ]d  }|D ]]  }t        ||      }| j                  t        j                  |      t        j                  |      xr t        j                  |             _ f y )Nz-infr   r   r   r   r   r   )r   r   r\   r&   isfiniter:   )r2   	real_valsr(   r?   r   s        r)   test_isfinitezCMathTests.test_isfinite  s    6]D$#uU|U5\;	 	IA IAqM  !2"&--"2"Gt}}Q7GII	Ir+   c                 @   | j                  t        j                  d             | j                  t        j                  d             | j                  t        j                  t                     | j	                  t        j                  t
                     | j	                  t        j                  t        t
        d                   | j	                  t        j                  t        dt
                           | j	                  t        j                  t        t
        t
                           | j	                  t        j                  t        t
        t                           | j	                  t        j                  t        t        t
                           y Nra   r   r   )assertFalser&   r;   r   r]   r  r   r1   s    r)   
test_isnanzCMathTests.test_isnan      Q(R)S)*C()GCO45GAsO45GC$567GC$567GC$567r+   c                 @   | j                  t        j                  d             | j                  t        j                  d             | j                  t        j                  t                     | j	                  t        j                  t
                     | j	                  t        j                  t        t
        d                   | j	                  t        j                  t        dt
                           | j	                  t        j                  t        t
        t
                           | j	                  t        j                  t        t        t
                           | j	                  t        j                  t        t
        t                           y r  )r  r&   rG   r  r]   r   r   r1   s    r)   
test_isinfzCMathTests.test_isinf   r  r+   c                 d    t         D ]'  }| j                  t        j                  |      |       ) y r5   )r   rE   r&   r#   r   s     r)   testTanhSignzCMathTests.testTanhSign+  )     	:A''

1q9	:r+   c                 d    t         D ]'  }| j                  t        j                  |      |       ) y r5   )r   rE   r&   r   r   s     r)   testAtanSignzCMathTests.testAtanSign4  r  r+   c                 d    t         D ]'  }| j                  t        j                  |      |       ) y r5   )r   rE   r&   r   r   s     r)   testAtanhSignzCMathTests.testAtanhSign9  s)     	;A''A:	;r+   )r   r   N)"rl   rm   rn   r   r&   r   appendr3   r7   rA   rE   rP   rX   r_   r   r   r   r   r   r   r   r   r   r   r  r  r  r	  r  r  r  r  r  r  ).0fnamer   r&   s   0000r)   r   r   4   s9   :# $ $geU+ $N
 =>:;=!$.2 CI#0KdK3,DFL
5.-` T; T;l.8  	/ 	/'2R<2 I I
4I	8	8 : : : : ; ;I$s   B:
r   c                   <    e Zd Zej                  Zd Zd Zd Zd Zy)IsCloseTestsc                 z   | j                  t              5  | j                  ddd       d d d        | j                  t              5  | j                  ddd       d d d        | j                  t              5  | j                  dddd       d d d        y # 1 sw Y   oxY w# 1 sw Y   IxY w# 1 sw Y   y xY w)Nr   rel_tolabs_tol)r#  r%  )r   r   iscloser1   s    r)   test_reject_complex_tolerancesz+IsCloseTests.test_reject_complex_tolerancesB  s    y) 	-LLRL,	- y) 	-LLRL,	- y) 	9LLRRL8	9 	9	- 	-	- 	-	9 	9s#   BB%:B1B"%B.1B:c                 X    g d}| j                  |d       | j                  |d       y )N))      ?      ?y    ?      ?)r)  y      ?    ?)y            ?y          ?)y      ?      y      ?g-q=r"  gvIh%<=)assertAllCloseassertAllNotClose)r2   complex_exampless     r)   test_complex_valuesz IsCloseTests.test_complex_valuesL  s4     	,e</?r+   c                     g d}| j                  |d       | j                  |d       | j                  ddd       | j                  ddd       y )	N))y        MbP?r   )MbP?r   )MbP?MbP?r   )yMbPMbP?r   )MbP?MbPr   )yMbPMbPr   g~jtX?r$  gMb@?r1  r0  gMb`?r/  )r*  r+  assertIsCloseassertIsNotClose)r2   near_zero_exampless     r)   test_complex_near_zeroz#IsCloseTests.test_complex_near_zeroW  s^      	.@17C<uElL%Hr+   c                 B   | j                  t        t        dz         | j                  t        dz  t               | j                  t        t                | j                  t         t               | j                  dt               | j                  dt        dz         y )Nr   r   )r3  r   r1   s    r)   test_complex_specialz!IsCloseTests.test_complex_specialg  sr    c3r6*c"fc*cC4(sdC(a%aR(r+   N)	rl   rm   rn   r&   r&  r'  r-  r5  r7  ro   r+   r)   r   r   ?  s!    mmG9	@I )r+   r   __main__)test.supportr   r   r   test.test_mathr   r   	test_mathunittestr&   r:   r   r	   r
   r   r   r   r   r   r  r   r   r   r   TestCaser   r   rl   main)r(   r?   s   00r)   <module>r?     s   G G 4 "   ( (  
 ElEl(3I1[IAII	c
	c
	c
	c
	c
	s	s
s
s
s
t
t
t	t	t	sd	sd	sd	d	d)1
 1gam  . 
sd	d	d	c
	c
	c

s	s	s	c
	c
	c
+
 $!Q1 H;"" H;V.)9)) .)b zHMMO E J,s   E6E8E