copysign
, copysignf
---sign of y, magnitude of xSynopsis
#include <math.h> double copysign (double x, double y); float copysignf (float x, float y);
Description
copysign
constructs a number with the magnitude (absolute value)
of its first argument, x, and the sign of its second argument,
y.
copysignf
does the same thing; the two functions differ only in
the type of their arguments and result.
Returns
copysign
returns a double
with the magnitude of
x and the sign of y.
copysignf
returns a float
with the magnitude of
x and the sign of y.
Portability
copysign
is not required by either ANSI C or the System V Interface
Definition (Issue 2).
Packaging copyright © 1988-2000 OAR Corporation Context copyright by each document's author. See Free Software Foundation for information.