
    ^Mh                         d Z ddlZ	 ddlZddlmZ  ej        d          Zn# e$ r Y nw xY wd ZdZd Z	e
dk    r e	             dS dS )	zPrecompute the polynomials for the asymptotic expansion of the
generalized exponential integral.

Sources
-------
[1] NIST, Digital Library of Mathematical Functions,
    https://dlmf.nist.gov/8.20#ii

    N)Polyxc           	      J   t          dt                    g}t          |           D ]|}|                    t          dd|z  t          z  z
  t                    ||         z  t          t          t          dz   z            ||                                         z  z              }|S )N      )r   r   rangeappenddiff)KAks      b/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/scipy/special/_precompute/expn_asy.py
generate_Ar      s    	aA1XX H H	a!A#a%i##AaD(41q5	??1Q499;;+FFGGGGH    ze/* This file was automatically generated by _precompute/expn_asy.py.
 * Do not edit it manually!
 */
c                  F   t          t                     t          j                            ddd          } d}t          |          }t          | dz   d          5 }|                    t                     |                    dt          |           d           t          |          D ]O\  }}d	                    d
 |                                D                        |                    d| d           Pd	                    d t          |dz             D                        |                    d           d	                    d |D                        |                    d           d d d            n# 1 swxY w Y   t          j        | dz   |            d S )Nz..cepheszexpn.h   z.newwz#define nA 
z, c                 R    g | ]$}t          |                    d                     %S )   )strevalf).0r   s     r   
<listcomp>zmain.<locals>.<listcomp>,   s*    ===As1772;;''===r   zstatic const double Az[] = {tmp};
c                     g | ]}d | S )r    )r   r   s     r   r   zmain.<locals>.<listcomp>.   s    111q7q77111r   r   z$static const double *A[] = {{tmp}};
c                 P    g | ]#}t          |                                          $S r   )r   degree)r   Aks     r   r   zmain.<locals>.<listcomp>0   s(    0003ryy{{##000r   z$static const int Adegs[] = {{tmp}};
)print__doc__ospathjoinr   openwriteWARNINGlen	enumeratecoeffsr   rename)fnr   r   fr   r    s         r   mainr/   "   s   	'NNN	dHh	/	/B
A1A	b6k3		 	91		(c!ff((()))q\\ 	@ 	@EArII=====>>>GG>A>>>????		11E!a%LL111222	7888		00a000111	7888	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 Ib6k2s   DE>>FF__main__)r"   r#   sympyr   symbolsr   ImportErrorr   r(   r/   __name__r   r   r   <module>r5      s     
				LLLcAA 	 	 	D	    & zDFFFFF s   # ++