![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
|
inline |
Return the negation of the first argument if the first and second argument have different signs, otherwise return a copy of the first argument.
For the sake of this function, zero is considered positive. This function uses negation rather than literally copying signs to preserve derivatives.
Overload of std::copysign from cmath for argument-dependent lookup.
| T | type of first argument |
| U | type of second argument |
| [in] | x | first complex argument |
| [in] | y | second complex argument |
Definition at line 30 of file copysign.hpp.