copysign() function in C++
copysign(x, y) function returns the value with a magnitude of x and the sign of y. Examples: Input : copysign(6, -2) Output : -6 Input : copysign(-6, 2) Output : 6 Syntax: copysign(x, y); Parameters: x : Value with the magnitude y : Value with the sign Returns : Returns the value with a magnitude of