2

Consider the version of Murmur Hash (v3) which returns a 32-bit unsigned integer. Can one assume the co-domain of this function to be evenly distributed between 0 and UINT32_MAX, and to encompass these two values? I'm looking to generate a pseudo-random double between 0.0 and 1.0 (inclusive) derived from Murmur Hash, as illustrated by the code below:

uint32_t hash = MurmurHash3_x86_32 (key, len, seed);
double frac = ((double) hash) / ((double) UINT32_MAX);
Jon Smark
  • 2,528
  • 24
  • 31

1 Answers1

1

i don't know what a co-domain is, but i'll answer your question this way:

Yes, Murmur is good

Reference

Community
  • 1
  • 1
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219