Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2005-04-19 06:31:14


Markus Schöpflin <markus.schoepflin <at> comsoft.de> writes:
> I have to admit, following Victor's argumentation, I don't see the
> fundamental difference between the failures on SunOS and on Tru64.

On SunOS gcc the hash function is giving the same result for
std::numeric_limits<long double>::max(), std::numeric_limits<long double>
::max()/2 and std::numeric_limits<long double>::max()/4. This indicates that
the function for getting its exponent is probably treating the value as a
double. If you're using a long double you want to take advantage of its
increased accuracy and range but the hash function is loosing that information
and so could give bad results under certain circumstances.

> > The tests don't supply a general purpose hash testing suite, but one
> > that tests whether the hash functions are doing what I expect.
>
> I don't get you there. The tests are supposed to tell whether the hash
> library works ok or not on some particular compiler/platform. If some of
> the tests fail, I have to assume (from a user's point of view) that the
> library will not work reliably for me. (Especially as these are not
> compilation failures but runtime failures.)

This isn't released code, I wouldn't assume that it would work reliably at all.
It might not even be fully included in the next release. When we reach the code
freeze I'll add annotations to the tests to explain what's going on. I might
also make some changes so that only real failures show up - but taking this too
far would make the tests essentially useless. (An early version didn't take
into account a float's sign, it met the hash specifications, but I'd consider
that a bug).

> Maybe you could change the tests to just print the hash values on stdout?

But then the results won't show up on the summary. At the moment it's more
useful that the test summary shows me useful information.

Daniel


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