[#BloombergLP-bdldfp-DecimalImpUtil-quantizeEqual-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalImpUtil.adoc[DecimalImpUtil]::quantizeEqual :relfileprefix: ../../../ :mrdocs: `quantizeEqual` overloads == Synopses Declared in `<bdldfp_decimalimputil.h>` Quantize `y` to the specified `exponent` and store the result in `x`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-0b.adoc[quantizeEqual]( xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType128.adoc[ValueType128]* x, xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType128.adoc[ValueType128] y, int exponent); ---- [.small]#xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-0b.adoc[_» more..._]# If a floating‐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. Otherwise, or if `y` is NaN or infinity, leave the contents of `x` unchanged and return a non‐zero value. The behavior is undefined unless `exponent` satisfies the following conditions * for `Decimal32` type: `‐101 <= exponent <= 90` * for `Decimal64` type: `‐398 <= exponent <= 369` * for `Decimal128` type: `‐6176 <= exponent <= 6111` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-0e.adoc[quantizeEqual]( xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32]* x, xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32] y, int exponent); ---- [.small]#xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-0e.adoc[_» more..._]# Quantize `y` to the specified `exponent` and store the result in `x`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-0d.adoc[quantizeEqual]( xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType64.adoc[ValueType64]* x, xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType64.adoc[ValueType64] y, int exponent); ---- [.small]#xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-0d.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#