/usr/local/lib/python3.9/site-packages/future/builtins/__pycache__
NameSizeModeActions
disabled.cpython-39.pyc23210644editdlrm
iterators.cpython-39.pyc14980644editdlrm
misc.cpython-39.pyc30490644editdlrm
newnext.cpython-39.pyc20160644editdlrm
newround.cpython-39.pyc27860644editdlrm
newsuper.cpython-39.pyc30430644editdlrm
new_min_max.cpython-39.pyc15620644editdlrm
__init__.cpython-39.pyc12260644editdlrm
Edit: /usr/local/lib/python3.9/site-packages/future/builtins/__pycache__/newround.cpython-39.pyc (2786B)
a ^Egv @sPdZddlmZddlmZmZmZddlmZm Z d ddZ dd Z dgZ dS) zD ``python-future``: pure Python implementation of Python 3 round(). )division)PYPYPY26 bind_method)DecimalROUND_HALF_EVENNcCsd}|durd}d}t|dr(||Std| }dtt|vrNt|}t|tr^|}ntsnt|}nt |}|dkrt |||}n|j |t d}|rt |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__10Znumpy)rounding)hasattrrrreprtypefloat isinstancer from_float from_float_26newroundquantizerint)numberndigitsZ return_intexponentdresultrB/usr/local/lib/python3.9/site-packages/future/builtins/newround.pyr s(     rc Csddl}ddlm}t|ttfr*t|S||s>||rJtt |S| d|dkr`d}nd}t | \}}dd}||d}||t |d|| }|S) aConverts 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)lenbinabs)rrrr bit_length_sz!from_float_26..bit_length)mathdecimalrrrlongrisinfisnanr copysignr!as_integer_ratiostr) fZ_mathrsignnrr"krrrrr=s   r)N) __doc__ __future__rZ future.utilsrrrr%rrrr__all__rrrrs   0,