cpp/numeric/math/round

@1-3@ Computes the nearest integer value to (in floating-point format), rounding halfway cases away from zero, regardless of the current rounding mode. @4-9@ Computes the nearest integer value to (in integer format), rounding halfway cases away from zero, regardless of 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, rounding halfway cases away from zero, is returned.

If a domain error occurs, an implementation-defined value 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:


 * The current rounding mode has no effect.
 * If is ±∞, it is returned, unmodified
 * If is ±0, it is returned, unmodified
 * If is NaN, NaN is returned
 * For and  functions:


 * fe_inexact is never raised
 * The current rounding mode has no effect.
 * 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.