(self, rhs)
return self._abs_gt(rhs)
Greater than.
Greater than.
Greater than .
def gt(self, rhs):
        """Greater than."""
        if isinstance(rhs, Integer):
            # upgrade rhs to Float
            return self.gt(self.new().from_integer(rhs))
        elif isinstance(rhs, Double) and isinstance(self, Single):
            # upgrade to Double
            return Double(None, self._values).from_single(self).gt(rhs)
        rhsneg = rhs.is_negative()
        # treat zero separately to avoid comparing different mantissas
        # zero is only greater than negative
        if self.is_zero():
            return bool(rhsneg) and not rhs.is_zero()
        isneg = self.is_negative()
        if isneg != rhsneg:
            return not(isneg)
        if isneg:
            return rhs._abs_gt(self)
        return self._abs_gt(rhs)
def gt ( self , rhs ) : if isinstance ( rhs , Integer ) : # upgrade rhs to Float return self . gt ( self . new ( ) . from_integer ( rhs ) ) elif isinstance ( rhs , Double ) and isinstance ( self , Single ) : # upgrade to Double return Double ( None , self . _values ) . from_single ( self ) . gt ( rhs ) rhsneg = rhs . is_negative ( ) # treat zero separately to avoid comparing different mantissas # zero is only greater than negative if self . is_zero ( ) : return bool ( rhsneg ) and not rhs . is_zero ( ) isneg = self . is_negative ( ) if isneg != rhsneg : return not ( isneg ) if isneg : return rhs . _abs_gt ( self ) return self . _abs_gt ( rhs )