[#BloombergLP-bdldfp-DecimalImpUtil-lround-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalImpUtil.adoc[DecimalImpUtil]::lround :relfileprefix: ../../../ :mrdocs: Return the integral value nearest to the specified `x`. Round halfway cases away from zero, regardless of the current decimal floating point rounding mode. == Synopsis Declared in `<bdldfp_decimalimputil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static long lround(xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32] x); ---- == Description 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 [.small]#Created with https://www.mrdocs.com[MrDocs]#