1COPYSIGN(3) Linux Programmer's Manual COPYSIGN(3)
2
3
4
6 copysign, copysignf, copysignl - copy sign of a number
7
9 #include <math.h>
10
11 double copysign(double x, double y);
12 float copysignf(float x, float y);
13 long double copysignl(long double x, long double y);
14
15 Link with -lm.
16
18 The copysign() functions return a value whose absolute value matches
19 that of x, but whose sign matches that of y. If x is a NaN, then a NaN
20 with the sign of y is returned.
21
23 The copysign() functions may treat a negative zero as positive.
24
26 C99, 4.3BSD. This function is defined in IEC 559 (and the appendix
27 with recommended functions in IEEE 754/IEEE 854).
28
30 signbit(3)
31
32
33
34GNU 2002-08-10 COPYSIGN(3)