Pairing functions between naturals and (positive) rationals, e.g. Cantor: these are bijective, and are interesting in themselves, and can also be used for rational enumeration, e.g. sequences.rationals instead of the math.gcd(x, y) == 1 check, which is probably slower.