Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash(::Decimal) fails #51

Open
altre opened this issue Dec 16, 2020 · 1 comment
Open

hash(::Decimal) fails #51

altre opened this issue Dec 16, 2020 · 1 comment

Comments

@altre
Copy link

altre commented Dec 16, 2020

Thanks for this package!
Calling hash on a Decimal fails in julia 1.5.3:


julia> p =parse(Decimal, "0.1")
Decimal(0, 1, -1)

julia> hash(p)
ERROR: MethodError: no method matching decompose(::Decimal)

Which effectively prevents many other important methods, such as unique:

julia> unique([p,p])
ERROR: MethodError: no method matching decompose(::Decimal)
Closest candidates are:
  decompose(::BigFloat) at hashing2.jl:195
  decompose(::Float64) at hashing2.jl:184
  decompose(::Float32) at hashing2.jl:173
@jmkuhn
Copy link

jmkuhn commented Feb 9, 2021

Duplicate of #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants