.NET 1 digit rounding of double type behaves differently for large number than numbers less than 1

Viewed 29

Math.Round(1111_1111_1111_1111.5, 1, MidpointRounding.AwayFromZero) returns 1111111111111111.6 but I was expecting 1111111111111111.5

whereas Math.Round(0.5, 1, MidpointRounding.AwayFromZero) returns 0.5

What is the explanation for this behavior? thanks!

0 Answers
Related