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

◆ cos() [7/9]

var stan::math::cos ( var  a)
inline

Return the cosine of a radian-scaled variable (cmath).

The derivative is defined by

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

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

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

Parameters
aVariable for radians of angle.
Returns
Cosine of variable.

Definition at line 46 of file cos.hpp.