-
MathType
-
WirisQuizzes
-
Nubric
-
CalcMe
-
MathPlayer
-
Store FAQ
-
MathFlow
-
BF FAQ
-
Miscellaneous
-
Wiris Integrations
Comparison service reference
Reading time: 1minReference 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: