Sorting uses isless by default, not <. The analogue to == is isequal, and that docstring does explicitly mention the distinction between -0.0 and 0.0, which is mandated by IEEE-754 for total ordering. You can input < for IEEE-754 comparisons instead, but that also violates equivalence transitivity for incomparability !lt(x, y) && !lt(y, x) (not equality ==, that’s a different equivalence relation):
julia> issorted([0.0, -0.0], lt=<)
true
Transitivity is critical for sorting because algorithms can avoid redundantly comparing all pairs; comparing A vs B then B vs C should make B vs C unnecessary. The docstring of sort! gives an example of NaN vs 1.0 and NaN vs 2.0 being incomparable under < yet 1.0 < 2.0, and even if we don’t care where NaN goes, we can still get an unacceptable sorting failure:
julia> sort!([2.0, NaN, 1.0], lt=<) |> println
[2.0, NaN, 1.0]