Stan Math Library
4.9.0
Automatic Differentiation
|
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} \]
a | Variable for radians of angle. |