[#BloombergLP-bdldfp-DecimalUtil-quantize-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::quantize
:relfileprefix: ../../../
:mrdocs:

`quantize` overloads

== Synopses

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128]
xref:BloombergLP/bdldfp/DecimalUtil/quantize-0c.adoc[quantize](
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] value,
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] exponent);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil/quantize-0c.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/quantize-05.adoc[quantize](
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] value,
    int exponent);
----

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

Return a number equal to the specified `value` (except for possible rounding) having the exponent equal to the exponent of the specified `exponent`&period; Rounding may occur when the exponent is greater than the quantum of `value`&period; E&period;g&period;, `quantize(147e&hyphen;2&lowbar;d32, 1e&hyphen;1&lowbar;d32)` yields `15e&hyphen;1&lowbar;d32`&period; In the opposite direction, if `exponent` is sufficiently less than the quantum of `value`, it may not be possible to construct the requested result, and if so, `NaN` is returned&period; E&period;g&period;, `quantize(1234567e0&lowbar;d32, 1e&hyphen;1&lowbar;d32)` returns `NaN`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32]
xref:BloombergLP/bdldfp/DecimalUtil/quantize-02.adoc[quantize](
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] value,
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] exponent);
----

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

Return a number equal to the specified `value` (except for possible rounding) having the specified `exponent`&period; Rounding may occur when `exponent` is greater than the quantum of `value`&period; E&period;g&period;, `quantize(147e&hyphen;2&lowbar;d32, &hyphen;1)` yields `15e&hyphen;1&lowbar;d32`&period; In the opposite direction, if `exponent` is sufficiently less than the quantum of `value`, it may not be possible to construct the requested result, and if so, `NaN` is returned&period; E&period;g&period;, `quantize(1234567e0&lowbar;d32, &hyphen;1)` returns `NaN`&period; Behavior is undefined unless the `exponent` satisfies the following conditions &ast; for `Decimal32` type&colon; `&hyphen;101 &lt;&equals; exponent &lt;&equals; 90` &ast; for `Decimal64` type&colon; `&hyphen;398 &lt;&equals; exponent &lt;&equals; 369` &ast; for `Decimal128` type&colon; `&hyphen;6176 &lt;&equals; exponent &lt;&equals; 6111`


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32]
xref:BloombergLP/bdldfp/DecimalUtil/quantize-011.adoc[quantize](
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] value,
    int exponent);
----

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64]
xref:BloombergLP/bdldfp/DecimalUtil/quantize-06.adoc[quantize](
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] value,
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] exponent);
----

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64]
xref:BloombergLP/bdldfp/DecimalUtil/quantize-01d.adoc[quantize](
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] value,
    int exponent);
----

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


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