1COPYSIGN(3)                Linux Programmer's Manual               COPYSIGN(3)
2
3
4

NAME

6       copysign, copysignf, copysignl - copy sign of a number
7

SYNOPSIS

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

DESCRIPTION

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

NOTES

23       The copysign() functions may treat a negative zero as positive.
24

CONFORMING TO

26       C99,  4.3BSD.   This  function  is defined in IEC 559 (and the appendix
27       with recommended functions in IEEE 754/IEEE 854).
28

SEE ALSO

30       signbit(3)
31
32
33
34GNU                               2002-08-10                       COPYSIGN(3)
Impressum