I see -- obviously the end result that we want here is not the same as `limit_denominator`, since we don't want to convert *everything* to Fraction, but I can see how it might be clearer to use it for the "temporary" here.

The power of 2 test is exact, and also results in a float, which is why it is handled separately.