Respected Mathematicians, Suppose we are given 10 remainders each of 10 digits for given ten distinct prime bases each of 10 digits. Find the rational number that corresponds to these remainders in the specified prime bases using Matlab. Observe that the rational number could consist more than 40 digits in numerator as well as those in denominator. Standard precision of Matlab does not allow more than 16 digits. But vpa (variable precision arithmetic) in Matlab will allow much more than 16 digits.

Consider, for example, the remainders 1, 1, 2 corresponding to the prime bases 3, 5, 7, respectively. What will be the rational number? The answer is 16. I would like to know the generalization of this part, especially about the rationals.

Thanking you all.