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

Method copy_sign

Lib/_pydecimal.py:2995–2999  ·  view source on GitHub ↗

Returns self with the sign of other.

(self, other, context=None)

Source from the content-addressed store, hash-verified

2993 return _dec_from_triple(1, self._int, self._exp, self._is_special)
2994
2995 def copy_sign(self, other, context=None):
2996 """Returns self with the sign of other."""
2997 other = _convert_other(other, raiseit=True)
2998 return _dec_from_triple(other._sign, self._int,
2999 self._exp, self._is_special)
3000
3001 def exp(self, context=None):
3002 """Returns e ** self."""

Callers 4

next_towardMethod · 0.95
copy_signMethod · 0.45
test_copy_signMethod · 0.45
test_implicit_contextMethod · 0.45

Calls 2

_convert_otherFunction · 0.85
_dec_from_tripleFunction · 0.85

Tested by 2

test_copy_signMethod · 0.36
test_implicit_contextMethod · 0.36