Skip to content

hash() on algebraic reals is not stable #841

@sagetrac-cwitty

Description

@sagetrac-cwitty

The hash() function applied to a single algebraic real may give different results at different times:

sage: foo = sqrt(AA(4))
sage: hash(foo)
-1289340516
sage: foo == 2
True
sage: hash(foo)
2105051955

(I plan to fix this problem very soon.)

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/841

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions