Why is a round-trip conversion via a string not safe for a double?
Recently I have had to serialize a double into text, and then get it back. The value seems to not be equivalent: double d1 = 0.84551240822557006; string s = d1.ToString(“R”); double d2 = double.Parse(s); bool s1 = d1 == d2; // -> s1 is False But according to MSDN: Standard Numeric Format Strings, the “R” … Read more