rounds to the nearest integer. If the fractional part is below it rounds down, and above it rounds up.
Domain and range. The domain is all real numbers and the range is all integers. The graph is a staircase of horizontal segments of width , each centered on an integer. For example, the value is on and on .
Discontinuities and jumps. The function is discontinuous at the half-integers , where the value jumps up by . How these exact midpoints are rounded is fixed by a convention. The most common 'round half up' rule gives:
In statistics and accounting, round half to even (banker's rounding) is often used to reduce bias, and the treatment of negatives and midpoints varies between implementations.
Symmetry. Away from the half-integers, , so the function is essentially odd (point-symmetric about the origin). Only at the midpoints can the tie-breaking rule spoil this symmetry.
Relation to other functions. Under the round-half-up rule it can be written with the floor function:
So rounding is a sibling of the floor and ceiling functions, choosing whichever of and is closer to .
Applications. Rounding is used wherever continuous values must be reduced to convenient integers: displaying amounts of money, matching the number of digits of a measurement, and quantizing digital signals.