Hash module

knuth_hash

procedureSource

Scrambles an integer by multiplying it with a large odd constant. The high bits of the result are the well mixed ones.

knuth_hash :: (x: u64) -> u64

Parameters

x: u64

Returns

u64
Example↗
assert(knuth_hash(1) != knuth_hash(2));

See also