BloombergLP::bdldfp::DecimalImpUtil::round

round overloads

Synopses

Declared in <bdldfp_decimalimputil.h>

Return x rounded to the nearest integral value.

static
DecimalImpUtil::ValueType128
round(ValueType128 x);
» more...

Return x rounded to the nearest integral value.

static
DecimalImpUtil::ValueType32
round(ValueType32 x);
» more...

Return x rounded to the nearest integral value.

static
DecimalImpUtil::ValueType64
round(ValueType64 x);
» more...

Return x rounded to the specified precision.

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

Return x rounded to the specified precision.

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

Return x rounded to the specified precision.

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

Return Value

  • x rounded to the nearest integral value
  • x rounded to the specified precision

Parameters

NameDescription
xvalue to round
precisionnumber of digits after the decimal point