Return a value with the magnitude of x and the sign of y.
Declared in <bdldfp_decimalimputil.h>
static
DecimalImpUtil::ValueType32
copySign(
ValueType32 x,
ValueType32 y);
Return a decimal value with the magnitude of the specifed x and the sign of the specified y. If x is NaN, then NaN with the sign of y is returned.
Examples: copysign( 5.0, -2.0) ==> -5.0; copysign(-5.0, -2.0) ==> -5.0
a value with the magnitude of x and the sign of y
| Name | Description |
|---|---|
| x | value supplying the magnitude |
| y | value supplying the sign |