Ë
    7^(hÑ	  ã                   óf   — d dl mZmZ d dlmZ d dlmZ d dlmZm	Z	 d dl
mZ d dlmZ d„ Zd„ Zd	„ Zy
)é    )ÚFunctionÚDefinedFunction©Úsympify)Útanh)ÚcosÚsin)Úlimit)Úxc                  ó  — t         t        fD ]|  }  G d„ d| «      } |t        «      j                  t        dd«      t	        t        «      j                  t        dd«      k(  sJ ‚t         |t        «      t        z  t        d«      dk(  rŒ|J ‚ y)zCreate our new "sin" function.c                   ó$   — e Zd Zdd„Zed„ «       Zy)ú*test_function_series1.<locals>.my_functionc                 ó2   — t        | j                  d   «      S ©Nr   )r   Úargs©ÚselfÚargindexs     úm/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/functions/elementary/tests/test_interface.pyÚfdiffz0test_function_series1.<locals>.my_function.fdiff   s   € Ü˜4Ÿ9™9 Q™<Ó(Ð(ó    c                 ó:   — t        |«      }|dk(  rt        d«      S y r   r   ©ÚclsÚargs     r   Úevalz/test_function_series1.<locals>.my_function.eval   ó!   € ä˜c“l�Ø˜!’8Ü" 1›:Ð%ð r   N©é   ©Ú__name__Ú
__module__Ú__qualname__r   Úclassmethodr   © r   r   Úmy_functionr      s   „ ó)ð ñ&ó ñ&r   r&   r   é
   r   N)r   r   r   Úseriesr	   r
   )ÚFr&   s     r   Útest_function_series1r*      sx   € ô œÐ(ò 2ˆô		&˜!ô 		&ñ œ1‹~×$Ñ$¤Q¨¨2Ó.´#´a³&·-±-ÄÀ1ÀbÓ2IÒIÐIÐIÜ‘[¤“^¤AÑ%¤q¨!Ó,°Ó1Ð1Ð1ñ2r   c                  óÌ   — t         t        fD ]U  }  G d„ d| «      } |t        «      j                  t        dd«      t	        t        «      j                  t        dd«      k(  rŒUJ ‚ y)zCreate our new "cos" function.c                   ó$   — e Zd Zdd„Zed„ «       Zy)ú+test_function_series2.<locals>.my_function2c                 ó4   — t        | j                  d   «       S r   )r	   r   r   s     r   r   z1test_function_series2.<locals>.my_function2.fdiff+   s   € Ü˜DŸI™I a™LÓ)Ð)Ð)r   c                 ó:   — t        |«      }|dk(  rt        d«      S y )Nr   r   r   r   s     r   r   z0test_function_series2.<locals>.my_function2.eval.   r   r   Nr   r    r%   r   r   Úmy_function2r-   )   s   „ ó*ð ñ&ó ñ&r   r0   r   r'   N)r   r   r   r(   r   )r)   r0   s     r   Útest_function_series2r1   $   sZ   € ô œÐ(ò Kˆô		&˜1ô 		&ñ œA‹×%Ñ%¤a¨¨BÓ/´3´q³6·=±=ÄÀAÀrÓ3JÓJÐJÐJñKr   c                  óÚ   ‡— t         t        fD ][  }  G ˆfd„d| «      Št        t        «      } ‰t        «      }|j	                  t        dd«      |j	                  t        dd«      k(  rŒ[J ‚ y)a_  
    Test our easy "tanh" function.

    This test tests two things:
      * that the Function interface works as expected and it's easy to use
      * that the general algorithm for the series expansion works even when the
        derivative is defined recursively in terms of the original function,
        since tanh(x).diff(x) == 1-tanh(x)**2
    c                   ó*   •— e Zd Zdˆ fd„	Zed„ «       Zy)ú%test_function_series3.<locals>.mytanhc                 ó:   •— d ‰| j                   d   «      dz  z
  S )Nr   r   é   )r   )r   r   Úmytanhs     €r   r   z+test_function_series3.<locals>.mytanh.fdiffG   s    ø€ Ø™6 $§)¡)¨A¡,Ó/°Ñ2Ñ2Ð2r   c                 ó:   — t        |«      }|dk(  rt        d«      S y r   r   r   s     r   r   z*test_function_series3.<locals>.mytanh.evalJ   r   r   Nr   r    )r7   s   €r   r7   r4   E   s   ø„ õ3ð ñ&ó ñ&r   r7   r   é   N)r   r   r   r   r(   )r)   ÚeÚfr7   s      @r   Útest_function_series3r<   8   sa   ø€ ô œÐ(ò 6ˆö		&�Qô 		&ô ”‹GˆÙ”1‹IˆØ�x‰xœ˜1˜aÓ  A§H¡H¬Q°°1Ó$5Ó5Ð5Ð5ñ6r   N)Úsympy.core.functionr   r   Úsympy.core.sympifyr   Ú%sympy.functions.elementary.hyperbolicr   Ú(sympy.functions.elementary.trigonometricr   r	   Úsympy.series.limitsr
   Ú	sympy.abcr   r*   r1   r<   r%   r   r   ú<module>rC      s)   ð÷ :Ý &Ý 6ß ?Ý %Ý ò2ò*Kó(6r   