The only way this could legitimately happen is if badnum is NaN – otherwise
something fishy is going on. If you can provide a reproducing example, that
would be helpful. This could also happen if you've changed hashing or
equality for numbers.

On Fri, Jan 22, 2016 at 2:42 AM, Mauro <[email protected]> wrote:

> I cannot reproduce:
>
> julia> badnum=0.9122066068007542
> 0.9122066068007542
>
> julia> g =  Dict{Float64,Float64}()
> Dict{Float64,Float64} with 0 entries
>
> julia> g[badnum] = 1
> 1
>
> julia> badnum∈keys(g)
> true
>
> julia> badnum∈sort(collect(keys(g)))
> true
>
> Maybe you can post a complete run-able example (always best)?
>
> On Thu, 2016-01-21 at 23:34, Michael Lindon <[email protected]>
> wrote:
> > I have a problem I don't quite understand. Here is an example:
> >
> > julia> badnum∈keys(g)
> > false
> > julia> badnum∈sort(collect(keys(g)))
> > true
> > julia> badnum
> > 0.9122066068007542
> >
> > Does the collecting the keys do some type conversion which introduces
> some
> > rounding? I have defined g as Dict{Float64,Float64}()
>

Reply via email to