Return the integral value nearest to x as a long int.
Return the integral value nearest to the specified x. Round halfway cases away from zero, regardless of the current decimal floating point rounding mode.
Special value handling: * if x is NaN (either quiet or signaling), quiet NaN is returned and the value of the macro EDOM is stored into errno. * if x is +/-infinity, quite NaN is returned and the value of the macro EDOM is stored into errno. * If the result of the rounding is outside the range of the return type, the macro EDOM is stored into errno.
Examples: lround(0.5) ==> 1.0; lround(-0.5) ==> -1.0
integral value nearest to x as a long int
| Name | Description |
|---|---|
| x | value to round to nearest long int |