15.6.11 copySign()

Function returns the first floating-point argument with the sign of the second floating-point argument.

Value1 can be one of the following types: double, float.

Returned value type will be double, float.

Function Result

copySign(3.0, -4.0))

-3.0