Previous Up Next
Chapter 22 The num library: arbitrary-precision rational arithmetic

The num library implements integer arithmetic and rational arithmetic in arbitrary precision.

More documentation on the functions provided in this library can be found in The CAML Numbers Reference Manual by Valérie Ménissier-Morain, technical report 141, INRIA, july 1992 (available electronically,

Programs that use the num library must be linked as follows:
        ocamlc other options nums.cma other files
        ocamlopt other options nums.cmxa other files
For interactive use of the nums library, do:
        ocamlmktop -o mytop nums.cma
or (if dynamic linking of C libraries is supported on your platform), start ocaml and type #load "nums.cma";;.

Previous Up Next