[geos-devel] Ticket #202 (double hash)

Ben Harper ben at gls.co.za
Fri Aug 29 03:34:51 EDT 2008


Apologies for sending this to the entire list, but I couldn't figure out how to comment on the ticket alone.
I created an OSGeo user account, and logged in to trac, but still no GUI available.

Anyway, concerning an I32 hash on a double, I think the easiest naive solution
that does not have terrible performance concerns is:

unsigned int HashDouble( double d )
{
 unsigned int* i = (unsigned int*) &d;
 return i[0] ^ i[1];
}

Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20080829/0c48014d/attachment.html


More information about the geos-devel mailing list