Decimals.jl
Decimals.jl copied to clipboard
hash(::Decimal) fails
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
Duplicate of #35.