Function ADS::hash_multiplication
Defined in File HashFunctions.h
Function Documentation
-
std::uint64_t ADS::hash_multiplication(std::uint64_t i, std::uint64_t m, long double C = (std::sqrt(5.0L) - 1) / 2)
the multiplication in floating point, the book’s formula: exact only while C i keeps enough digits after the point, i.e., for i well below the 2^64 of the mantissa of a long double
- Pre:
0 <= C < 1
- Post:
the result is below m, if m > 0