Tuesday, 15 January 2013

random - What seed value should I use for erand48() in C? -



random - What seed value should I use for erand48() in C? -

i new c programming, , i've read erand48() alternative thread-safe random number generation. function takes seed value of: unsigned short int array[3]

any recommendations seed value should initialized to?

just 2 cents...

we used same function-family in 1 of our projects sometime ago. product had work on windows/unix, did not utilize /dev/random.

instead, concatenated host_ip_addr + time() + process_id + thread_id string , generated hash string. , then, spread xor'ed trailing bytes onto 6 leading bytes. used final info our seed...

c random concurrency

No comments:

Post a Comment