MCPcopy Index your code
hub / github.com/RustPython/RustPython / _dec_from_triple

Function _dec_from_triple

Lib/_pydecimal.py:3808–3822  ·  view source on GitHub ↗

Create a decimal instance directly, without any validation, normalization (e.g. removal of leading zeros) or argument conversion. This function is for *internal use only*.

(sign, coefficient, exponent, special=False)

Source from the content-addressed store, hash-verified

3806 return _format_number(adjusted_sign, intpart, fracpart, exp, spec)
3807
3808def _dec_from_triple(sign, coefficient, exponent, special=False):
3809 """Create a decimal instance directly, without any validation,
3810 normalization (e.g. removal of leading zeros) or argument
3811 conversion.
3812
3813 This function is for *internal use only*.
3814 """
3815
3816 self = object.__new__(Decimal)
3817 self._sign = sign
3818 self._int = coefficient
3819 self._exp = exponent
3820 self._is_special = special
3821
3822 return self
3823
3824# Register Decimal as a kind of Number (an abstract base class).
3825# However, do not register it as Real (because Decimals are not

Callers 15

handleMethod · 0.85
handleMethod · 0.85
from_floatMethod · 0.85
__add__Method · 0.85
__mul__Method · 0.85
__truediv__Method · 0.85
_divideMethod · 0.85
remainder_nearMethod · 0.85
_fix_nanMethod · 0.85
_fixMethod · 0.85
__round__Method · 0.85
fmaMethod · 0.85

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected