The math/ocaml-zarith port
ocaml-zarith-1.12p3 – arbitrary precision integer and rational arithmetic (cvsweb github mirror)
Description
This library implements arithmetic and logical operations over arbitrary-precision integers. The module is simply named Z. Its interface is similar to that of the Int32, Int64 and Nativeint modules from the OCaml standard library, with some additional functions. See the file z.mlip for documentation. The implementation uses GMP (the GNU Multiple Precision arithmetic library) to compute over big integers. However, small integers are represented as unboxed Caml integers, to save space and improve performance. Big integers are allocated in the Caml heap, bypassing GMP's memory management and achieving better GC behavior than e.g. the MLGMP library. Computations on small integers use a special, faster path (coded in assembly for some platforms and functions) eschewing calls to GMP, while computations on large intergers use the low-level MPN functions from GMP. Arbitrary-precision integers can be compared correctly using OCaml's polymorphic comparison operators (=, <, >, etc.). This requires OCaml version 3.12.1 or later, though. Additional features include: * a module Q for rationals, built on top of Z (see q.mli) * a compatibility layer Big_int_Z that implements the same API as Big_int from the legacy Num library, but uses Z internallyWWW: https://github.com/ocaml/Zarith/
Maintainer
Christopher Zimmermann
Categories
Library dependencies
Build dependencies
Run dependencies
Files
- /usr/local/lib/ocaml/stublibs/dllzarith.so
- /usr/local/lib/ocaml/zarith/
- /usr/local/lib/ocaml/zarith/META
- /usr/local/lib/ocaml/zarith/big_int_Z.cmi
- /usr/local/lib/ocaml/zarith/big_int_Z.cmti
- /usr/local/lib/ocaml/zarith/big_int_Z.cmx
- /usr/local/lib/ocaml/zarith/big_int_Z.mli
- /usr/local/lib/ocaml/zarith/libzarith.a
- /usr/local/lib/ocaml/zarith/q.cmi
- /usr/local/lib/ocaml/zarith/q.cmti
- /usr/local/lib/ocaml/zarith/q.cmx
- /usr/local/lib/ocaml/zarith/q.mli
- /usr/local/lib/ocaml/zarith/z.cmi
- /usr/local/lib/ocaml/zarith/z.cmti
- /usr/local/lib/ocaml/zarith/z.cmx
- /usr/local/lib/ocaml/zarith/z.mli
- /usr/local/lib/ocaml/zarith/zarith.a
- /usr/local/lib/ocaml/zarith/zarith.cma
- /usr/local/lib/ocaml/zarith/zarith.cmxa
- /usr/local/lib/ocaml/zarith/zarith.cmxs
- /usr/local/lib/ocaml/zarith/zarith.h
- /usr/local/lib/ocaml/zarith/zarith_top.cma