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

◆ exp2() [5/6]

var stan::math::exp2 ( const var a)
inline

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} \]

Parameters
aThe variable.
Returns
Two to the power of the specified variable.

Definition at line 39 of file exp2.hpp.