COPYSIGN(3) Library Functions Manual COPYSIGN(3)

copysign, copysignf, copysignlcopy sign

#include <math.h>

double
copysign(double x, double y);

float
copysignf(float x, float y);

long double
copysignl(long double x, long double y);

() returns x with its sign changed to y's. The () function is a single precision version of copysign(). The () function is an extended precision version of copysign().

fabs(3)

IEEE Std 754-1985

The copysign, copysignf and copysignl functions appeared in 4.3BSD, NetBSD 1.1 and OpenBSD 4.5, respectively.

June 5, 2013 OpenBSD 7.6