def __ne__(self, other): other = Basic.sympify(other) if isinstance(other, NumberSymbol): if other.is_irrational: return True return other.__ne__(self) if other.is_comparable: other = other.evalf() if isinstance(other, Number): return bool(self._as_decimal()!=other._as_decimal()) return RelMeths.__ne__(self, other)
def __ne__(self, other): other = Basic.sympify(other) if self is other: return False if isinstance(other, Number) and self.is_irrational: return True return RelMeths.__ne__(self, other)