Computes the least common multiple (lcm).