Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ copysign_non_zero()

template<typename T , typename U >
T stan::math::copysign_non_zero ( const T &  x,
const U &  y 
)
inline

Return the negation of the first argument if the first and second arguments have different signs and the first argument is not zero, otherwise return a copy of the first argument.

Template Parameters
Ttype of first argument
Utype of second argument
Parameters
[in]xfirst complex argument
[in]ysecond complex argument
Returns
copy of the first argument, negated if necessary to match the sign of the second argument
See also
copysign

Definition at line 49 of file copysign.hpp.