For integers and rational numbers with terminating digit expansions, RealDigits[x] returns an ordinary list of digits. For rational numbers with non-terminating digit expansions, it yields a list of the form representing the digit sequence consisting of the followed by infinite cyclic repetitions of the . »
The base b in RealDigits need not be an integer. For any real b such that b>1, RealDigits successively finds the largest integer multiples of powers of b that can be removed while leaving a non-negative remainder.