(self, context=None)
return ans._fix(context)
Returns a copy with the sign switched.

        Rounds, if it has reason.
Returns a copy with the sign switched.
Returns a copy with the sign switched .
def __neg__(self, context=None):
        """Returns a copy with the sign switched.

        Rounds, if it has reason.
        """
        if self._is_special:
            ans = self._check_nans(context=context)
            if ans:
                return ans

        if context is None:
            context = getcontext()

        if not self and context.rounding != ROUND_FLOOR:
            # -Decimal('0') is Decimal('0'), not Decimal('-0'), except
            # in ROUND_FLOOR rounding mode.
            ans = self.copy_abs()
        else:
            ans = self.copy_negate()

        return ans._fix(context)
def __neg__ ( self , context = None ) : if self . _is_special : ans = self . _check_nans ( context = context ) if ans : return ans if context is None : context = getcontext ( ) if not self and context . rounding != ROUND_FLOOR : # -Decimal('0') is Decimal('0'), not Decimal('-0'), except # in ROUND_FLOOR rounding mode. ans = self . copy_abs ( ) else : ans = self . copy_negate ( ) return ans . _fix ( context )