Complex number sort

The -0.05050274530206651 and -0.050502745302066526 may consider the same value.

This is not quite clear, but probably you mean, that you want to compare values with less precision?

julia> sort(a, by = x -> (floor(real(x), digits = 6), -floor(imag(x), digits = 6)), rev=true)
4-element Vector{ComplexF64}:
 -0.050502745302066526 - 0.6013860908906193im
  -0.05050274530206651 + 0.6013860908906193im
   -1.1280686832693616 - 0.7017876343969567im
   -1.1280686832693614 + 0.7017876343969567im
1 Like