COPYSIGN(3M) Mathematical Library Functions COPYSIGN(3M)

copysign, copysignf, copysignl - number manipulation function

c99 [ flag... ] file... -lm [ library... ]
#include <math.h>
double copysign(double x, double y);

float copysignf(float x, float y);

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

These functions produce a value with the magnitude of x and the sign of y.

Upon successful completion, these functions return a value with the magnitude of x and the sign of y.

No errors are defined.

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Standard
MT-Level MT-Safe

math.h(3HEAD), signbit(3M), attributes(7), standards(7)

July 12, 2006 SunOS 5.11