For →> 32: long and double - 64 bits, since int is 32 bits, so to get the result int, as soon as the change is 32, to save the information.
Multiplication 31 is a typical method. 31 is simple, and repeated multiplication within 2 ^ 32 will go through all the values. So this is great for hashing. (Generally)
source share