nearbyint, nearbyintf—round to integer #include <math.h>
double nearbyint(double x);
float nearbyintf(float x);
Description
The nearbyint functions round their argument to an integer value in
floating-point format, using the current rounding direction and
(supposedly) without raising the "inexact" floating-point exception.
See the rint functions for the same function with the "inexact"
floating-point exception being raised when appropriate.
Bugs
nearbyint functions are identical to the rint
functions with respect to the floating-point exception behavior, and
will cause the "inexact" exception to be raised for most targets.
Returns
Portability
See Also
rint, round