BloombergLP::bdldfp::DecimalUtil::round

round overloads

Synopses

Declared in <bdldfp_decimalutil.h>

Same as the related overload above for round.

static
Decimal128
round(Decimal128 x);
» more...

Return the integral value nearest to the specified x. Round halfway cases away from zero, regardless of the current decimal floating point rounding mode.

static
Decimal32
round(Decimal32 x);
» more...

Same as the related overload above for round.

static
Decimal64
round(Decimal64 x);
» more...

Same as the related overload above for round.

static
Decimal128
round(
    Decimal128 x,
    unsigned int precision);
» more...

Return the specified x value rounded to the specified precision decimal places. Round halfway cases away from zero, regardless of the current decimal floating point rounding mode. If x is integral, positive zero, negative zero, NaN, or infinity then return x itself.

static
Decimal32
round(
    Decimal32 x,
    unsigned int precision);
» more...

Same as the related overload above for round.

static
Decimal64
round(
    Decimal64 x,
    unsigned int precision);
» more...