
    wg	                     &    d dl  d Zd Zd Zd Zy)    )*c                     dt         _        t        t        dd      j	                  t        d            sJ t        t
        d      j	                  t        d             sJ t        t        d      dk(  sJ t        t        dd	      dk(  sJ t        t        dd
	      d
k(  sJ t        t        d      j	                  t              sJ t        t        dd      j	                  t              sJ t        t        dddt        z        j	                  t        dz        sJ t        d dd      j	                  d      sJ t        d ddd      j	                  d      sJ t        d ddd      j	                  d      sJ  t        t              d      j	                  t        d            sJ  t        t        d      d      j	                  t        d             sJ y )N   g       @r   )n   g      ?   g        )	direction      )r   r	   c                     | dz  S )Nr    xs    [/home/mcse/projects/flask/flask-venv/lib/python3.12/site-packages/mpmath/tests/test_diff.py<lambda>ztest_diff.<locals>.<lambda>   s
    !Q$     g      @quadmethod   c                     d| dz  z   S Nr   r   r   r   s    r   r   ztest_diff.<locals>.<lambda>       !AqD& r   )r   r   i  c                     d| dz  z   S r   r   r   s    r   r   ztest_diff.<locals>.<lambda>   r   r   step)mpdpsdifflogaecossinabsexpejdiffunr   r   r   	test_diffr)      s   BFSA!!#a&)))S>c!fW%%%S>QSA&!+++SB'2---S>QSA!!!$$$SA1-00A666F366q999 #6:==cBBB #6:==cBBB6#;q>SV$$$6#A!!3q6'***r   c                     dt         _        t        t        dd      D  cg c]  } t	        |        c} ddgk(  sJ t        t        ddd      D  cg c]  } t	        |        c} ddgk(  sJ t        t        dd      D  cg c]  } t	        |        c} g dk(  sJ t        t        ddd      D  cg c]  } t	        |        c} g dk(  sJ y c c} w c c} w c c} w c c} w )Nr   r   r   r   r   r   r   r   r   )r   r   diffsr#   chop)ds    r   
test_diffsr/      s    BF"31-.DG.1a&888"31V<=DG=!QGGG"31-.DG.);;;"31V<=DG=JJJ /=.=s   CC?C0Cc                  J    dt         _        t        t        dd      g dk(  sJ y )Nr   r      )r   g      ?g      g      ?g      )r   r   taylorsqrtr   r   r   test_taylorr4      s!    BF$1!EEEEr   c                     dt         _        dx\  } }}}d }t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d	      sJ t        ||d
      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d	      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d      sJ t        ||d      j                  d       sJ t        ||d!      j                  d"      sJ t        ||d#      j                  d$      sJ t        ||d%      j                  d&      sJ t        ||d'      j                  d(      sJ t        ||d)      j                  d*      sJ t        ||d+      j                  d,      sJ t        ||d-      j                  d.      sJ t        ||d/      j                  d0      sJ y )1Nr   )r   r      c                 0    d| dz  z  |dz   dz  z  |dz  z  S )Nr   r   r   r   )r   yzs      r   r   z#test_diff_partial.<locals>.<lambda>"   s$    a1f!ax'!Q$. r   )r   r   r   i)r   r   r   i)r   r   r   iP r+   i )r   r   r   iݤ )r   r   r   i05^ )r   r   r   iR\ )r   r   r   iA )r   r   r   i% )r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   r   r   )r   r   r   iBW )r   r   r   ib )r   r   r   iN )r   r   r   igs )r   r   r   inR )r   r   r   i/ )r   r   r   il). )r   r   r   i  )r   r   r   ip )r   r   r   r!   )r   r8   r9   xyzfs        r   test_diff_partialr<      s-   BFEAaC.A3 ##H---3 ##H---3 ##H---3 ##H---3 ##H---3 ##G,,,3 ##G,,,3 ##G,,,3 ##G,,,3 ##H---3 ##H---3 ##H---3 ##H---3 ##H---3 ##G,,,3 ##G,,,3 ##G,,,3 ##G,,,3 ##H---3 ##G,,,3 ##G,,,3 ##G,,,3 ##G,,,3 ##G,,,3 ##G,,,3 ##G,,,3 ##G,,,r   N)mpmathr)   r/   r4   r<   r   r   r   <module>r>      s    + KF
-r   