Math Scalar Library
Programming Reference Manual Fortran
Version 1.0 DD-00003-110

10.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|