Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] OCaml and bignums
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michel Quercia <michel.quercia@p...>
Subject: Re: [Caml-list] OCaml and bignums
le Sun, 09 May 2004 23:06:52 +0200, Roberto Bagnara <bagnara@cs.unipr.it> écrivit :

> 
> I have made a web search to understand which kind of
> support for bignums is available for OCaml.
> I must say that I am rather confused: it is not clear
> to me which packages are still maintained and which
> are dead, which ones are more widely used, and what
> are the relative merits of the various proposals.
> I would appreciate it very much if someone could
> put me on the right track.
> All the best,

To my knowledge, there are 3 bignum packages available for Ocaml :

1. The Bignum library shipped within the standard Ocaml distribution and maintained by the INRIA team. It provides support for big integers and for rationnals.

2. MLGMP : bindings for the GNU Multiprecision library, maintained by David Monniaux (http://www.di.ens.fr/~monniaux/download/mlgmp.tar.gz). It provides support for big integers, for rationnals and for big precision floats.

3. Numerix : another multiprecision library maintained by me (http://pauillac.inria.fr/~quercia/cdrom/bibs/numerix-0.19b.tar.gz). It provides support for big integers only, on x86/Unix platforms.

I have no idea on how widely each package is used.

Relative merits :

-- Bignum is standard and portable. It should be the best choice for "small bigints" (up to a few words long). The algorithms have a quadratic complexity, and are not suitable for hudge bigints.

-- MLGMP has the merits of GMP : portable and very fast (quadratic and subquadratic algorithms depending on the sizes of the inputs). The only drawback is a possibility to exhaust memory in long computations due to the use of two separate GC (the one of Ocaml and the one of GMP).

-- Numerix is my baby, so I'll let other users say if it has merits. Same scheme as GMP (choose a suitable algorithm depending on the sizes of the inputs), without the double-GC problem. The drawback is portability : works on x86/Linux.

-- 
Michel Quercia
23 rue de Montchapet, 21000 Dijon
http://michel.quercia.free.fr (maths)
http://pauillac.inria.fr/~quercia (informatique)
mailto:michel.quercia@prepas.org

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners