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

◆ operator-() [17/18]

var stan::math::operator- ( const var a)
inline

Unary negation operator for variables (C++).

\(\frac{d}{dx} -x = -1\).

\[ \mbox{operator-}(x) = \begin{cases} -x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]

\[ \frac{\partial\, \mbox{operator-}(x)}{\partial x} = \begin{cases} -1 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]

Parameters
aArgument variable.
Returns
Negation of variable.

Definition at line 37 of file operator_unary_negative.hpp.