?(1.0-0.9-0.1)
-0.000000000000000027755575615628914
?((double)1.0-(double)0.9-(double)0.1)
-0.000000000000000027755575615628914
?((double)1.0-(double)0.9-(double)0.1).GetType()
{Name = "Double" FullName = "System.Double"}
?((double)1.0-(double)0.9-(double)0.1).ToString()
"-2,77555756156289E-17"
a 如何Double.ToString()
显示更多的双精度(15-16)的字符(32)?
我希望这仅MyObject.ToString()
代表MyObject而不是 MyObject+SomeTrashFromComputer
为什么
?0.1
0.1
?0.2-0.1
0.1
?0.1-0.1
0.0
但
?1.0-0.9-0.1
-0.000000000000000027755575615628914
为什么
?1.0-0.1-0.9
0.0
但
?1.0-0.9-0.1
-0.000000000000000027755575615628914