Skip to content

Wrong hashes for some Rationals #50628

Closed
@sostock

Description

@sostock

On Julia v1.10.0-alpha1 and master, some Rationals which are equal have different hashes:

julia> hash(5//2) # same hash as on older Julia versions (≥ v1.6)
0x16b7f40fdbb2c57d

julia> hash(Int128(5)//2) # the same hash is also obtained for UInt128(5)//2 and BigInt(5)//2
0xb795033f6f2a0674

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorhashingregressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions