Documentation / CalcMe

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • Wiris Quizzes

      • Learning Lemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Home
                    • CalcMe
                    • Commands
                    • Arithmetic
                    • Arithmetic

                    Chinese theorem

                    Reading time: 1min

                    Returns the solution of the system of equations given by the Chinese theorem: let n1,...,nk be integers greater than 1, and let us denote by N the product of the ni. The Chinese remainder theorem states that if the ni are pairwise coprime, and if a1,...,ak are any integer, 0≤ai<ni, then there exists an integer x such that

                    x≡a1(modn1)

                    x≡ak(modnk)

                    and two such x are congruent modulo N.

                    Syntax

                    chinese_theorem(Integer, Integer, Integer, Integer)
                    
                    chinese_theorem(List, List)
                    

                    Description

                    Given four integers a1, a2, n1, n2, returns x, the solution of the system of equations described above.

                    Given two lists {a1,...,ak} and {n1,...,nk}, returns x, the solution of the system of equations described above

                    Was this article helpful?

                    Yes
                    No
                    Give feedback about this article

                    Related Articles

                    • Element
                    • Integrate
                    • Interpolate
                    • Remainder

                    Chinese theorem

                    Syntax Description

                    Making people’s STEM work more meaningful

                    MathType

                    • MathType for Office Tools
                    • MathType for Mac
                    • MathType for Microsoft 365
                    • MathType for Google Workspace
                    • MathType for LMS
                    • MathType for XML Editors
                    • Arabic notation
                    • Our products accessibility
                    • MathType is online

                    WirisQuizzes

                    Learning Lemur

                    Solutions for Education

                    • Blackboard Learn
                    • Brightspace by D2L
                    • Canvas
                    • Google Classroom
                    • Moodle
                    • Schoology

                    Solutions for Publishing Houses

                    Solutions for Technical Writers

                    Solutions for Chemistry

                    Integrations

                    • HTML Editors
                    • MathType in WordPress

                    Pricing

                    Company

                    Careers

                    Blog

                    Contact Us

                    Buy Now

                    Plugin Downloads

                    © Wiris 2025

                    • Cookie Settings
                    • Cookie Policy
                    • Terms of Use
                    • Privacy Policy / GDPR
                    • Student Data Privacy
                    • Compliance
                    • Powered by Helpjuice
                    Expand