Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » hash tables » hash
next | previous | forward | backward | up | index | toc

# hash -- hash code of an object

- Usage:
    `hash x`
- Inputs:
  - x, a thing
- Outputs:
  - an integer, the hash code of x

## Description

The hash code of x is an integer produced in a deterministic way from x, and perhaps from the hash codes of the contents of x. See hashing for a discussion of the requirements that the hash codes used here are designed to satisfy.

Hash codes may change from one version of Macaulay2 to the next, but changes to the hash codes of the basic types will be avoided, if possible. That includes lists, sequences, strings, hash tables, options, Boolean values, and numbers.

## For the programmer

The object hash is a compiled function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_hashtables.m2:920:0.