BloombergLP::bdldfp::DecimalUtil::makeDecimal64

Return a Decimal64 with the specified significand and exponent.

Synopsis

Declared in <bdldfp_decimalutil.h>

static
Decimal64
makeDecimal64(
    int significand,
    int exponent);

Description

Return a DecimalNN object that has the specified significand and exponent, rounded according to the current decimal rounding mode, if necessary. If an overflow condition occurs, store the value of the macro ERANGE into errno and return infinity with the appropriate sign.

Return Value

Decimal64 value with the specified significand and exponent

Parameters

NameDescription
significandcoefficient of the decimal value
exponentpower of ten applied to significand