Posts

Showing posts from February, 2011

Round Decimals Up and Down

Nr. Round Up Math.Ceiling(number * 100) / 100M Round Down Math.Floor(number * 100) / 100M 26.710 26.71 26.71 26.711 26.72 26.71 26.712 26.72 26.71 26.713 26.72 26.71 26.714 26.72 26.71 26.715 26.72 26.71 26.716 26.72 26.71 26.717 26.72 26.71 26.718 26.72 26.71 26.719 26.72 26.71 Rounding Down (floor) a real number is finding the largest integer not greater than that number and Rounding Up (ceiling) a real number is finding the smallest integer not less than the number. This table extends the classic definition of floor and ceiling to two decimals.