§
    «³Ùg  ã                   ód   — d dl 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d
S )é    )ÚFunction©Úsympify)Útanh)ÚcosÚsin)Úlimit)Úxc                  óH  —  G d„ dt           ¦  «        }  | t          ¦  «                             t          dd¦  «        t          t          ¦  «                             t          dd¦  «        k    sJ ‚t	           | t          ¦  «        t          z  t          d¦  «        dk    sJ ‚dS )zCreate our new "sin" function.c                   ó,   — e Zd Zdd„Zed„ ¦   «         ZdS )ú*test_function_series1.<locals>.my_functioné   c                 ó6   — t          | j        d         ¦  «        S ©Nr   )r   Úargs©ÚselfÚargindexs     úe/granary/edev/quantum/lib/python3.11/site-packages/sympy/functions/elementary/tests/test_interface.pyÚfdiffz0test_function_series1.<locals>.my_function.fdiff   s   € Ý�t”y ”|Ñ$Ô$Ð$ó    c                 óN   — t          |¦  «        }|dk    rt          d¦  «        S d S r   r   ©ÚclsÚargs     r   Úevalz/test_function_series1.<locals>.my_function.eval   ó)   € å˜#‘,”,ˆCØ�aŠxˆxÝ˜q‘z”zÐ!ð ˆxr   N©r   ©Ú__name__Ú
__module__Ú__qualname__r   Úclassmethodr   © r   r   Úmy_functionr      sC   € € € € € ð	%ð 	%ð 	%ð 	%ð 
ð	"ð 	"ñ 
Œð	"ð 	"ð 	"r   r%   r   é
   r   N)r   r
   Úseriesr   r	   )r%   s    r   Útest_function_series1r(      sŸ   € ð	"ð 	"ð 	"ð 	"ð 	"•hñ 	"ô 	"ð 	"ð ˆ;•q‰>Œ>× Ò ¥ A rÑ*Ô*­cµ!©f¬f¯mªm½A¸qÀ"Ñ.EÔ.EÒEÐEÐEÐEÝ���Q‘”¥Ñ!¥1 aÑ(Ô(¨AÒ-Ð-Ð-Ð-Ð-Ð-r   c                  óä   —  G d„ dt           ¦  «        }  | t          ¦  «                             t          dd¦  «        t          t          ¦  «                             t          dd¦  «        k    sJ ‚dS )zCreate our new "cos" function.c                   ó,   — e Zd Zdd„Zed„ ¦   «         ZdS )ú+test_function_series2.<locals>.my_function2r   c                 ó8   — t          | j        d         ¦  «         S r   )r   r   r   s     r   r   z1test_function_series2.<locals>.my_function2.fdiff#   s   € Ý˜œ	 !œÑ%Ô%Ð%Ð%r   c                 óN   — t          |¦  «        }|dk    rt          d¦  «        S d S )Nr   r   r   r   s     r   r   z0test_function_series2.<locals>.my_function2.eval&   r   r   Nr   r   r$   r   r   Úmy_function2r+   !   sC   € € € € € ð	&ð 	&ð 	&ð 	&ð 
ð	"ð 	"ñ 
Œð	"ð 	"ð 	"r   r.   r   r&   N)r   r
   r'   r   )r.   s    r   Útest_function_series2r/      su   € ð	"ð 	"ð 	"ð 	"ð 	"•xñ 	"ô 	"ð 	"ð ˆ<�‰?Œ?×!Ò!¥! Q¨Ñ+Ô+­sµ1©v¬v¯}ª}½QÀÀ2Ñ/FÔ/FÒFÐFÐFÐFÐFÐFr   c                  óò   ‡—  G ˆfd„dt           ¦  «        Št          t          ¦  «        }  ‰t          ¦  «        }|                      t          dd¦  «        |                     t          dd¦  «        k    sJ ‚dS )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                   ó2   •— e Zd Zdˆ fd„	Zed„ ¦   «         ZdS )ú%test_function_series3.<locals>.mytanhr   c                 ó<   •— d ‰| j         d         ¦  «        dz  z
  S )Nr   r   é   )r   )r   r   Úmytanhs     €r   r   z+test_function_series3.<locals>.mytanh.fdiff=   s#   ø€ Ø�v�v˜dœi¨œlÑ+Ô+¨QÑ.Ñ.Ð.r   c                 óN   — t          |¦  «        }|dk    rt          d¦  «        S d S r   r   r   s     r   r   z*test_function_series3.<locals>.mytanh.eval@   r   r   Nr   r   )r5   s   €r   r5   r2   ;   sN   ø€ € € € € ð	/ð 	/ð 	/ð 	/ð 	/ð 	/ð 
ð	"ð 	"ñ 
Œð	"ð 	"ð 	"r   r5   r   é   N)r   r   r
   r'   )ÚeÚfr5   s     @r   Útest_function_series3r:   0   sˆ   ø€ ð	"ð 	"ð 	"ð 	"ð 	"ð 	"ð 	"•ñ 	"ô 	"ð 	"õ 	�Q‰Œ€AØˆ�q‰	Œ	€AØ�8Š8•A�q˜!ÑÔ §¢­¨A¨qÑ 1Ô 1Ò1Ð1Ð1Ð1Ð1Ð1r   N)Úsympy.core.functionr   Úsympy.core.sympifyr   Ú%sympy.functions.elementary.hyperbolicr   Ú(sympy.functions.elementary.trigonometricr   r   Úsympy.series.limitsr	   Ú	sympy.abcr
   r(   r/   r:   r$   r   r   ú<module>rA      s³   ðð )Ð (Ð (Ð (Ð (Ð (Ø &Ð &Ð &Ð &Ð &Ð &Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø %Ð %Ð %Ð %Ð %Ð %Ø Ð Ð Ð Ð Ð ð.ð .ð .ð&Gð Gð Gð$2ð 2ð 2ð 2ð 2r   