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 WAA17097; Fri, 11 Oct 2002 22:30:30 +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 WAA16949 for ; Fri, 11 Oct 2002 22:30:29 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9BKUN509741; Fri, 11 Oct 2002 22:30:23 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA16458; Fri, 11 Oct 2002 22:30:22 +0200 (MET DST) From: Pierre Weis Message-Id: <200210112030.WAA16458@pauillac.inria.fr> Subject: Re: [Caml-list] Num library In-Reply-To: <15782.56161.649922.825529@pc8-123> from Jean-Christophe Filliatre at "Oct 11, 102 04:08:33 pm" To: Jean-Christophe.Filliatre@lri.fr Date: Fri, 11 Oct 2002 22:30:22 +0200 (MET DST) Cc: frisch@clipper.ens.fr, caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Jean-Christophe, > 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. You should have reported this behaviour, since it is a bug: the library was known to provide a normal form to value of type num. If it fails to do so it is just an implementation flaw that we have to correct. > 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 Yes, you're right, it is almost impossible to handle: that why the library was supposed to provide a normal form for nums ... Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ ------------------- 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