copysign - copy sign of a number
#include <math.h> double copysign(double x, double y);
The copysign() function returns a value whose absolute value matches x, but whose sign matches that of y.
BSD 4.3 GNU 1993-06-06 COPYSIGN(3)