Stan Math Library
4.9.0
Automatic Differentiation
|
Exponentiation base 2 function for variables (C99).
The derivative is
\(\frac{d}{dx} 2^x = (\log 2) 2^x\).
\[ \mbox{exp2}(x) = \begin{cases} 2^x & \mbox{if } -\infty\leq x \leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]
\[ \frac{\partial\, \mbox{exp2}(x)}{\partial x} = \begin{cases} 2^x\ln2 & \mbox{if } -\infty\leq x\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } x = \textrm{NaN} \end{cases} \]
a | The variable. |