def to_quotient
      if @special
        y = 0
        case @special
        when :nan
          x = 0
        when :inf
          x = @sign
        end
        return [x, y]
      end

      n = @digits.size
      a = 0
      b = a

      repeat = @repeat
      repeat = nil if repeat && repeat >= n

      for i in 0...n
        a *= @radix
        a += @digits[i]
        if repeat && i < repeat
          b *= @radix
          b += @digits[i]
        end
      end

      x = a
      x -= b if repeat

      y = @radix**(n - @point)
      y -= @radix**(repeat - @point) if repeat

      d = Numerals.gcd(x, y)
      x /= d
      y /= d

      x = -x if @sign < 0

      [x.to_i, y.to_i]
    end
def to_quotient
      if @special
        y = 0
        case @special
        when :nan
          x = 0
        when :inf
          x = @sign
        end
        return [x, y]
      end

      n = @digits.size
      a = 0
      b = a

      repeat = @repeat
      repeat = nil if repeat && repeat >= n

      for i in 0...n
        a *= @radix
        a += @digits[i]
        if repeat && i < repeat
          b *= @radix
          b += @digits[i]
        end
      end

      x = a
      x -= b if repeat

      y = @radix**(n - @point)
      y -= @radix**(repeat - @point) if repeat

      d = Numerals.gcd(x, y)
      x /= d
      y /= d

      x = -x if @sign < 0

      [x.to_i, y.to_i]
    end
Return a quotient (Rational) that represents the exact value of the numeral.
 The quotient is returned as an Array, so that fractions with a zero denominator
 can be handled (representing indefinite or infinite numbers).