def **(other)
      case other
      when Integer
        if other > 0
          num = @numerator**other
          den = @denominator**other
          self.class.new(num, den)
        elsif other < 0
          num = @denominator**-other
          den = @numerator**-other
          self.class.new(num, den)
        elsif other.zero?
          unity
        end
      else
        x, y = other.coerce(self)
        x**y
      end
    end
def **(other)
      case other
      when Integer
        if other > 0
          num = @numerator**other
          den = @denominator**other
          self.class.new(num, den)
        elsif other < 0
          num = @denominator**-other
          den = @numerator**-other
          self.class.new(num, den)
        elsif other.zero?
          unity
        end
      else
        x, y = other.coerce(self)
        x**y
      end
    end
def % (o)
    raise ZeroDivisionError, "devided by 0" if o.zero?
    den, a, = @denominator.gcd_coeff(o)
    num = (@numerator * a) % o
    q, r = num.divmod den
    raise "#@denominator can not divide #@numerator mod #{o}" unless r.zero?
    q
  end