a
    QeF                     @   sN   d Z zddlZW n ey"   Y n0 dd Zdd Zdd Zed	krJe  dS )
z-Precompute series coefficients for log-Gamma.    Nc                 C   sF   t d( dd td| d D }W d    n1 s80    Y  |S )Nd   c                 S   s.   g | ]&}t d | d | d | d   qS )      )mpmathZ	bernoulli).0n r   V/var/www/sunrise/env/lib/python3.9/site-packages/scipy/special/_precompute/loggamma.py
<listcomp>   s   z#stirling_series.<locals>.<listcomp>r   )r   workdpsrange)Ncoeffsr   r   r	   stirling_series	   s
    $r   c                 C   sp   g }t dN |t j  td| d D ] }|d| t | |  q,W d    n1 sb0    Y  |S )Nr   r   r   )r   r   appendZeulerr   zeta)r   r   r   r   r   r	   taylor_series_at_1   s    <r   c                  C   s   t t t   dd tdd d d D } dd tdd d d D }t d t d t d	|  t   t d
 t d t d	| t   d S )Nc                 S   s   g | ]}t j|d dddqS    r   )Z	min_fixedZ	max_fixedr   Znstrr   xr   r   r	   r
      s   zmain.<locals>.<listcomp>   r   c                 S   s   g | ]}t j|d dddqS r   r   r   r   r   r	   r
      s      zStirling series coefficientsz----------------------------
zTaylor series coefficientsz--------------------------)print__doc__r   r   join)Zstirling_coeffsZtaylor_coeffsr   r   r	   main   s     r   __main__)r   r   ImportErrorr   r   r   __name__r   r   r   r	   <module>   s   	