| Server IP : 93.86.61.54 / Your IP : 216.73.216.206 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/mpmath/libmp/__pycache__/ |
Upload File : |
o
�"`U� � @ s� d Z ddlZddlmZ ddlmZ ddlmZmZmZmZm Z m
Z
ddlmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8 ddl9m:Z: e
d kr�d
Z;ndZ;dZ<e
d kr�dZ=nd
Z=dZ>i Z?dZ@i ZAdZBdZCi ZDdZEdZFdZGi ZHddgZIedeeB�d �D ]ZJeIeKdeJ eB�d gdeJd 7 ZIq�dd� ZLdd� ZMdd� ZNdd� ZOd�d d!�ZPeLd"d#� �ZQeLd$d%� �ZR ed&�ZSed'�ZTed(�ZUed)�ZVd*d+� ZWeLd�d,d-��ZXd.d/� ZYd0d1� ZZeLd2d3� �Z[eLd4d5� �Z\eMe\�Z]eMeX�Z^eMe[�Z_eMeY�Z`eMeQ�ZaeMeR�ZbeLd6d7� �ZceLd8d9� �ZdeMed�ZeeMec�Zfefd:d;�Zgd<d=� Zhd>d?� Ziefd@dA�ZjefdBdC�Zkd�dDdE�ZldFdG� ZmdHdI� Znd�dJdK�ZodLdM� ZpefdNdO�ZqdPdQ� ZrdRdS� ZsdTdU� ZtdVdW� ZudXdY� ZvefdZd[�Zwefd\d]�Zxefd^d_�Zyefd`da�Zzefdbdc�Z{efddde�Z|efdfdg�Z}efdhdi�Z~d�djdk�Zdldm� Z�dndo� Z�dpdq� Z�efdrds�Z�edfdtdu�Z�dvdw� Z�eddfdxdy�Z�efdzd{�Z�efd|d}�Z�efd~d�Z�efd�d��Z�efd�d��Z�efd�d��Z�efd�d��Z�efd�d��Z�efd�d��Z�d�d�d��Z�d�d�d��Z�e
d�k�rtz*ddl�m� m� m�Z� e�j4Z4e�j�Z�e�jqZqe�j�Z�e�j�Z�e�jgZge�j�Z�e�j�Z�e�jlZlW dS e�e�f�ys e�d�� Y dS w dS )�a(
This module implements computation of elementary transcendental
functions (powers, logarithms, trigonometric and hyperbolic
functions, inverse trigonometric and hyperbolic) for real
floating-point numbers.
For complex and interval implementations of the same functions,
see libmpc and libmpi.
� N)�bisect� )�xrange)�MPZ�MPZ_ZERO�MPZ_ONE�MPZ_TWO�MPZ_FIVE�BACKEND)-�round_floor�
round_ceiling�
round_down�round_up�
round_nearest�
round_fast�
ComplexResult�bitcount�bctable�lshift�rshift�giant_steps�
sqrt_fixed�from_int�to_int�from_man_exp�to_fixed�to_float�
from_float�
from_rational� normalize�fzero�fone�fnone�fhalf�finf�fninf�fnan�mpf_cmp�mpf_sign�mpf_abs�mpf_pos�mpf_neg�mpf_add�mpf_sub�mpf_mul�mpf_div� mpf_shift�mpf_rdiv_int�mpf_pow_int�mpf_sqrt�reciprocal_rnd�negative_rnd�mpf_perturb�
isqrt_fast)�ifib�python�X i� i� �� � i� i� � � i� � � � c s, d� _ d� _� fdd�}� j|_� j|_|S )z�
Decorator for caching computed values of mathematical
constants. This decorator should be applied to a
function taking a single argument prec as input and
returning a fixed-point value with the given precision.
���Nc sR � j }| |kr� j|| ? S t| d d �}� |fi |��� _|� _ � j|| ? S )Ng�������?�
)� memo_prec�memo_val�int)�prec�kwargsrD �newprec��f� �8/usr/lib/python3/dist-packages/mpmath/libmp/libelefun.py�g^ s zconstant_memo.<locals>.g)rD rE �__name__�__doc__)rK rN rL rJ rM �
constant_memoU s rQ c s t f� fdd� }� j|_|S )z�
Create a function that computes the mpf value for a mathematical
constant, given a function that computes the fixed-point value.
Assumptions: the constant is positive and has magnitude ~= 1;
the fixed-point function rounds to floor.
c s<