From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id GAA04545; Mon, 10 May 2004 06:41:21 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA06076 for ; Mon, 10 May 2004 06:41:20 +0200 (MET DST) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i4A4fJEV009828 for ; Mon, 10 May 2004 06:41:19 +0200 Received: from montchapet.dijon.fr (talant-1-82-225-174-33.fbx.proxad.net [82.225.174.33]) by postfix4-1.free.fr (Postfix) with SMTP id 25CCA1075E9; Mon, 10 May 2004 06:41:19 +0200 (CEST) Date: Mon, 10 May 2004 06:41:27 +0200 From: Michel Quercia To: Roberto Bagnara Cc: caml-list@inria.fr Subject: Re: [Caml-list] OCaml and bignums Message-Id: <20040510064127.32fa2c30.michel.quercia@prepas.org> In-Reply-To: <409E9D6C.7020001@cs.unipr.it> References: <409E9D6C.7020001@cs.unipr.it> Organization: Education nationale X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at nez-perce with ID 409F07EF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; quercia:01 quercia:01 prepas:01 caml-list:01 bignums:01 2004:99 ecrivit:01 bignums:01 bignum:01 bignum:01 rationnals:01 mlgmp:01 monniaux:01 monniaux:01 mlgmp:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk le Sun, 09 May 2004 23:06:52 +0200, Roberto Bagnara é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