§
    fŠtjw  ã                   óT   — 	 d dl Zn# e$ r Y nw xY w	 d dlmZ n# e$ r Y nw xY wd„ ZdS )é    N©Úxc                 óN  ‡ — t          ‰ ¦  «        }t          ˆ fd„t          |¦  «        D ¦   «         ¦  «        }t          |z                       t          d|¦  «                             ¦   «         }|dz  g}t          |¦  «        D ]2}|                     |d         |z                       ¦   «         ¦  «         Œ3t          j	        d¦  «        g}t          d|¦  «        D ]<}|                     ||          
                    t          |dz
  ¦  «        |z  ¦  «         Œ=d„ |D ¦   «         }|S )a”  Given a series

    f(x) = a[1]*x + a[2]*x**2 + ... + a[n-1]*x**(n - 1),

    use the Lagrange inversion formula to compute a series

    g(x) = b[1]*x + b[2]*x**2 + ... + b[n-1]*x**(n - 1)

    so that f(g(x)) = g(f(x)) = x mod x**n. We must have a[0] = 0, so
    necessarily b[0] = 0 too.

    The algorithm is naive and could be improved, but speed isn't an
    issue here and it's easy to read.

    c              3   ó>   •K  — | ]}‰|         t           |z  z  V — Œd S )Nr   )Ú.0ÚiÚas     €ú]/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/scipy/special/_precompute/utils.pyú	<genexpr>z%lagrange_inversion.<locals>.<genexpr>   s/   øè è € Ð(Ð(˜!ˆAˆaŒD•�A‘‰IÐ(Ð(Ð(Ð(Ð(Ð(ó    r   éÿÿÿÿé   c                 ó6   — g | ]}t          j        |¦  «        ‘ŒS © )ÚmpÚmpf)r   r   s     r
   ú
<listcomp>z&lagrange_inversion.<locals>.<listcomp>%   s    € ÐÐÐ�q�Œ�‰ŒÐÐÐr   )ÚlenÚsumÚranger   ÚseriesÚremoveOÚappendÚexpandr   r   Úcoeff)r	   ÚnÚfÚhÚhpowerÚkÚbs   `      r
   Úlagrange_inversionr"      s  ø€ õ  	ˆA‰Œ€AÝÐ(Ð(Ð(Ð(�u Q™xœxÐ(Ñ(Ô(Ñ(Ô(€AÝ	
ˆ1‰�Š•Q˜˜1ÑÔ×%Ò%Ñ'Ô'€AØ�‰dˆV€FÝ�1‰XŒXð /ð /ˆØ�Š�v˜b”z !‘|×+Ò+Ñ-Ô-Ñ.Ô.Ð.Ð.Ý	Œ�‰Œˆ€AÝ�1�a‰[Œ[ð .ð .ˆØ	�Š�˜”—’¥ A¨¡EÑ*Ô*¨1Ñ,Ñ-Ô-Ð-Ð-ØÐ˜AÐÑÔ€AØ€Hr   )Úmpmathr   ÚImportErrorÚ	sympy.abcr   r"   r   r   r
   ú<module>r&      sŒ   ðð	ØÐÐÐÐøØð 	ð 	ð 	Ø€Dð	øøøð	ØÐÐÐÐÐÐøØð 	ð 	ð 	Ø€Dð	øøøðð ð ð ð s   ‚ ‡Ž“ š"¡"