C# Maths gives wrong results!
问题 I understand the principle behind this problem but it's giving me a headache to think that this is going on throughout my application and I need to find as solution. double Value = 141.1; double Discount = 25.0; double disc = Value * Discount / 100; // disc = 35.275 Value -= disc; // Value = 105.824999999999999 Value = Functions.Round(Value, 2); // Value = 105.82 I'm using doubles to represent quite small numbers. Somehow in the calculation 141.1 - 35.275 the binary representation of the