Support for gcd and lcm of rational numbers.