I see this on Julia 0.4-dev, but not on Julia 0.3.3. — John
On Dec 6, 2014, at 1:34 PM, remi.ber...@gmail.com wrote: > Hi guys, > > While trying to insert elements of type Rational{Int} into a Set, I ran into > an issue with an InexactError exception. > It happens with some elements. For example: 1//6 > > s = Set{Rational{Int}}() > push!(s, 1//6) > > ERROR: InexactError() > in hash_integer at hashing2.jl:4 > in hash at hashing2.jl:148 > in ht_keyindex2 at dict.jl:527 > in setindex! at dict.jl:580 > in push! at set.jl:27 > > I don't really understand why it behaves like that. Is this a bug? Or a > problem when the fraction is converted to float for hashing? > > Thank you for your help, > Rémi