No offense to ankur, but his hash function is the silliest hash function ever. It looks intelligent and reasonable and is the kind of answer I would trust if I didn't know better. But what kind of hash function is injective? If I wanted to store arbitrary doubles into his hash table I would need a zettabyte (that is a billion terabytes) of memory. Ooops. I should be able to warn people about that somehow.
Case in point: http://xorswap.com/questions/85-what-is-a-hash-table-how-wou...
No offense to ankur, but his hash function is the silliest hash function ever. It looks intelligent and reasonable and is the kind of answer I would trust if I didn't know better. But what kind of hash function is injective? If I wanted to store arbitrary doubles into his hash table I would need a zettabyte (that is a billion terabytes) of memory. Ooops. I should be able to warn people about that somehow.