This site is updated infrequently. For up-to-date
information, please visit the new OCaml website at ocaml.org.

The Caml Hump: Contfrac

Contfrac

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.