English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] getting the type of a polymorphic data ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-08-12 (14:13)
From: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] getting the type of a polymorphic data ?
W li¶cie z czw, 12-08-2004, godz. 15:57 +0200, Diego Olivier Fernandez
Pons napisa³:

> 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.

   __("<         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