I am using a Math.Round function to round the decimal numbers with a precision of 3 digits, but for some equations it gives a wrong result.The code given below gives me a wrong result.It gives 1.428 but the expected result is 1.429
Math.Round(28.57 * 5.0 / 100, 3, MidpointRounding.AwayFromZero)
I got the right answer by just putting 5.0 / 100 in a bracket.The code given below gives 1.429
Math.Round(28.57 * (5.0 / 100), 3, MidpointRounding.AwayFromZero)
I don't understand why it is happening like this. Can you explain this?