§
    JŠtjÕ  ã                   ó   — dd„Z d„ ZdS )Úprintc                 ón   ‡ ‡‡‡‡— ‰sd„ Šn‰dk    rdgŠˆfd„Š‰sd„ Šn‰dk    rdgŠˆfd„Šˆ ˆˆfd„}|S )az  
    Returns a wrapped copy of *f* that monitors evaluation by calling
    *input* with every input (*args*, *kwargs*) passed to *f* and
    *output* with every value returned from *f*. The default action
    (specify using the special string value ``'print'``) is to print
    inputs and outputs to stdout, along with the total evaluation
    count::

        >>> from mpmath import *
        >>> mp.dps = 5; mp.pretty = False
        >>> diff(monitor(exp), 1)   # diff will eval f(x-h) and f(x+h)
        in  0 (mpf('0.99999999906867742538452148'),) {}
        out 0 mpf('2.7182818259274480055282064')
        in  1 (mpf('1.0000000009313225746154785'),) {}
        out 1 mpf('2.7182818309906424675501024')
        mpf('2.7182808')

    To disable either the input or the output handler, you may
    pass *None* as argument.

    Custom input and output handlers may be used e.g. to store
    results for later analysis::

        >>> mp.dps = 15
        >>> input = []
        >>> output = []
        >>> findroot(monitor(sin, input.append, output.append), 3.0)
        mpf('3.1415926535897932')
        >>> len(input)  # Count number of evaluations
        9
        >>> print(input[3]); print(output[3])
        ((mpf('3.1415076583334066'),), {})
        8.49952562843408e-5
        >>> print(input[4]); print(output[4])
        ((mpf('3.1415928201669122'),), {})
        -1.66577118985331e-7

    c                 ó   — d S ©N© ©Úvs    úN/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/mpmath/usertools.pyú<lambda>zmonitor.<locals>.<lambda>*   s   € ˜$€ ó    r   é    c                 ón   •— | \  }}t          d‰d         ›d|›d|›�¦  «         ‰dxx         dz  cc<   d S )Nzin  r   ú é   ©r   )ÚvalueÚargsÚkwargsÚincounts      €r	   Úinputzmonitor.<locals>.input-   sJ   ø€ Ø ‰LˆD�&ÝˆE G¨A¤J J J°°°°f°fÐ=Ñ>Ô>Ð>Ø�AˆJˆJŒJ˜!‰OˆJˆJ‰JˆJˆJr   c                 ó   — d S r   r   r   s    r	   r
   zmonitor.<locals>.<lambda>2   s   € ˜4€ r   c                 ó^   •— t          d‰d         ›d| ›�¦  «         ‰dxx         dz  cc<   d S )Nzout r   r   r   r   )r   Úoutcounts    €r	   Úoutputzmonitor.<locals>.output5   s<   ø€ ÝˆE ¨!¤  ¨e¨eÐ4Ñ5Ô5Ð5Ø�QˆKˆKŒK˜1ÑˆKˆK‰KˆKˆKr   c                  óH   •—  ‰| |f¦  «          ‰| i |¤Ž} ‰|¦  «         |S r   r   )r   r   r   Úfr   r   s      €€€r	   Úf_monitoredzmonitor.<locals>.f_monitored8   s=   ø€ Øˆˆt�VˆnÑÔÐØˆAˆtÐ�vÐÐˆØˆˆq‰	Œ	ˆ	Øˆr   r   )r   r   r   r   r   r   s   ``` @@r	   Úmonitorr      s¯   øøøøø€ ðN ð Ø�ˆˆØ	�'Ò	Ð	Ø�#ˆð	ð 	ð 	ð 	ð 	ð ð Ø�ˆˆØ	�7Ò	Ð	Ø�3ˆð	ð 	ð 	ð 	ð 	ðð ð ð ð ð ð ð
 Ðr   c                 óP  ‡ ‡‡‡— ‰                      d¦  «        }d‰v r‰d= ‰s‰r,t          ‰¦  «        dk    r‰s‰d         Šˆˆ fd„}n
ˆˆ ˆfd„}n‰ }ddlm}  |¦   «         } |¦   «         } |¦   «         }||z
  }	|	dk    s|r|	S t	          d¦  «        D ]�}
 |¦   «         } |¦   «           |¦   «           |¦   «           |¦   «           |¦   «           |¦   «           |¦   «           |¦   «           |¦   «           |¦   «           |¦   «         }t          |	||z
  d	z  ¦  «        }	Œ‘|	S )
zò
    Returns time elapsed for evaluating ``f()``. Optionally arguments
    may be passed to time the execution of ``f(*args, **kwargs)``.

    If the first call is very quick, ``f`` is called
    repeatedly and the best time is returned.
    Úoncer   r   c                  ó   •—  ‰‰ ¦  «        S r   r   )Úargr   s   €€r	   r
   ztiming.<locals>.<lambda>M   s   ø€ ˜˜˜#™œ€ r   c                  ó   •—  ‰‰ i ‰¤ŽS r   r   )r   r   r   s   €€€r	   r
   ztiming.<locals>.<lambda>O   s   ø€ ˜˜˜4Ð* 6Ð*Ð*€ r   )Údefault_timergš™™™™™©?é   é
   )ÚgetÚlenÚtimeitr#   ÚrangeÚmin)r   r   r   r   ÚgÚclockÚt1r   Út2ÚtÚir!   s   ```        @r	   Útimingr1   ?   s{  øøøø€ ð �:Š:�fÑÔ€DØ�ÐÐØ�6ˆNØð ˆvð Ýˆt‰9Œ9˜Š>ˆ> &ˆ>Ø�q”'ˆCØ����ˆAˆAà*Ð*Ð*Ð*Ð*Ð*ˆAˆAàˆØ-Ð-Ð-Ð-Ð-Ð-Ø€u�w„w€B�!�!‘#”#�˜%˜%™'œ'�r R¨¡U 1Øˆ4‚x€x�4€xØˆÝ�1‰XŒXð ð ˆØˆ5‰7Œ7ˆð 	
ˆ‰ŒˆˆAˆA‰CŒCˆC��‘”��A�A‘C”C�C˜˜™œ˜˜A˜A™CœC˜C  ¡¤  A A¡C¤C C¨¨©¬¨¨A¨A©C¬C¨CØˆ5‰7Œ7ˆÝ
ˆa��B‘˜‘
Ñ
Ô
ˆˆØ€Hr   N)r   r   )r   r1   r   r   r	   ú<module>r2      s3   ðð;ð ;ð ;ð ;ðzð ð ð ð r   