Continued fraction
Comparison

Consider x = and y =. If k is the smallest index for which a is unequal to b then x < y if (−1) (a − b) < 0 and y < x otherwise.

If there is no such k, but one expansion is shorter than the other, say x = and y = with a = b for 0 ≤ i ≤ n, then x < y if n is even and y < x if n is odd.
keywords:forbidden_words