o
    8Va                     @   sl   d dl mZ d dlmZmZmZmZmZmZm	Z	m
Z
mZ d dlmZ edddZdd Zd	d
 Zdd ZdS )    )parse_maxima)	RationalAbsSymbolsincosEoolog	factorial)xnTZintegerc                   C   sR   t tdd dk sJ tddksJ tdtddksJ td	d
ks'J d S )Nz
float(1/3)gTUU?h㈵>z13^26l   	\4'r#J zsin(%pi/2) + cos(%pi/3)      zlog(%e)   )r   r   r    r   r   A/usr/lib/python3/dist-packages/sympy/parsing/tests/test_maxima.pytest_parser   s   r   c                   C   s<   t dt d ttd ksJ t dt d tdksJ d S )Nzc: x+1)globalsr   zg: sqrt(81)	   )r   r   cr   gr   r   r   r   test_injection   s   r   c                   C   s  t dtd dt  d ksJ t dtd d ksJ t ddttd  ttd  ks0J t dddttd   dtt tt  ksJJ t dd	dgksTJ t d
tks\J t dt u seJ t dtt dtt  ksuJ t dttdddtdddddt	d t	 d ksJ t dttdddtdddddt
t	ksJ t dtd ksJ tt dd dk sJ d S )Nzexpand( (x+1)^2)r   r   zfactor( x**2 + 2*x + 1)z2*cos(x)^2 + sin(x)^2ztrigexpand(sin(2*x)+cos(2*x))zsolve(x^2-4,x)zlimit((1+1/x)^x,x,inf)zlimit(sqrt(-x)/x,x,0,minus)zdiff(x^x, x)zsum(k, k, 1, n)r   Tr   k)r   r   )Z	name_dictzproduct(k, k, 1, n)zratsimp((x^2-1)/(x+1))zfloat(sec(%pi/3) + csc(%pi/3))gȢ<	@r   )r   r   r   r   r   r	   r
   dictr   r   r   r   r   r   r   r   test_maxima_functions   s<    (& 



r   N)Zsympy.parsing.maximar   Zsympyr   r   r   r   r   r   r	   r
   r   Z	sympy.abcr   r   r   r   r   r   r   r   r   <module>   s    ,
