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 OAA00570; Fri, 11 Oct 2002 14:11:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA00525 for ; Fri, 11 Oct 2002 14:11:27 +0200 (MET DST) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9BCBQ513138 for ; Fri, 11 Oct 2002 14:11:27 +0200 (MET DST) Received: from pc8-123 (mail@pc8-123 [129.175.8.123]) by lri.lri.fr (8.11.6/jtpda-5.3.2) with ESMTP id g9BC8XR22810 ; Fri, 11 Oct 2002 14:08:33 +0200 (MEST) Received: from filliatr by pc8-123 with local (Exim 3.35 #1 (Debian)) id 1800Sv-0003wA-00; Fri, 11 Oct 2002 16:08:33 +0200 From: Jean-Christophe Filliatre MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15782.56161.649922.825529@pc8-123> Date: Fri, 11 Oct 2002 16:08:33 +0200 (MEST) To: Alain Frisch Cc: Caml list Subject: Re: [Caml-list] Num library In-Reply-To: References: X-Mailer: VM 6.49 under Emacs 20.7.2 Reply-To: Jean-Christophe.Filliatre@lri.fr (Jean-Christophe Filliatre) X-MailScanner: Found to be clean Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Alain Frisch writes: > > I'm considering using the Num library (from the standard distribution) for > implementing numbers in an interpreter. Questions: > > - How does the library compare with other large/rational numbers > implementations ? I'm not going to comment on the efficiency of Num. But, for having tried to use it in a serious software and finally replaced it by mlgmp, I can mention one true weakness of the Num library: there is no unicity of representation (e.g. 1 can be Int 1, but also Ratio 1/1, etc.) and consequently you cannot use caml's comparison and hash functions over it. Of course, you can use compare_num (hash_num is lacking, though) but when nums are involved within huge datatypes, you have to write structural comparison and hash functions for these types. This is a pain, really. -- Jean-Christophe ------------------- 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