ocaml-num
« Back to VersTracker
Description:
OCaml legacy Num library for arbitrary-precision arithmetic
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: ocaml library arithmetic legacy mathematics
Install: brew install ocaml-num
About:
The OCaml Num library provides core support for arbitrary-precision arithmetic, enabling precise calculations with integers and rational numbers that exceed standard machine word sizes. Although superseded by the Zarith library in modern OCaml, it remains a crucial dependency for legacy codebases and older packages requiring robust mathematical operations.
Key Features:
  • Arbitrary-precision integers (Big_int)
  • Arbitrary-precision rational numbers (Ratio)
  • Compatibility layer for legacy OCaml code
  • Standalone library independent of the main OCaml runtime
Use Cases:
  • Maintaining and building legacy OCaml projects that depend on the Num library
  • Performing cryptographic calculations requiring large integer arithmetic
  • Scientific computing applications needing high-precision rational numbers
Alternatives:
  • Zarith – The modern standard for arbitrary-precision arithmetic in OCaml, offering better performance and native integration.
Version History
Detected Version Rev Change Commit
Sep 16, 2025 8:24am 3 VERSION_BUMP efb16a4a