An OCaml module for performing exact arithmetic on real numbers by representing them as continued fractions. It implements the well-known algorithm described by R.W. Gosper (see reference below). The continued fractions are lazy evaluated (eventually infinite) lists. Basic arithmetic operations as well as many transcendent functions are available.

Mathlib is a collection of hopefully-useful functions for working with floats, Complex numbers, and random numbers. It has the basic math functions added to the C99, trigonometric functions for complex numbers, the Mersenne Twister random number generator, and modules for generating random numbers in a variety of distributions.

A random number generator compatible with standard library Random module (pre OCaml 3.12).
It contains C code to speed up generation and a function to skip a lot of numbers at once. Benchmarks show a 3 fold increase in speed for generating random numbers.

The Zarith library implements arithmetic and logical operations
over arbitrary-precision integers. It uses GMP to efficiently
implement arithmetic over big integers. Small integers are
represented as Caml unboxed integers, for speed and space economy.