[#BloombergLP-bdldfp-DecimalUtil-quantizeEqual-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::quantizeEqual
:relfileprefix: ../../../
:mrdocs:

`quantizeEqual` overloads

== Synopses

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdldfp/DecimalUtil/quantizeEqual-01.adoc[quantizeEqual](
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128]* x,
    xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] y,
    int exponent);
----

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

If a floating&hyphen;point number equal to the specified `y` and having the specified `exponent` can be constructed, set that value into the specified `x` and return 0&period; Otherwise, or if `y` is NaN or infinity, leave the contents of `x` unchanged and return a non&hyphen;zero value&period; The behavior is undefined unless `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
int
xref:BloombergLP/bdldfp/DecimalUtil/quantizeEqual-02.adoc[quantizeEqual](
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32]* x,
    xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] y,
    int exponent);
----

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

Same as the overload taking `Decimal32`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdldfp/DecimalUtil/quantizeEqual-0c.adoc[quantizeEqual](
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64]* x,
    xref:BloombergLP/bdldfp/Decimal64.adoc[Decimal64] y,
    int exponent);
----

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


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