Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hash function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Fibonacci hashing === [[Fibonacci number|Fibonacci]] hashing is a form of multiplicative hashing in which the multiplier is {{Mvar|2<sup>''w''</sup> / ϕ}}, where {{Mvar|w}} is the machine word length and {{Mvar|ϕ}} (phi) is the [[golden ratio]] (approximately 1.618). A property of this multiplier is that it uniformly distributes over the table space, [[Blockchain|blocks]] of consecutive keys with respect to any block of bits in the key. Consecutive keys within the high bits or low bits of the key (or some other field) are relatively common. The multipliers for various word lengths are: *16: ''a'' = <span style="display: inline-block; width: 11em">9E37<sub>16</sub></span> = {{val|40503}}<sub>10</sub> *32: ''a'' = <span style="display: inline-block; width: 11em">{{gaps|9E37|79B9}}<sub>16</sub></span> = {{val|2654435769}}<sub>10</sub> *48: ''a'' = <span style="display: inline-block; width: 11em">{{gaps|9E37|79B9|7F4B}}<sub>16</sub></span> = {{val|173961102589771}}<sub>10</sub><ref group=Notes>Unisys large systems.</ref> *64: ''a'' = <span style="display: inline-block; width: 11em">{{gaps|9E37|79B9|7F4A|7C15}}<sub>16</sub></span> = {{val|11400714819323198485}}<sub>10</sub> {{^|256+ bits is 0x9E3779B97F4A7C15F39CC0605CEDC8341082276BF3A27251F86C6A11D0C18E95.2767F..., if anyone needs it}} The multiplier should be odd, so the least significant bit of the output is invertible modulo {{Math|2<sup>''w''</sup>}}. The last two values given above are rounded (up and down, respectively) by more than 1/2 of a least-significant bit to achieve this.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)