[#BloombergLP-bdldfp-DecimalUtil-round-09f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::round
:relfileprefix: ../../../
:mrdocs:

Return the specified `x` value rounded to the specified `precision` decimal places&period; Round halfway cases away from zero, regardless of the current decimal floating point rounding mode&period; If `x` is integral, positive zero, negative zero, NaN, or infinity then return `x` itself&period;

== Synopsis

Declared in `&lt;bdldfp&lowbar;decimalutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32]
round(
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] x,
    unsigned int precision);
----

== Description

Examples&colon; `round(3&period;14159, 3)` &equals;&equals;&gt; 3&period;142


[.small]#Created with https://www.mrdocs.com[MrDocs]#
