ChineseRemainder
The smallest non-negative integer congruent to each ri modulo the corresponding mi.
Wikipedia
Chinese remainder theoremMathWorldChineseRemainderTheoremWikidataQ193878Encyclopedia of MathematicsChinese_remainder_theoremBritannicatopic/Chinese-remainder-theoremWolfram LanguageChineseRemainder✓Rosetta CodeChinese remainder theoremChineseRemainder([r1, r2, …], [m1, m2, …])smallest non-negative Details
- When the moduli are pairwise coprime, the result is unique modulo
by the Chinese remainder theorem. - A solution exists for non-coprime moduli only when the remainders agree on every shared factor; otherwise the system is inconsistent.
- compute-engine leaves inconsistent systems unevaluated rather than raising an error.
- compute-engine only supports the 2-argument form.
Examples
See also: Mod