Make the hash value same as the reference
sync myrand() with the original code