The rounding methods used by this calculator correspond to standard mathematical functions.
Floor Function: floor(x)
The floor function maps a real number to the largest integer less than or equal to x. floor(2.7) = 2
, floor(-2.1) = -3
.
Ceiling Function: ceil(x)
The ceiling function maps a real number to the smallest integer greater than or equal to x. ceil(2.7) = 3
, ceil(-2.1) = -2
.
Standard Rounding to n Decimal Places
This can be expressed using the floor function as well, although it's more complex:
round(x, n) = floor(x * 10ⁿ + 0.5) / 10ⁿ