OCaml interface to GMP

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 integers use the low-level MPN functions from GMP. Arbitrary-precision integers can be compared correctly using OCaml's polymorphic comparison operators (=, <, >, etc.). 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, but uses Z internally

Release | Stable | Testing |
---|---|---|

Fedora Rawhide | 1.14-2.fc41 | - |

Fedora 41 | 1.14-2.fc41 | - |

Fedora 40 | 1.13-6.fc40 | - |

Fedora 39 | 1.13-1.fc39 | - |

Fedora EPEL 9 | 1.12-5.el9 | - |

- Upstream: https://github.com/ocaml/Zarith
- License(s): LGPL-2.1-only WITH OCaml-LGPL-linking-exception
- Maintainers: jjames, tdawson, defolos

You can contact the maintainers of this package via email at
`ocaml-zarith dash maintainers at fedoraproject dot org`

.

Sources on Pagure