The copysign functions return x with the same sign as y. IEEE 754 requires copysign(x,NaN), copysignf(x,NaN), and copysignl(x,NaN) to return +x or -x.