Stan Math Library
4.9.0
Automatic Differentiation
|
Unary plus operator for variables (C++).
The function simply returns its input, because
\(\frac{d}{dx} +x = \frac{d}{dx} x = 1\).
The effect of unary plus on a built-in C++ scalar type is integer promotion. Because variables are all double-precision floating point already, promotion is not necessary.
\[ \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} \]
a | Argument variable. |
Definition at line 44 of file operator_unary_plus.hpp.