def operate(operator, other)
      exp = operator == '/' ? -1 : 1
      if other.respond_to?(:terms)
        Unit.new(other.terms.map { |t| t ** exp } << self)
      elsif other.respond_to?(:atom)
        Unit.new([self, other ** exp])
      elsif other.is_a?(Numeric)
        self.class.new(to_hash.merge(:factor => factor.send(operator, other)))
      end
    end
def operate(operator, other)
      exp = operator == '/' ? -1 : 1
      if other.respond_to?(:terms)
        Unit.new(other.terms.map { |t| t ** exp } << self)
      elsif other.respond_to?(:atom)
        Unit.new([self, other ** exp])
      elsif other.is_a?(Numeric)
        self.class.new(to_hash.merge(:factor => factor.send(operator, other)))
      end
    end
Multiply or divide a term
 @api private