MCPcopy Index your code
hub / github.com/python/cpython / _dec_from_triple

Function _dec_from_triple

Lib/_pydecimal.py:3811–3825  ·  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

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

Callers 15

standard_ulpMethod · 0.90
check_ulpdiffMethod · 0.90
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

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…