Wiris

Documentation / MathType

  • Demos
  • Visit our website
  • Downloads
  • Contact us
  • MathType

    • WirisQuizzes

      • Nubric

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • Home
                      • MathType
                      • Technical documentation
                      • MathType for HTML editors
                      • Reference
                      • API services

                      Comparison service reference

                      Reading time: 1min

                      Reference for the MathType comparison service used to determine whether two mathematical expressions are equivalent.

                      Summary

                      The MathType comparison service compares two mathematical expressions and determines whether they are mathematically equivalent. This service is commonly used in assessment platforms, automatic grading systems, and applications that need to compare mathematical answers programmatically.

                      Available interfaces

                      The comparison service is available through the following interfaces.

                      Interface Availability
                      HTTP endpoint Cloud and self-hosted deployments
                      Java API Self-hosted Java deployments
                      .NET API Self-hosted .NET deployments

                      HTTP endpoint

                      The endpoint URL depends on your deployment.

                      Deployment Endpoint
                      Java /pluginwiris_engine/app/compare
                      PHP /integration/compare.php

                      Both GET and POST requests are supported. POST is recommended for large MathML expressions.

                      Request parameters

                      The comparison service accepts the following request parameters.

                      Parameter Required Description
                      mml Yes First mathematical expression.
                      mml2 Yes Second mathematical expression to compare.

                      Both expressions must be valid MathML.

                      Example request

                      Compare two expressions:

                      GET /compare?mml=<math>...</math>&mml2=<math>...</math>

                      Use POST when sending large MathML expressions.

                       

                      Response

                      The service returns the comparison result indicating whether both expressions are mathematically equivalent.

                      Error handling

                      Comparison may fail if:

                      • One or both MathML expressions are not valid.
                      • One or both expressions cannot be processed.
                      • The request exceeds server limits.

                      In these situations, the service returns an HTTP 5xx error.

                      Notes

                      • Both expressions must be valid MathML.
                      • The service compares the mathematical meaning of the supplied expressions.

                      Java and .NET APIs

                      The comparison service is also available through the Java and .NET APIs. For complete method signatures, return types, and implementation details, see:

                      • Java API reference.
                      • .NET API reference.

                      Related articles

                      • MathType API services.
                      • Expression evaluation.
                      • Content MathML.

                      Was this article helpful?

                      Give feedback about this article

                      Related Articles

                      • Conversion services reference
                      • Rendering service reference
                      • Configure MathType Integration Services

                      Comparison service reference

                      Summary Available interfaces HTTP endpoint Request parameters Example request Response Error handling Notes Java and .NET APIs Related articles

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Nubric

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand