cpp/numeric/math/rint

@1-3@ Rounds the floating-point argument to an integer value (in floating-point format), using the current rounding mode. @4-9@ Rounds the floating-point argument to an integer value, using the current rounding mode. @A-C@ Additional overloads are provided for all integer types, which are treated as.

Return value
If no errors occur, the nearest integer value to, according to the current rounding mode, is returned.

Error handling
Errors are reported as specified in math_errhandling.

If the result of or  is outside the range representable by the return type, a domain error or a range error may occur.

If the implementation supports IEEE floating-point arithmetic (IEC 60559),
 * For the function:


 * If is ±∞, it is returned, unmodified
 * If is ±0, it is returned, unmodified
 * If is NaN, NaN is returned
 * For and  functions:


 * If is ±∞, fe_invalid is raised and an implementation-defined value is returned
 * If the result of the rounding is outside the range of the return type, fe_invalid is raised and an implementation-defined value is returned
 * If is NaN, fe_invalid is raised and an implementation-defined value is returned