How come a primitive float value can be -0.0? What does that mean?
Can I cancel that feature?
When I have:
fl == -0.0
fl == 0
Because Java uses the IEEE Standard for Floating-Point Arithmetic (IEEE 754) which defines
-0.0 and when it should be used.
You can get around the problem by adding
Double.toString(value + 0.0);
Operations Involving Negative Zero
(-0.0) + 0.0 -> 0.0