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

Method copy_negate

Lib/_pydecimal.py:2988–2993  ·  view source on GitHub ↗

Returns a copy with the sign inverted.

(self)

Source from the content-addressed store, hash-verified

2986 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2987
2988 def copy_negate(self):
2989 """Returns a copy with the sign inverted."""
2990 if self._sign:
2991 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2992 else:
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."""

Callers 5

__neg__Method · 0.95
__pow__Method · 0.95
__sub__Method · 0.45
copy_negateMethod · 0.45
test_implicit_contextMethod · 0.45

Calls 1

_dec_from_tripleFunction · 0.85

Tested by 1

test_implicit_contextMethod · 0.36