def combinable?(x, operator)
      case operator
      when :+
        (num? && x.num?) ||
        (formula?(:*) && (f.num? || g.num?)) && x.num? ||
        like_term?(x) ||
        inverse?(:+, x)
      when :*
        self == x ||
        (num? && x.num?) ||
        inverse?(:*, x)
      when :**
        (num? && x.num?) || zero? || one?
      end
    end
def combinable?(x, operator)
      case operator
      when :+
        (num? && x.num?) ||
        (formula?(:*) && (f.num? || g.num?)) && x.num? ||
        like_term?(x) ||
        inverse?(:+, x)
      when :*
        self == x ||
        (num? && x.num?) ||
        inverse?(:*, x)
      when :**
        (num? && x.num?) || zero? || one?
      end
    end
TODO: Cyclomatic complexity for combinable? is too high. [17/6]