dune build @all
creates an executable
_build/default/src/computor.exe
to which you can feed a polynome to solve.
dune runtest
This will run all tests contained in the folder test
.
dune exec -- src/computor.exe <equation>
<equation>
being a string that defines a polynome of degree inferior or equal to 2.
The program accepts an equation if and only if there is at least one monome on each sides of an equal sign.
Each of the following accepted monome forms may be combined in a single polynomial expression though separated by -
and +
signs.
Variable a
stands for a coefficient.
Variable x
stands for a variable names like "X", "YO" or "papopi"
Variable n
stands for the exponent part of the term.
a * x^n
ax^n
a * x
ax
x^n
x
a
The repo has a Dockerfile with everything necessary for you to just run.
Building image
docker build -t <user>:<imagename> .
Make sure to replace build name
and user
accordingly.
Interactive mode
docker run --rm -it --entrypoint bash <user>:<name>
Running cli inside docker Either:
- Wrap commands in
opam exec
$ opam exec -- dune exec -- src/computor.exe
eval $(opam env)
to have all required binaries in your path
$ eval $(opam env)
$ dune exec -- src/computor.exe