Tiny server for testing equivalence of two symbolic expressions.
4.7K
A not-quite-so-tiny-any-more server for testing the equivalence of two algebraic expressions using SymPy.
To use, either docker pull ucamcldtg/equality-checker or list it as an image in a Docker Compose file. Port 5000 of the container will need to be mapped to the port the checker is expected to listen on.
For instance, run:
docker run -d -p 5000:5000 --name equality-checker ucamcldtg/equality-checker
Your server should be running at http://localhost:5000/check.
Now make JSON-based POST requests with target and test expression strings, e.g.
{
"target": "x + 3",
"test": "3 + x",
"description": "An optional description for the logs!"
}
which will get a response like:
{
"equal": "true",
"equality_type": "exact",
"parsed_target": "x + 3",
"parsed_test": "x + 3",
"target": "x + 3",
"test": "3 + x"
}
or, if something went wrong, an error like:
{
"error": "Some error message here",
...
}
To see live output:
docker logs -f equality-checker
Content type
Image
Digest
sha256:4488aa0bc…
Size
109.9 MB
Last updated
9 months ago
docker pull ucamcldtg/equality-checker