OCaml bindings to the PARI library -- a cross platform and open-source computer algebra system designed for fast computations in number theory.
The API is documented in the Users' Guide to the PARI library.
The best way to get the dependencies is through Nix. Without Nix, you will need opam 2.0 and GMP installed on your system. To generate the stubs you will need LLVM and libclang.
- With OPAM:
opam update && opam switch create . -y --deps-only
(or with Nix:nix develop -c $SHELL
) dune build
To regenerate the stubs run make gen-stubs
(after nix-shell -p llvm libclang
).
Execute a code sample: dune exec examples/pohlig_hellman.exe
, or view some of the available Jupyter notebooks.