$33 GRAYBYTE WORDPRESS FILE MANAGER $62

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib/python3.7/site-packages/future/builtins/__pycache__/

HOME
Current File : /opt/alt/python37/lib/python3.7/site-packages/future/builtins/__pycache__//newround.cpython-37.pyc
B

�A�[�@sDdZddlmZmZmZddlmZmZd	dd�Zdd�Z	dgZ
dS)
zD
``python-future``: pure Python implementation of Python 3 round().
�)�PYPY�PY26�bind_method)�Decimal�ROUND_HALF_EVENNcCs�d}|dkrd}d}t|d�r(|�|�S|dkr8td��td�|}trbdtt|��krbt|�}ts|t�	|�j
|td	�}nt|�j
|td	�}|r�t
|�St|�SdS)
a�
    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.
    FNTr�	__round__z"negative ndigits not supported yet�10�numpy)Zrounding)�hasattrr�NotImplementedErrorrr�repr�type�floatrZ
from_floatZquantizer�
from_float_26�int)�number�ndigitsZ
return_int�exponent�d�r�I/opt/alt/python37/lib/python3.7/site-packages/future/builtins/newround.py�newrounds&



rc	Cs�ddl}ddlm}t|ttf�r*t|�S|�|�s>|�|�rJtt	|��S|�
d|�dkr`d}nd}t|���\}}dd�}||�d}||t
|d|�|�}|S)	a�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')

    rN)�_dec_from_tripleg�?�cSs$|dkrttt|���dSdSdS)Nr�)�len�bin�abs)rrrr�
bit_lengthYsz!from_float_26.<locals>.bit_length�)�math�decimalr�
isinstancer�longr�isinf�isnanr�copysignr�as_integer_ratio�str)	�fZ_mathr�sign�nrr�k�resultrrrr7sr)N)�__doc__Zfuture.utilsrrrr!rrrr�__all__rrrr�<module>s

+,


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 11.10 PM
root / linksafe
0755
__init__.cpython-37.opt-1.pyc
1.201 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
__init__.cpython-37.pyc
1.201 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
disabled.cpython-37.opt-1.pyc
2.293 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
disabled.cpython-37.pyc
2.293 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
iterators.cpython-37.opt-1.pyc
1.468 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
iterators.cpython-37.pyc
1.468 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
misc.cpython-37.opt-1.pyc
2.708 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
misc.cpython-37.pyc
2.708 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
newnext.cpython-37.opt-1.pyc
1.944 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
newnext.cpython-37.pyc
1.944 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
newround.cpython-37.opt-1.pyc
2.698 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
newround.cpython-37.pyc
2.698 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
newsuper.cpython-37.opt-1.pyc
2.773 KB
14 Nov 2023 12.35 PM
root / linksafe
0644
newsuper.cpython-37.pyc
2.773 KB
14 Nov 2023 12.35 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF