Implement fractional GCD and LCM (slightly different from formal definitions), and document and unit test them.