Math Scalar Library
Programming Reference Manual Fortran
Version 1.1 DD-00003-111

23.2 scopysign - Copy sign

function scopysign (x, y) 
function scopysignf(x, 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|