Hmm, that definition of rationalize is completely different from ours, which was also written by Gosper but is not completely implementation-independent. Are you sure yours satisfies the axiom (float (rationalize x) x) = x? Am I sure ours does? Does anybody have a test suite for rationalize?