o
    h2                     @   s  d dl mZmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZmZ ed\ZZedZed	Zeeed
d Zeeedd Zeeedd Zeeedd Zeeedd Zeeedd Zeeedd Zeeedd ZdS )    )BasicExpr)oo)symbols)
Dispatcher)set_mul)IntervalSetzx y_set_mul_set_divc                 C      d S N xyr   r   M/var/www/html/ai/venv/lib/python3.10/site-packages/sympy/sets/handlers/mul.py_      r   c                 C   r   r   r   r   r   r   r   r      r   c                 C   s   | | S r   r   r   r   r   r   r         c                 C   s   | j |j  t| jp|jf| j |j t| jp|jf| j|j  t| jp%|jf| j|j t| jp2|jff}t|\}}t|\}}t||||S )zf
    Multiplications in interval arithmetic
    https://en.wikipedia.org/wiki/Interval_arithmetic
    )startbool	left_openend
right_openminmaxr   )r   r   comvalsminvalminopenmaxvalmaxopenr   r   r   r      s   c                 C   r   r   r   r   r   r   r   r   3   r   c                 C   s   | | S r   r   r   r   r   r   r   7   r   c                 C   r   r   r   r   r   r   r   r   ;   r   c                 C   sh   |j |j jrtt tS |j dkrt}nd|j  }|jdkr#t }nd|j }t| t|||j|jS )z`
    Divisions in interval arithmetic
    https://en.wikipedia.org/wiki/Interval_arithmetic
    r      )r   r   is_negativer   r   r   r   r   )r   r   s2s1r   r   r   r   ?   s   



N)
sympy.corer   r   sympy.core.numbersr   sympy.core.symbolr   sympy.multipledispatchr   sympy.sets.setexprr   sympy.sets.setsr   r	   _x_yr
   r   registerr   r   r   r   r   <module>   s2    














