Files
calc/help/hash
2017-05-21 15:38:30 -07:00

40 lines
883 B
Plaintext

NAME
hash - hash value
SYNOPSIS
hash(x_1 [, x_2, x_3, ...])
TYPES
x_1, x_1, ... any
return integer v, 0 <= v < 2^32
DESCRIPTION
Returns a hash value for one or more values of arbitrary types.
This function implements the Fowler/Noll/Vo hash-1 (FNV-1 hash).
The basis of the hash algorithm was taken from an idea sent
by Email to the IEEE POSIX P1003.2 mailing list from Phong Vo
(kpv@research.att.com) and Glenn Fowler (gsf@research.att.com).
Landon Curt Noll (http://reality.sgi.com/chongo) later improved on
their algorithm to come up with Fowler/Noll/Vo hash.
See:
http://reality.sgi.com/chongo/tech/comp/fnv/index.html
for more information in this hash.
EXAMPLE
> a = isqrt(2e1000); s = "xyz";
> hash(a,s)
1916476840
LIMITS
The number of arguments is not to exceed 100.
LIBRARY
none
SEE ALSO