trunc overloads

Synopses

Declared in <bdldfp_decimalutil.h>

Same as the related overload above for trunc.

Return the nearest integral value that is not greater in absolute value than the specified x.

Same as the related overload above for trunc.

Same as the overload taking Decimal64.

static
Decimal128
trunc(
    Decimal128 x,
    unsigned int precision);

Return the specified x value truncated to the specified precision decimal places. Round towards zero, regardless of the current decimal floating point rounding mode. If precision of x is less than or equal the precision or x is positive zero, negative zero, NaN, or infinity then return x itself.

static
Decimal32
trunc(
    Decimal32 x,
    unsigned int precision);

Same as the related overload above for trunc.

static
Decimal64
trunc(
    Decimal64 x,
    unsigned int precision);

Created with MrDocs