BloombergLP::bdldfp::DecimalImpUtil::scaleB

Return value multiplied by ten raised to exponent.

Synopsis

Declared in <bdldfp_decimalimputil.h>

static
DecimalImpUtil::ValueType32
scaleB(
    ValueType32 value,
    int exponent);

Description

The quantum of value is scaled according to IEEE 754's scaleB operations.

Special value handling: * If value is quiet NaN, quiet NaN is returned. * If value is signaling NaN, quiet NaN is returned and the value of the macro EDOM is stored into errno. * If x is infinite, then infinity is returned. * If a range error due to overflow occurs, infinity is returned and: the value of the macro ERANGE is stored into errno.

Return Value

value multiplied by ten raised to exponent

Parameters

NameDescription
valuevalue to scale
exponentpower of ten applied to value