# chinese remainder theorem Algorithm

The Chinese remainder theorem is widely used for compute with large integers, as it lets replace a calculation for which one knows a bound on the size of the consequence by several like calculations on small integers. In number theory, the Chinese remainder theorem states that if one knows the remainders of the euclidean division of an integer N by several integers, then one can determine uniquely the remainder of the division of N by the merchandise of these integers, under the condition that the divisors are pairwise coprime.
The consequence was later generalized with a complete solution named Ta-yan-shu (大衍術) in Ch'in Chiu-shao's 1247 mathematical Treatise in Nine section (數書九章, Shu-shu Chiu-chang) which was translated into English in early 19th century by British missionary Alexander Wylie. The earliest known statement of the theorem, as a problem with specific numbers, looks in the 3rd-century book sun-tzu Suan-ching by the Chinese mathematician sun-tzu: Special cases of the Chinese remainder theorem were also known to Brahmagupta (7th century), and look in Fibonacci's Liber Abaci (1202).

### chinese remainder theorem source code, pseudocode and analysis

COMING SOON!