News for hackers. Stuff that matters.
Re:How does your programming language handle “minus zero” (-... by sesutton on Friday March 05, 2021 @09:39AM (#26357306)
Interestingly Go will give you a negative 0 if you use strconv.ParseFloat("-0.0", 64) but I can't see any way to get -0.0 from a number literal.
Re:How does your programming language handle “minus zero” (-... by jeffbee on Friday March 05, 2021 @09:42AM (#26357332)
You can't get a negative zero with a constant declaration, nor can you get NaN, infinity. These are documented language facts.

"""Numeric constants represent exact values of arbitrary precision and do not overflow. Consequently, there are no constants denoting the IEEE-754 negative zero, infinity, and not-a-number values."""