fix rationalApproximation on numbers which are within `accuracy` of an int already

rationalApproximation halts its algorithm when it gets within the desired range of a whole number. If the number you feed in is already within that range but not exactly an integer, it had no steps to reconstruct and returned [1,0]. Now it correctly returns [n,1].