Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

copysign, copysignf, copysignl - copy sign

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

C11
double copysign(double x, double y);
float copysignf (float x, float y);
long double copysignl (long double x, long double y); (Ende)

Description

These functions return the value of x with the sign of y.

Return val.

|x|                   if y >= 0

-|x|                  if y < 0

See also

fabs(), signbit(), math.h.