BloombergLP::bdldfp::DecimalUtil::copySign

copySign overloads

Synopses

Declared in <bdldfp_decimalutil.h>

Same as the related overload above for copySign.

static
Decimal128
copySign(
    Decimal128 x,
    Decimal128 y);
» more...

Return a value with the magnitude of x and the sign of y.

static
Decimal32
copySign(
    Decimal32 x,
    Decimal32 y);
» more...

Same as the overload taking Decimal32.

static
Decimal64
copySign(
    Decimal64 x,
    Decimal64 y);
» more...

Return Value

value with the magnitude of x and the sign of y

Parameters

NameDescription
xvalue providing the magnitude
yvalue providing the sign