BloombergLP::bdldfp::DecimalUtil::copySign

Same as the related overload above for copySign.

Synopsis

Declared in <bdldfp_decimalutil.h>

static
Decimal128
copySign(
    Decimal128 x,
    Decimal128 y);

Return Value

value with the magnitude of x and the sign of y

Parameters

NameDescription
xvalue providing the magnitude
yvalue providing the sign