# \#negative-zero

**URL:** https://discourse.julialang.org/tag/negative-zero/1102.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Negative zeros and sorting](https://discourse.julialang.org/t/negative-zeros-and-sorting/85252)

<div class="topic-metadata">

**Author:** [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Replies:** 13\
**Last updated:** [August 3, 2022, 8:04pm UTC](https://discourse.julialang.org/t/negative-zeros-and-sorting/85252 "2022-08-03T20:04:43Z")

</div>

Negative zeros are equivalent to positive zeros, and yet in sorting the negatives come before positives. This behavior caused a very subtle bug in a function I wrote to compare clusters of points. I’m wondering if there …
