预订演示
前页 后页

round

Round double to nearest or even integer valued double

SYNOPSIS:
double x, y, round();
y = round(x);


DESCRIPTION:

Returns the nearest integer to x as a double precision floating point result. If x ends in 0.5 exactly, the nearest even integer is chosen.


ACCURACY:

If x is greater than 1/(2*MACHEP), its closest machine representation is already an integer, so rounding does not change it.