How to parse signed zero?
问题 Is it possible to parse signed zero? I tried several approaches but no one gives the proper result: float test1 = Convert.ToSingle("-0.0"); float test2 = float.Parse("-0.0"); float test3; float.TryParse("-0.0", out test3); If I use the value directly initialized it is just fine: float test4 = -0.0f; So the problem seems to be in the parsing procedures of c#. I hope somebody could tell if there is some option or workaround for that. The difference could only be seen by converting to binary: