in reply to Re^3: Determining if a rational number terminatesin thread Determining if a rational number terminates
Actually, if you fix up the whitespace and rename the functions:
... it's not too bad.