[#BloombergLP-bdldfp-DecimalUtil-trunc-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::trunc
:relfileprefix: ../../../
:mrdocs:

`trunc` overloads

== Synopses

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

Same as the related overload above for `trunc`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128]
xref:BloombergLP/bdldfp/DecimalUtil/trunc-0d.adoc[trunc](xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] x);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/trunc-0d.adoc[_» more&period;&period;&period;_]#

Return the nearest integral value that is not greater in absolute value than the specified `x`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32]
xref:BloombergLP/bdldfp/DecimalUtil/trunc-0af.adoc[trunc](xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] x);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/trunc-0af.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `trunc`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64]
xref:BloombergLP/bdldfp/DecimalUtil/trunc-01.adoc[trunc](xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] x);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/trunc-01.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `Decimal64`&period;


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

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/trunc-00.adoc[_» more&period;&period;&period;_]#

Return the specified `x` value truncated to the specified `precision` decimal places&period; Round towards zero, regardless of the current decimal floating point rounding mode&period; If precision of `x` is less than or equal the `precision` or `x` is positive zero, negative zero, NaN, or infinity then return `x` itself&period;


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

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/trunc-0ab.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `trunc`&period;


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

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/trunc-09.adoc[_» more&period;&period;&period;_]#


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