Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2005-04-18 11:57:59


Markus Schöpflin wrote:
> Victor A. Wagner Jr. wrote:
>
>> At Monday 2005-04-18 03:52, you wrote:
>>
>>> Currently "functional/hash - hash_float_test" fails on Tru64/CXX6.5
>>> (See http://tinyurl.com/8opfo)
>>>
>>> The reason of the failure is that QNaN and 0 give the same hash code
>>> on this platform. I was wondering what the expected hash of QNAN
>>> actually should be. Is it some platform dependent value?

Blimey, I'm suprised anyone is paying that much attention.

>> Am I missing something here? Since it is obvious that one canNOT
>> generate a unique hash for all possible inputs, why should there
>> necessarily be a difference between any 2?
>
>
> You're probably right. Maybe the author of the test could perhaps
> clarify the motivation for this test, then.

It's perfectly okay for the compiler to fail the test. I've been meaning
to change the test to reflect this, but haven't got around to it (I've
been working on fixing the genuine failures).

If you look through the hash tests you'll find lots of tests like this,
it's an easy way to test that the hash function is taking into account
all the data involved. To tell if they are really a failure or not
requires some interpretation. If you look at the failures on gcc on
SunOS, they indicate a real problem.

The tests don't supply a general purpose hash testing suite, but one
that tests whether the hash functions are doing what I expect.

Daniel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk