-1
System.Math.Round(57.5);  

58.0

System.Math.Round(0.575 *100);

57.0

System.Math.Round(0.775*100);

78.0

Lee Taylor
  • 7,155
  • 14
  • 29
  • 44
  • 3
    https://en.wikipedia.org/wiki/Floating-point_arithmetic – nbokmans May 23 '22 at 11:14
  • If you check you'll see that `0.575 * 100` results in `57.49999999999999` because floating point numbers are not precise. However if you use decimal `0.575M * 100` then it is `57.5` and rounds as expected. – juharr May 23 '22 at 11:37

0 Answers0