BloombergLP::bdldfp::DecimalImpUtil::quantizeEqual

Quantize y to exponent into x when exactly representable.

Synopses

Declared in <bdldfp_decimalimputil.h>

Quantize y to exponent into x when exactly representable.

static
int
quantizeEqual(
    ValueType128* x,
    ValueType128 y,
    int exponent);
» more...

Quantize y to exponent into x when exactly representable.

static
int
quantizeEqual(
    ValueType32* x,
    ValueType32 y,
    int exponent);
» more...

Quantize y to exponent into x when exactly representable.

static
int
quantizeEqual(
    ValueType64* x,
    ValueType64 y,
    int exponent);
» more...

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
xreceives the quantized value on success
yvalue to quantize
exponenttarget quantum exponent