ó
ŠwÛjc           @   s  d  d l  m Z m Z d  d l m Z 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 e d ƒ Z e d ƒ Z g  d d g D]( Z d d g D] Z e e e ƒ ^ q§ q— Z g  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 g D] \ Z Z e e e ƒ ^ qŒZ g  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 g D] \ Z Z e e e ƒ ^ q"Z d e j f d „  ƒ  YZ d „  Z e d k r{e ƒ  n  d S(   iÿÿÿÿ(   t   run_unittestt   cpython_only(   t   parse_testfilet	   test_fileN(   t   phaset   polart   rectt   pit   inft   nang        g       €gffffff@gffffffÀt
   CMathTestsc           B   s"  e  Z g  d  d d d d d d d d d	 d
 d d d d d g D] Z e e e ƒ ^ q= Z e j d „  ƒ e j d „  ƒ d „  Z d „  Z d d d% d „ Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e d „  ƒ Z d „  Z d  „  Z d! „  Z d" „  Z d# „  Z d$ „  Z RS(&   t   acost   acosht   asint   asinht   atant   atanht   cost   cosht   expt   logt   log10t   sint   sinht   sqrtt   tant   tanhc         C   s   t  j |  d ƒ S(   Ng     ›@y                y     ›@        (   t   cmathR   (   t   x(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   <lambda>7   t    c         C   s   t  j d |  ƒ S(   Ng      ,@y              ;@y      ,@      ;À(   R   R   (   R   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR   8   R   c         C   s   t  t ƒ |  _ d  S(   N(   t   openR   t   test_values(   t   self(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   setUp:   s    c         C   s   |  j  j ƒ  d  S(   N(   R    t   close(   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   tearDown=   s    gVçž¯â<g
       c         C   sG  t  j | ƒ rA t  j | ƒ r" d S|  j | p: d j | ƒ ƒ n  t  j | ƒ r‚ | | k r` d S|  j | p{ d j | | ƒ ƒ n  | rÙ | rÙ t  j d | ƒ t  j d | ƒ k rÙ |  j | pÏ d j | | ƒ ƒ qÙ n  y t | | ƒ } Wn t k
 r n$ X| t | | t | ƒ ƒ k r$d S|  j | p?d j | | ƒ ƒ d S(   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(	   t   matht   isnant   failt   formatt   isinft   copysignt   abst   OverflowErrort   max(   R!   t   at   bt   rel_errt   abs_errt   msgt   absolute_error(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   rAssertAlmostEqual@   s*    $c      	   C   sl   d } d } |  j  t j | d d d d j t j | ƒ ƒ|  j  t j | d d d d j t j | ƒ ƒd  S(   NgiW‹
¿@g-DTû!	@t   placesi	   R2   s   cmath.pi is {}; should be {}s   cmath.e is {}; should be {}(   t   assertAlmostEqualR   R   R(   t   e(   R!   t
   e_expectedt   pi_expected(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   test_constantsr   s    c            sÿ  d" ‰ d ‰ d d d d d  t ƒ  t g } d t f d	 „  ƒ  Y} d
 d# d „  ƒ  Y} d t f d „  ƒ  Y‰  d t f ‡  f d †  ƒ  Y} d d$ ‡  f d †  ƒ  Y} d t f d „  ƒ  Y} d d% d „  ƒ  Y} d t f d „  ƒ  Y} d d& d „  ƒ  Y}	 d t f ‡ ‡ f d †  ƒ  Y}
 d d' ‡ ‡ f d †  ƒ  Y} d t f ‡ f d †  ƒ  Y} d  d( ‡ f d! †  ƒ  Y} x˜|  j D]�} |  j | | ˆ ƒ ƒ | ˆ ƒ ƒ |  j | | ˆ ƒ ƒ | ˆ ƒ ƒ |  j | |
 ƒ  ƒ | ˆ ƒ ƒ |  j | | ƒ  ƒ | ˆ ƒ ƒ |  j | | ƒ  ƒ | ˆ ƒ ƒ |  j | | ƒ  ƒ | ˆ ƒ ƒ |  j t | | ƒ  ƒ |  j t | | ƒ  ƒ |  j t | | ƒ  ƒ |  j t | |	 ƒ  ƒ x@ | D]8 } |  j t | | | ƒ ƒ |  j t | | | ƒ ƒ q�W|  j ˆ  | | ƒ  ƒ |  j ˆ  | | ƒ  ƒ qjWd  S()   Ng—æ‹úz­@y        7Ä‚?ô÷?g]ò‰†Ö†Às   not complexi   l    g       @t	   MyComplexc           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   | |  _  d  S(   N(   t   value(   R!   R<   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   __init__Ž   s    c         S   s   |  j  S(   N(   R<   (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   __complex__�   s    (   t   __name__t
   __module__R=   R>   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR;   �   s   	t   MyComplexOSc           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   | |  _  d  S(   N(   R<   (   R!   R<   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR=   •   s    c         S   s   |  j  S(   N(   R<   (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR>   —   s    (   R?   R@   R=   R>   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRA   ”   s   	t   SomeExceptionc           B   s   e  Z RS(    (   R?   R@   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRB   ›   s   t   MyComplexExceptionc              s   e  Z ‡  f d  †  Z RS(   c            s
   ˆ  ‚ d  S(   N(    (   R!   (   RB   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR>   ž   s    (   R?   R@   R>   (    (   RB   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRC   �   s   t   MyComplexExceptionOSc              s   e  Z ‡  f d  †  Z RS(   c            s
   ˆ  ‚ d  S(   N(    (   R!   (   RB   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR>   ¡   s    (   R?   R@   R>   (    (   RB   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRD       s   t   NeitherComplexNorFloatc           B   s   e  Z RS(    (   R?   R@   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRE   ¥   s   t   NeitherComplexNorFloatOSc           B   s   e  Z RS(    (   R?   R@   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRF   §   s   t   MyIntc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         S   s   d S(   Ni   (    (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   __int__ª   R   c         S   s   d S(   Nl    (    (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   __long__«   R   c         S   s   d S(   Ni   (    (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt	   __index__¬   R   (   R?   R@   RH   RI   RJ   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRG   ©   s   		t   MyIntOSc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         S   s   d S(   Ni   (    (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRH   ®   R   c         S   s   d S(   Nl    (    (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRI   ¯   R   c         S   s   d S(   Ni   (    (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRJ   °   R   (   R?   R@   RH   RI   RJ   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRK   ­   s   		t   FloatAndComplexc              s&   e  Z ‡ f d  †  Z ‡  f d †  Z RS(   c            s   ˆ  S(   N(    (   R!   (   t   flt_arg(    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt	   __float__µ   s    c            s   ˆ  S(   N(    (   R!   (   t   cx_arg(    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR>   ·   s    (   R?   R@   RN   R>   (    (   RO   RM   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRL   ´   s   t   FloatAndComplexOSc              s&   e  Z ‡ f d  †  Z ‡  f d †  Z RS(   c            s   ˆ  S(   N(    (   R!   (   RM   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRN   º   s    c            s   ˆ  S(   N(    (   R!   (   RO   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR>   ¼   s    (   R?   R@   RN   R>   (    (   RO   RM   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRP   ¹   s   t	   JustFloatc              s   e  Z ‡  f d  †  Z RS(   c            s   ˆ  S(   N(    (   R!   (   RM   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRN   ¿   s    (   R?   R@   RN   (    (   RM   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRQ   ¾   s   t   JustFloatOSc              s   e  Z ‡  f d  †  Z RS(   c            s   ˆ  S(   N(    (   R!   (   RM   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRN   Â   s    (   R?   R@   RN   (    (   RM   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyRR   Á   s   y—æ‹úz­@7Ä‚?ô÷?(    (    (    (    (    (    (   t   Nonet   objectt   NotImplementedt	   Exceptiont   test_functionst   assertEqualt   assertRaisest	   TypeError(   R!   t   non_complexesR;   RA   RC   RD   RE   RF   RG   RK   RL   RP   RQ   RR   t   ft   bad_complex(    (   RB   RO   RM   s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   test_user_objectz   sB    ""c         C   s›   xM |  j  D]B } x9 d d d g D]( } |  j | | ƒ | | j ƒ  ƒ ƒ q  Wq
 WxD |  j  D]9 } x0 d d d d d g D] } |  j t | | ƒ qv WqZ Wd  S(	   Ni   l    g       @R.   t   long_stringt   0t   1jR   (   RW   RX   RN   RY   RZ   (   R!   R\   t   arg(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   test_input_typeß   s    *c         C   sõ  d d d d d d g } | g  | D] } | ^ q" d d d	 g } | d g g  | D] } d | ^ qT } d g | } d g | g  | D] } | ^ q‰ } i | d
 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6} x� | j  ƒ  D]s \ } }	 t t | ƒ }
 t t | ƒ } xF |	 D]> } | | ƒ } |  j |
 | ƒ | j ƒ |  j d | j ƒ q<WqWxl d d d g D][ } xR | D]J } t j | | ƒ } |  j t j | | ƒ | j ƒ |  j d | j ƒ qŸWq’Wd  S(   Ng{®Gáz„?gš™™™™™¹?gš™™™™™É?g      à?gÍÌÌÌÌÌì?g®Gáz®ï?g        g      ð?g      ð¿R   R   R   R   R   R   R   R   R   R   R   R   R   g       @g      $@(	   t   itemst   getattrR%   R   R4   t   realRX   t   imagR   (   R!   R    R   t   unit_intervalt   positivet   nonnegativet	   real_lineRW   t   fnt   valuest   float_fnt
   complex_fnt   vt   zt   base(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   test_cmath_matches_mathë   s@    (%
c      
   C   s–  t  j d ƒ j d ƒ s( |  j d ƒ n  d „  } d „  } xUt t ƒ D]G\ } } } } } } }	 t | | ƒ }
 t | | ƒ } | d k r• | } n$ | d k rª | } n t t | ƒ } d |	 k sÑ d	 |	 k ry | |
 ƒ } Wn t	 k
 r÷ qG qX|  j
 d
 j | | | | ƒ ƒ n  d |	 k roy | |
 ƒ } Wn t k
 rLqG qoX|  j
 d j | | | | ƒ ƒ n  | |
 ƒ } d |	 k rÀt t | j ƒ | j ƒ } t t | j ƒ | j ƒ } n  d |	 k rt | j t | j ƒ ƒ } t | j t | j ƒ ƒ } n  | d k rd } n d } d j | | | | | j | j | j | j ƒ } |  j | j | j d | d | ƒ|  j | j | j d | ƒqG Wd  S(   Nt   doublet   IEEEs   needs IEEE doublec         S   s   t  j |  j |  j ƒ S(   sa   Wrapped version of rect that accepts a complex number instead of
            two float arguments.(   R   R   Rf   Rg   (   Rq   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   rect_complex  s    c         S   s   t  t |  ƒ Œ  S(   sY   Wrapped version of polar that returns a complex number instead of
            two floats.(   t   complexR   (   Rq   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   polar_complex$  s    R   R   s   divide-by-zerot   invalids9   ValueError not raised in test {}: {}(complex({!r}, {!r}))t   overflows<   OverflowError not raised in test {}: {}(complex({!r}, {!r}))s   ignore-real-signs   ignore-imag-signR   R   gVçž¯â<g
       sŽ   {}: {}(complex({!r}, {!r}))
Expected: complex({!r}, {!r})
Received: complex({!r}, {!r})
Received value insufficiently close to expected value.R1   R2   (   R   R   (   t   floatt   __getformat__t
   startswitht   skipTestR   R   Rw   Re   R   t
   ValueErrorR'   R(   R,   R+   Rf   Rg   R4   (   R!   Rv   Rx   t   idRl   t   art   ait   ert   eit   flagsRb   t   expectedt   functiont   actualt   real_abs_errt   error_message(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   test_specific_values  sZ    		(			c            sX  ‡  ‡ f d †  } | d d ƒ | d d ƒ | d d t  f ƒ | d d t  d f ƒ | d	 d
 t  d f ƒ t d ƒ } | t | d ƒ | d f ƒ | t | d ƒ | t  f ƒ | t d | ƒ | t  d f ƒ | t d | ƒ | t  d f ƒ | t | | ƒ | t  d f ƒ | t | | ƒ | t  d f ƒ | t | | ƒ | d t  d f ƒ | t | | ƒ | d t  d f ƒ t d ƒ } | t | d ƒ | | f ƒ | t d | ƒ | | f ƒ | t | | ƒ | | f ƒ | t | | ƒ | | f ƒ | t | | ƒ | | f ƒ | t | | ƒ | | f ƒ | t | | ƒ | | f ƒ d  S(   Nc            s@   ˆ  |  ƒ } x- t  | | ƒ D] \ } } ˆ j | | ƒ q Wd  S(   N(   t   zipR4   (   Rb   R†   t   gotR7   t   g(   t   funcR!   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   checkc  s    i    g        i   g      ð?iÿÿÿÿy              ð?i   y              Àg      @R   i   i   i   iýÿÿÿR	   (   g        g        (   g      ð?g        (   R   R{   Rw   (   R!   R�   R�   R   R	   (    (   R�   R!   s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   check_polarb  s.     " "%&c         C   s   |  j  t ƒ d  S(   N(   R‘   R   (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt
   test_polar~  s    c            s0   d d l  m ‰  ‡  f d †  } |  j | ƒ d  S(   Niÿÿÿÿ(   t	   set_errnoc            s*   ˆ  d ƒ z t  |  ƒ SWd  ˆ  d ƒ Xd  S(   Ni   i    (   R   (   Rq   (   R“   (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   polar_with_errno_set…  s    
(   t	   _testcapiR“   R‘   (   R!   R”   (    (   R“   s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   test_polar_errno�  s    c         C   s  |  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 ƒ |  j  t d ƒ t d ƒ |  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 ƒ |  j  t t d
 t ƒ ƒ t d ƒ |  j  t t d	 t ƒ ƒ t d ƒ |  j  t t d t ƒ ƒ t d ƒ |  j  t t d t ƒ ƒ t d ƒ |  j  t t t t ƒ ƒ t d ƒ |  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 ƒ |  j  t t d t ƒ ƒ t d ƒ |  j  t t d t ƒ ƒ t d ƒ |  j  t t d	 t ƒ ƒ t d ƒ |  j  t t d
 t ƒ ƒ t d ƒ |  j  t t t t ƒ ƒ d t ƒ |  j  t t t d ƒ ƒ t ƒ |  j  t t t d ƒ ƒ t ƒ x* t D]" } |  j t j	 t | ƒ ƒ ƒ q×Wd  S(   Ni    g        g      ð?g      ð¿y        YóøÂn¥y              ð?i   y              ð¿g       €gffffffÀg      è¿gffffff@i   g      è?y      ð¿YóøÂn¥y      ð¿YóøÂn¥�(
   R6   R   R   RX   Rw   t   INFt   complex_nanst
   assertTrueR%   R&   (   R!   Rq   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt
   test_phase�  sB     !!%%%%%%#####$  c         C   sT  x$ t  D] } |  j t | ƒ d ƒ q Wx$ t D] } |  j t | ƒ t ƒ q. W|  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 ƒ ƒ ƒ ƒ t
 j d ƒ j d ƒ rP|  j t t t d d ƒ ƒ n  d  S(   Ng        gffffffÀg       €gffffff@Rt   Ru   g­åU»ëè(   t   complex_zerosRX   R+   t   complex_infinitiesR—   Rw   t   NANR™   R%   R&   R{   R|   R}   RY   R,   (   R!   Rq   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   test_abs¶  s&     %%%% %%%%%c         C   sZ   d } t  | j | d ƒ | k s@ t  | j | d ƒ | k rV |  j | | f ƒ n  d  S(   NgH¯¼šò×z>i    i   (   R+   Rf   Rg   R'   (   R!   R.   R/   t   eps(    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   assertCEqualÒ  s    :c         C   s‹   |  j  t d d ƒ d ƒ |  j  t d d ƒ d ƒ |  j  t d t ƒ d ƒ |  j  t d t d ƒ d	 ƒ |  j  t d t d ƒ d
 ƒ d  S(   Ni    i   g      ð?g      ð¿i   (   i    i    (   g      ð?i    (   g      ð¿i    (   i    g      ð?(   i    g      ð¿(   R    R   R   (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt	   test_rect×  s
    c         C   s÷   |  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 ƒ ƒ ƒ d  S(   Ni   y              ð?i    (   t   assertFalseR   R&   R—   R™   R�   Rw   (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt
   test_isnanÞ  s    c         C   s÷   |  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 ƒ ƒ ƒ d  S(   Ni   y              ð?i    (   R¢   R   R)   R�   R™   R—   Rw   (   R!   (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt
   test_isinfé  s    N(   R?   R@   t   fnameRe   R   RW   t   appendR"   R$   RS   R4   R:   R^   Rc   Rs   R‹   R‘   R’   R   R–   Rš   Rž   R    R¡   R£   R¤   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyR
   0   s0   (		1		e		0	G			)				c           C   s   t  t ƒ d  S(   N(   R    R
   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt	   test_mainõ  s    t   __main__(   t   test.test_supportR    R   t   test.test_mathR   R   t   unittestR   R%   R   R   R   R   R{   R—   R�   R   t   yRw   R›   Rœ   R˜   t   TestCaseR
   R§   R?   (    (    (    s…   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cmath.pyt   <module>   s\   ";							









	.
					
				.ÿ Æ	