Math Scalar Library
Programming Reference Manual C/C++
Version 1.0 DD-00003-010

10.2 scopysign - Copy sign

#include <msca.h>

double scopysign (double x, double y);
float  scopysignf(float x, float y);

Given values x and y this function returns the value of x with its sign changed to that of y . This is the equivalent of:

sgn(y)× |x|