Skip to content

ChineseRemainder

The smallest non-negative integer congruent to each ri modulo the corresponding mi.

ChineseRemainder([r1, r2, …], [m1, m2, …])smallest non-negative with for every .

Domain: Number theory

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