There are always going to be cases where you want one behavior and others where you want another. You can change this by overloading == for your type.
On Mon, Dec 7, 2015 at 6:54 PM, Davide Lasagna <[email protected]> wrote: > I understand the reason why -0.0 == 0.0, but then this should happen also > for two objects of the same type that have 0.0 and -0.0 as the value of > their single field as shown below. > > julia> -0.0 == 0.0 > true > > julia> type foo > a::Float64 > end > > julia> b = foo(-0.0) > foo(-0.0) > > julia> a = foo(0.0) > foo(0.0) > > julia> a == b > false > > Where should I look at? > > Cheers >
