Wang hash。
https://gist.github.com/badboy/6267743
ソースコード位置: pytilpack/random.py
| def wang_hash32(x: int) -> int:
"""Wang hash。
<https://gist.github.com/badboy/6267743>
"""
x = (x ^ 61) ^ (x >> 16)
x = x + (x << 3)
x = x ^ (x >> 4)
x = x * 0x27D4EB2D
x = x ^ (x >> 15)
return x & 0xFFFFFFFF
|