Siavash wrote:
I fear that this will be problematic in future and generate runtime errors because they are float types
Why would it cause any problems? They are exactly the same number, just with a slightly different representation in bits. For a float you have some number of bits containing the value, and an additional bit for the sign. Flipping the sign bit negates the number, so flipping the sign bit on 0 gives you -0.
You can check for yourself that the sign on zero doesn't matter for any basic operations:
n + 0.0 = n and n - 0.0 = n
n * 0.0 = 0.0 and n * (-0.0) = -0.0
n / 0.0 = INF and n/(-0.0) = INF
0.0 == -0.0 => True
Remember, -0 does not exist - it is merely an artefact of the binary representation of floating point numbers, and affects nothing except the print function. If you look at the IEEE spec for floating point, you will also see that there can be multiple representations for INF and NAN.