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 QAA29774; Thu, 12 Aug 2004 16:13:44 +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 QAA29981 for ; Thu, 12 Aug 2004 16:13:43 +0200 (MET DST) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i7CEDfRM002734 for ; Thu, 12 Aug 2004 16:13:42 +0200 Received: from qrnik ([192.168.0.1] ident=qrczak) by qrnik.knm.org.pl with esmtp (Exim 3.36 #1) id 1BvGKq-0006E4-00 for caml-list@inria.fr; Thu, 12 Aug 2004 16:13:40 +0200 Subject: Re: [Caml-list] getting the type of a polymorphic data ? From: "Marcin 'Qrczak' Kowalczyk" To: caml-list@inria.fr In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-2 Date: Thu, 12 Aug 2004 16:13:40 +0200 Message-Id: <1092320020.19848.82.camel@qrnik> Mime-Version: 1.0 X-Mailer: Evolution 1.5.9.2 Content-Transfer-Encoding: quoted-printable X-Miltered: at concorde with ID 411B7B15.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marcin:01 'qrczak':01 kowalczyk:01 qrczak:01 pons:01 collision:01 overflows:01 hashes:01 hashing:01 hashes:01 marcin:01 kowalczyk:01 qrczak:01 fernandez:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk W li=B6cie z czw, 12-08-2004, godz. 15:57 +0200, Diego Olivier Fernandez Pons napisa=B3: > If the only case of collision is due to modulo 2^31 then it is - at > least for me - reasonable since the user is supposed to have a minimal > knowledge of computer science. And Caml allows him to check with > max_int / min_int for overflows. I'm not sure what do you mean, but there are 2^31 int values, half of them negative, which map to 2^30 hashes, all non-negative. Hashing an int stripts its sign bit. This was on 32-bit architectures. On 64-bit architectures hashes are still modulo 2^30, but there are 2^63 different ints. --=20 __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ ------------------- 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